Walking Backwards

Published August 30, 2009
Advertisement
Sooo, steps 2 (menu), 3 (loading & displaying level) and 4 (font & timer) went without a hitch but when I was working my way through step 5 (movement and collision detection) it all went wrong!

The first problem I encountered was that some of the tiles that should be passable weren't. So I went back to check my level editor and when loading the tile types I hadn't set them correctly. However, changing this wouldn't affect the level itself because the tiles were already saved with their old passable values. So, after messing around trying to change the carefully change the values in the text file (that went horribly wrong [rolleyes]) and various other things (including trying to get it to save and load as a binary file) I just went back to my original text implementation. Would it work again? Would it hell! But now I finally have it working. Instead of one file stream, I have two separate streams (one input, one output) for saving and loading which is probably a safer idea [smile]. (But I still have to completely remake the level [sad])

The other problem I had was trying to get frame-independent movement (i.e instead of just capping the frame-rate using SDL_Delay I tried to use a delta-time approach in various guises) but that just resulted in stuttery animation so I have left it for this game. (I'm also not entirely sure on the advantages - more research required).

So, the next things I have to do are: re-make the level, then complete step 5 by having the camera follow the player when he reaches the edge of the screen and I will also try to add Azh321's idea of going from the bank to a safehouse (this will probably just be a random tile next to a house tile) to get money. Then that will be the first demo [grin].

Thanks for reading
-AEdmonds
Previous Entry Black And White Town
Next Entry Take Me Out
0 likes 1 comments

Comments

Staffan E
I don't think your game would benefit from variable timesteps. If you have a game where the load on the system varies a lot during gameplay, you can use this to avoid slow-downs. In your game where I imagine the load is static and very light, having variable timesteps would be wasted effort. You'd likely end up with a very high framerate and anything above 50 is just heat for the crows.

Some people seem to get turned on by 1000+ framerates though so maybe you could add a mock-up counter in the corner for their novelty. [grin]
August 31, 2009 05:20 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement