Skip to main content
GameDev.net gamedev.net
🔒 Locked

Game Architecture

Started by tiutiu Mar 19, 2003 at 4:42 AM 4 replies 450+ views
Original Post
tiutiu
tiutiu
I''m currently writing an arkanoid clone and had a few problems with the game architecture, i dont know how to visualize it. If there was only to be the main game screen there wouldnt be any problem, but there is the intro screen, menu and submenu screen, character selection, etc... each one with different display, key process and resource load functions. I thought doing something like an aplication object with pointers to functions and different classes for each type of screen, so that classes set up the application function pointers to its own and application only has to call each function. Is that stuff viable?? Can you give me some advice? Thanks in advance. PD: Im spanish, so sorry for the spelling
n0ob
n0ob
The menu doesn''t have to be so large, and the screens so different that you should worry about resource load functions or some of that other stuff. You could design a quick and dirty menu using arrays of a menu screen structure, having current screen index. You could have buttons etc whose visiblility is determined by their menu id. That''s a quick way. Now, since most people will be playing your game, don''t spend too much time making your menu perfect

Kings of Chaos
Luctus
Luctus
http://www.codeproject.com/tips/statepattern3.asp

Good tutorial on the state pattern, worth checking out.


-Luctus
Codito, Ergo Sum (Courtesy of ThinkGeek)

[Mail][DreggSoft]
-LuctusIn the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move - Douglas Adams
AnthonyLewis
AnthonyLewis
I just finished a tutorial called Managing Games States in C++ a few days ago. It uses C++ classes similar to the CodeProject article mentioned above. My method uses a stack of state classes to allow one state to be paused while another is executing.

Anyway, you can read it at http://tonyandpaige.com/tutorials/game1.html. I would appreciate any feedback.

Tony
Punx
Punx
I must say that is an excellent article Mr.Lewis. Game states are one of those things that I had trouble with and it''s nice to see a simple, easy to follow tutorial out there. Good job.
~punx
AnthonyLewis
AnthonyLewis
Thanks for the praise. I''m going to try to add more tutorials as I learn new things - hopefully about once a week. Maybe one of these days I''ll write a book

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.