Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / Project Atomic - RTS

Author
Message
Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 13th Oct 2010 04:09
Quote: "I think i've posted a link to IanM's library"


Err...no, not even on the previous page. Which library are you talking about? I have his Matrix1Utils thing, and I can't see it really helping much with path finding.

As you are rewriting, maybe you wouldn't mind increasing the camera speed? It's a bit slow. Also, and you probably already did this, but if you are using sync on and sync rate 60 (or whatever), I recommend you change to this:



That's what I put at the top of almost all of my projects. The only drawback with the vsync method is the if someone has their monitor set to 75Hz it will run at 75 FPS.

If you are not using sync at all, I will keel over and die. The absolutely cannot write a game without using sync. If you aren't using it, and after I come back to life, I will explain what it's for.

Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 13th Oct 2010 21:13 Edited at: 13th Oct 2010 21:14
Fetching link....

http://forum.thegamecreators.com/?m=forum_view&t=11137&b=6

Okay... I will make the camera a little faster, but I won't change the sync rate. I use Vsync because that is as fast as my game needs to run, theres no point in making it run faster. I've also decoupled my display loop, so it only runs at about 30fps anyways.

I've been using darkbasic for about two years now, I know why I have to use sync

Thanks for your concern, and thanks for getting this a hot topic

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 16th Oct 2010 21:23
Good news! Pathfinding is starting to work. The unit finds the destination just fine, but it stutters and disappears and teleports backwards etc on the way there, the joys!

Quel
15
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 16th Oct 2010 21:46
Yeah following the calculated path is an other tricky stuff sometimes...
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 16th Oct 2010 23:02
Yeah, Pathfinding in RTS games with ramps, bridges, hills etc. is certainly one of the toughest things, and most frustrating things to do in programming... Don't give up, I'm sure you'll get it nailed

On topic with pathfinding : I just have to marvel at the beautiful pathfinding in StarCraft 2... It's really amazing what they were able to accomplish, and many of the pathfinding bugs from SC1 where eliminated. Anyway, please keep up the good work, this game has awesome potential!

TheComet

Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 1st Nov 2010 02:11 Edited at: 1st Nov 2010 02:13
Quote: "Okay... I will make the camera a little faster, but I won't change the sync rate. I use Vsync because that is as fast as my game needs to run, theres no point in making it run faster. I've also decoupled my display loop, so it only runs at about 30fps anyways."


*confused*

I don't understand...

Here is what my sync code example does:



The reason I do this is because DBPro's sync rate command doesn't keep a steady framerate. I just set no limit on it and use the near-perfect vsyncing. It will usually make it run at 60fps and a pretty steady 60fps.

The only drawback is that vsync syncs exactly with the monitor's refresh rate, so if the user has his/her refresh rate at 75 Hertz, it will run at 75 fps.

EDIT: I'm always putting quotes in code and vice-versa

Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 7th Nov 2010 13:24
I'm not an expert in this, but if you search for something along the lines of 'decoupling the display loop' you will find a tutorial on what it is. I set vysnc on, which caps my sync rate at my monitor refresh rate.

Then I have a timer within my main loop, which causes it to only sync every 33 milliseconds, meaning it is essentially capped at 30fps, and it should remain constant at that framerate, and there will be thousands of game loop( collision, movement, calculations etc ) per second.

Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 9th Nov 2010 04:41
Oh, I understand now. It's just only syncing every second frame, right?

I might use that for increased speed where game logic is what slows it down.

Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 9th Nov 2010 19:14
Take a look at this, it will explain better than I will ever be able to lol.

http://forum.thegamecreators.com/?m=forum_view&t=175348&b=6

Best of luck!

Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 12th Nov 2010 01:16 Edited at: 18th Aug 2011 01:13
I read it and, yes, I was right.

It basically only updates the screen every 33 milliseconds but runs the gameloop (all stuff like handling input, moving objects, cheking for collision, etc, etc, etc.) as fast as possible.

Hmm....here's an idea.....this would be great for things where you need lots of code to run through lots of times a second yet keep a good framerate, for example, if you had a floor made of thousands of cubes but only wanted to display the ones the camera could see and hide the rest then this would be great!

EDIT: If you are in the UK, just note that we have a Newcastle in Australia too (it's better then your yucky cold and wet one! ).

Clonkex

Login to post a reply

Server time is: 2024-11-24 14:54:33
Your offset time is: 2024-11-24 14:54:33