mac-10
Still Fresh
Hi All
I have been writing a little game to get my head into game programming.
I have to admit it has been a bit of a struggle to produce something with
a bit of polish. I have nearly finish my maze "game". its not much
of a game but it should help me put together a frame work that
I can use in the future.
have hit a bit of a snag though. the game seem to run just fine for a couple of
minutes and then crash. I think it has something to do with how I am drawing
to the game surface.
I am using
SDL_Flip(game->screen);
SDL_FreeSurface(game->screen);
had thought that calling FreeSurface would clear the game surface.
its as if it is creating a new surface every time the draw function is call.
I have a windows build and in taskmanager the memory usage just keep climbing.
I am totally lost at the moment. spend about 6 hours last
night trying to fix the problem and still haven't found to problem.
if anyone could point me in the right direction it would be greatly appreciated.
here is a link it the source code.
www.webpoint-servers.com/sdl/lad.rar
hope you can help a very tired nOOb
Thanks
Mac
I have been writing a little game to get my head into game programming.
I have to admit it has been a bit of a struggle to produce something with
a bit of polish. I have nearly finish my maze "game". its not much
of a game but it should help me put together a frame work that
I can use in the future.
have hit a bit of a snag though. the game seem to run just fine for a couple of
minutes and then crash. I think it has something to do with how I am drawing
to the game surface.
I am using
SDL_Flip(game->screen);
SDL_FreeSurface(game->screen);
had thought that calling FreeSurface would clear the game surface.
its as if it is creating a new surface every time the draw function is call.
I have a windows build and in taskmanager the memory usage just keep climbing.
I am totally lost at the moment. spend about 6 hours last
night trying to fix the problem and still haven't found to problem.
if anyone could point me in the right direction it would be greatly appreciated.
here is a link it the source code.
www.webpoint-servers.com/sdl/lad.rar
hope you can help a very tired nOOb
Thanks
Mac