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.

Author
Message
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 28th Aug 2003 23:41
my game that i was making, an RPG, had only a matrix, a sphere with an attack and deffend animation made in db, and a small sphere that runs to attack you...the only problem was that it ran incredibly slow and jolty...now i think it might be because our computer sucks so bad(celeron 455 mhz,128 ram), but could it be because my code is not good enough? can you wright the code so it will run faster? thanx in advance

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 29th Aug 2003 00:10 Edited at: 29th Aug 2003 00:12
beware of matrix`s that have too many tiles, that will slow the program down a lot, also make sure your code is optimised, there is no reason a game should be slow with so little going on, try reducing the matrix size and make sure you haven`t inadvertently created several hundred on screen objects, for example a make object command in the game loop, also make sure you DON`T have a make objects command or any other slower instruction in the game loop, if you want to post the code then that may give a better idea of what you are doing and where any delays are coming from, also, does your code start "sync on:sync rate 0"? , I used DB classic on a P300 and TNT2 for ages, and it wasn`t that slow, cheers.

Mentor.
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 29th Aug 2003 02:33
heres my code...it still runs a little jerky

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
Xeridox
21
Years of Service
User Offline
Joined: 19th May 2003
Playing: Scrap Mechanic
Posted: 29th Aug 2003 02:55
Try adding sync rate 40 right b4 sync on, this helps on my comp

Darin Snow
Xeridox Entertainment Group
Please visit our website for regular updates!
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 29th Aug 2003 13:49
the reason it is jerky is that you have the model for the player moving 3 world units per loop, and the model is 5 world units in diameter, so the model is moving 3/5ths of its lenth per update, the program runs on my system at about 380fps, and the monitor refreshes at 100hz max, so I only see the model every 3rd or fourth program refresh (ie: when it has moved either 3x3/5=1.8 times its own length or 4x3/5=2.4 times its own length) and that will make the movement look very jerky anyway, plus you have the updates for the image arriving at different times and that makes the motion look irregular, just reduce the amount you move the object to 1/3 of a world unit per loop and the game will look much smoother, if you think about the relative speeds, say your player object moved its own length every frame, then if the monitor runs at 60 fps then it would move 60x5=300 world units per second, thats way too fast for a player object (unless it was a jetplane with afterburners on), you could cross a 3000 wide matrix in ten seconds, I find it best to think of the world units as meters, that gives you some idea of how big to make things and what the relative sizes and speeds should be, don`t forget to add sync rate 0 to the start of your code either, you want all the speed you can get, if you don`t set it to zero then you slow the code down, cheers

Mentor.

Login to post a reply

Server time is: 2024-09-20 21:37:26
Your offset time is: 2024-09-20 21:37:26