Game loop

14 11 2009

Hi,

In my second post I wanted to bring you a few lines of the book I’m reading that I find very interesting and I want to share with you.It´s about game loop and his two method, the draw and update method.

“Essentially, a game loop consists of a series of methods that are called over and over
until the game ends. In XNA, the game loop consists of only two methods: Update
and Draw. For now, you can think of the game loop in these terms: all logic that
affects the actual game play will be done in the Update or the Draw method. The Draw
method is typically used, surprisingly enough, to draw things. You should try to do
as little as possible in the Draw method other than draw your scene. Everything else
needed to run your game (which eventually will involve moving objects, checking for
collisions, updating scores, checking for end-game logic, etc.) should take place in
the Update method.” Learning XNA 3.0 by Aaron Reed

 

Advertisement

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.