Code structure of game
BlitzPlus Forums/BlitzPlus Beginners Area/Code structure of game
| ||
Hi, I'm trying to get my head around how to structure the code of my game. It is a puzzle game that runs in a window and is written in BlitzPlus. It uses just 2D graphics and no Windows GUI features. I have the main part of the game in place. The game works but I'm not sure how to start doing the start menu, game over bits etc. What do you guys recommend? I mean, do people have a seperate loop for each section of the whole app and a seperate update/render function for each part? Do you load all the game graphics in at the start or load the game files in at the start of the actual game part? Should I put each part in its own file (I am using Protean BTW). Sorry if this makes no sense.. I shall try to elaborate in the morning! |-) Any help / guidance would be appreciated! Pete |
| ||
i tend to go with seperate update/loops for setup windows/options. depends what works for you, i prefer to keep other aspects seperate from the game loop |
| ||
I load all the graphics and sounds at the start then show the title page in a loop. Then when the game starts I load the level data and create it. Then I'm in the game loop. Game over and Level Complete screens are also separate loops. |
| ||
Thanks for your responses. I hope to have my game in a state where I can upload it to the worklogs soon. It is called 'atomz' and is the game where you add electrons to your atoms with the aim of starting a chain reaction that will wipe out all your opponent's atoms. I'm sure some of you will be familiar with it. It's my first game in Blitz on the PC! |
| ||
played it on the Atari ST I think. Look forward to it |