Finished First Game

Started by
17 comments, last by irishcomputerguy 19 years, 4 months ago
Managed to download it....
Is your sprite drawing done by overriding the screen update/paint function or somthing simular? it runs like my friends Breakout game did before he put a timer loop in it.... 6 million frames per-second (on an AMD64 3000+)

Looks like it could be fun if it ran at a speed i had any control over it at?
If its actualy drawing based on a timer the pace of the game need to be slowed down to make it more accesable.... if its just updating like crazy (which im assuming it is because it shows tell tale signs like being fast as hell with occasional jerkyness) then it needs somekind of timer to call the sprite drawing tobe implimented.

Nice 1st attempt though :) many people start with somthng much simpler so in aiming higher it was only natural to encounter more problems.
Advertisement
Did you develop this on a Pentium III? It smokes! Looks pretty cool, though. Update it to run at a constant speed no matter the processor and include some instructions.

[Edited by - Magmai Kai Holmlor on December 14, 2004 8:44:00 PM]
Wow guys thanks for all the replies , I finished it in school right as the bell rang so I haven't been able to check the forums in a while. I coded it on a 2.6 Ghz P4. And about that running too fast thing, can anyone show me how to slow it down to a standard speed no matter the processor?
My Current Project Angels 22 (4E5)
Quote:Original post by Sir Sapo
Wow guys thanks for all the replies , I finished it in school right as the bell rang so I haven't been able to check the forums in a while. I coded it on a 2.6 Ghz P4. And about that running too fast thing, can anyone show me how to slow it down to a standard speed no matter the processor?


you're probably running your game loop in as "frame-based" rate. you need to do a "time-based" loop. thre's quite a lot of discussion here on how it's done. you may wanna do a search. i wish i could do it for you but for some reason, the search tool doesn't work on my PC at the moment.
or you can probably do this:

declare the following variables as globals:


DWORD g_dwStart;
DWORD g_dwEnd;
DWORD g_dwTime;


then say you want a constant rate of 30ms timing minimum for every frame, define this on your game initialiation function:

g_dwTime = 30;

then on your main game loop, insert this code snippet:


g_dwStart = g_dwEnd;
g_dwEnd = timeGetTime();

while ( g_dwEnd - g_dwStart < g_dwTime ) {
g_dwEnd = timeGetTime();
}


the above function actually maintains your frame rate at constant speed no matter how fast your processor is. be sure to include the windows multimedia timer library for timeGetTime() function.
Now the problem is when youre computer is slow and cannot catch up with 30 mseconds per frame. your object movements will now move slower than usual. to prevent this, you update your object position for every loop with respect to the actual time elapsed like this:


object.new_pos = object.old_pos + object.velocity * ( g_dwEnd - g_dwStart );


i hope this helps!
btw, are you from philippines? your nick is kinda familiar.



very fast! i could not see anything, i run game 5 times(at same time) and i could play some. nice work but really wants to be "time based".. .
+-+-+-+-+-STR
I have a PIII so I managed to play it.It's darn easy to play when considering the speed of the enemy ships and the bullets but the snow like stuff what got into my hair.It's looks show much like the background.

The graphics are ok,but you need to add time based movement and speed up the bullet speeds and make the enimies move around a bit more.Good work.

The bad things are,it lacks a menu,for starting a new game and such and the explosion are well,they go upwards instead of spreading.


Very good ;)
______________________________________________________________________________________________________
[AirBash.com]
Very cool indeed. Hope you add to it. I wanted to email you to ask you a couple of questions but I could not find any info.

Fud
It's a nice game. But it's way too fast. Does it run super fast for you? Cause it runs at "supersonic" speed on the P4's I use. I'll be trying it on a Athlon XP 2400+ soon. But I expect it'll run just as fast. Find a way to slow it down.

_______________________________________________________________________________
http://www.geekland.co.nr
http://www.thundersquad.co.nr
"All your base are belong to us"-Bad Translations

This topic is closed to new replies.

Advertisement