Wednesday, May 16, 2012

How Exactly Does My Game Work?

My game is going to have lots of functions, so it's code will be rather complex. The list of things to do in the game are things like "process AI", or "generate map", or even just "run". The code in my game just runs in a loop. Only one thing is being processed at a time. This would be an example game loop:

--> Process AI--> Check Input --> Process Input--> Recieve/Send Multiplayer data --> update screen --> restart

How does the computer change if it just keeps repeating one loop? The loop just receives data and outputs a result. Each loop, it changes variables, and the computer saves those for the next loop. Computer programming goes in one path, but has infinitely possible paths.

My game starts up and loads the main menu. After that, it's loop is to receive input, change variables, and output the screen. If the player clicks "play game" then it gives some data to another loop that starts generating the map. The game's status is changed to "playing" and the AI, sound, etc. starts. I hope this post was interesting about how my game will work!

Doc

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.