Game Loop - Reading Assingment

  1. What is a game loop?

The central code of the game.

  1. What phases does a game loop normally have?

Initialize, update and draw.

  1. What happens in each phase?

In initialization any necessary game setup is done. Menu is prepared and hardware specifications can be checked.

In update all objects are prepared to be drawn. This could be health point changes, physics updates and damage updates.

In draw all updated information is put on the screen. The code draws HUD, character sprites etc…

1 Like

Reading assignment: Game Loop (Answers)

  1. Central code of the game. Split into different parts.

  2. Phases:
    A. Initial
    B. Update
    C. Draw

Initial Phase - game setup, prepare environment for update and draw phases.

**Update Phase** - main purpose, all objects to be drawn, physics code, coordinating al updates. (all points, health ,damages, char upgrades, etc. involved in game).

**Draw Phase** - when all updated information is put on the screen. (Layers, levels, char, HUD, etc.)
1 Like

1.) All the Code that makes the game Interactive and dynamic split into phases but combined into one controlled Loop that keeps running
2/3.) Initialize: Setup for other phases, Main entities here
Update: prepare content for draw phase, input captured and processed
Draw: Information put on screen, levels, layers, chars, HUD

2 Likes
  1. An infinite loop that responds to inputs made by the user.
  2. Initialize, update and draw
    3.Initialize: setup and prepare game environment; Update: all entities and properties are updated and prepared for drawing; Draw: all information is put on the screen/ user interface
2 Likes
  1. a game loop is the heart of the game where all the parts come together to keep the game running, looping with all the essential parts being updated in every loop. ex. upgrading your character, defeating a monster.

  2. game loop has 3 phases, the initialize, update and draw

  3. in the initialize phase, this is the part where the environment is being made, all the necessary things for the game to have menu, main entities, main attributes of characters, and so on.

in the update phase, this is where the operations are being made, if the initialize stage is for the things, the update phase is for the operation of the things, example of this is when your character has damage an enemy, the operation is being made in this phase where the damage is being dealt to the enemy and to your character and will do the math after.

in the draw phase, this is where we see it in our screen the final computation from the update phase.

please tell me if i understand it correct on my own words. thank you.

4 Likes
  1. What is a game loop?
    The game loop contains all the dynamic and interactive code which runs the game.

  2. What phases does a game loop normally have?
    The three typical phases are initialize, update and draw.

  3. What happens in each phase?
    Initialize
    Creation main entities, detection of hardware capabilities and any other initial setup
    Update
    Execute game logic such as physics code, coordinate updates and entity state changes
    Draw
    Render visuals on to the screen including the effects of the changes in the update phase.

2 Likes

1.The game loop is the central code of your game, which is a controlled infinite loop that makes your game keep running.
2.Phases of the game loop: initialize, update and draw.
3.Initialize -> game setup, update -> prepare object to be drawn, any changes, updates, draw -> put the information to the screen

1 Like
  1. It is the central code of a video game.

2 Game loop is divided in initialize, update and draw.

  1. Initialize does any game setup needed prepares game for update and draw phases.

Update prepares the the objects to be draw by using game logic like health points or ammo.

Draw phase is when all that information in the update phase is shown on screen.

2 Likes
  1. The game loop is the central part of the game’s code,an infinite loop, through which the various parts of the game are updated and controlled.

  2. The components of the game code include the phases initialize, update and draw.

  3. The initialise phase is used to setup and prepare the game environment. Update prepares all objects that need to be drawn, capturing and processing any input. Draw is when the information is put onto the screen.

1 Like

What is a game loop?
All the code that makes the game interactive and dynamic goes in the game loop
What phases does a game loop normally have?
Initialize, Update and Draw
What happens in each phase?
The initialize phase is used to do any necessary game setup
The main purpose of the update phase is to prepare all objects to be drawn
When everything is properly updated and ready, we enter the draw phase where all this information is put on the screen

1 Like

What is a game loop?
Game loop is a controlled infinite loop that makes the game running.

What phases does a game loop normally have?
Initialize, update and draw.

What happens in each phase?
In initialize phase is used to do the game setup and prepare the environment for the other phases.
In update phase all objects are prepared to be drawn.
In draw phase all the information is presented on the screen.

1 Like

What is a game loop?
The game loop itself is a controlled infinite loop that both keeps the game running and responds to user input.

What phases does a game loop normally have?
A game loop is central code of game.Normally has Initialize, Update and Draw phases.

What happens in each phase?
Initialize: Set up the game and prepares the environment for the subsequent phases. This set up includes creating game components, preparing the main menu, detecting hardware capabilities, etc.

Update: This phase prepares the objects to be drawn and this includes capturing changes to object state (health points, upgrades, etc.). This phase is where the physics code and coordinate updates run.

Draw: This phase is where all the game information is put onto the screen.
This function should contain all the code to manage and draw the levels, layers, chars, HUD and so on.

2 Likes
  1. **What is a game loop?**The game loop is the central code of your game, split into different parts.
  2. What phases does a game loop normally have? initialize , update and draw .
  3. What happens in each phase?
    The initialize phase is used to do any necessary game setup and prepare the environment for the update and draw phases. Here you should create your main entities, prepare the menu, detect default hardware capabilities, and so on.

The main purpose of the update phase is to prepare all objects to be drawn, so this is where all the physics code, coordinate updates, health points changes, char upgrades, damage dealt and other similar operations belong. This is also where the input will be captured and processed.

When everything is properly updated and ready, we enter the draw phase where all this information is put on the screen. This function should contain all the code to manage and draw the levels, layers, chars, HUD and so on.

2 Likes
  1. What is a game loop?
    The game loop is the central code of your game, split into different parts.

  2. What phases does a game loop normally have?
    Initialize, Update and Draw

  3. What happens in each phase?
    Initialize: prepare and setup game environment
    Update: prepare all objects needed within the game environment
    Draw: present all prepared information on screen of the player

2 Likes
  1. What is a game loop?
    Central code / heart of the game. After initialization it runs an infinite loop to interact with users input to play the game.

  2. What phases does a game loop normally have?
    Initialize, Updated, Draw.

  3. What happens in each phase?

  • Initialize: preparation tasks, setup environment, which hardware
  • Updated: backend tasks for the actual game during play, respond to user input
  • Draw: frontend, visualizing, put it on the screen
1 Like
  1. What is a game loop?
    The game loop is the core mechanism of the game , this mechanism is repeated indifinitely during the game life cycle

2.What phases does a game loop normally have
Initialization - update - draw

  1. What happens in each phase?
    Initialization: the game loads the necessary assets for the game such as sprites, sounds and prepares the material environment for the game
    update: this is the logic of the game, this phase calculates for example points, coins, updates the logic of the game, updates the coordinates of the objects
    draw: after the coordinates of objects have been updated, the sprites have been changed, the sounds have been changed, the draw phase display the assets
1 Like
  • What is a game loop?
    It’s the heart of the game; it keeps the game running.
  • What phases does a game loop normally have?
    Initialize, update, and draw
  • What happens in each phase?
    Initialize - sets up the game
    Update - input is captured and processed
    Draw - code that manages and renders the images on screen

This type of system deals with state machines, a branch of engineering within a stochastic system.

[/quote]

2 Likes
  1. What is a game loop?

    • Loop is a centrale code in game, and it is a compose of three phase: initialize, update and draw.
  2. What phases does a game loop normally have?

    • initialize, update and draw.
  3. What happens in each phase?
    -> inizialize: this phase prepare game set up and the enviroment game for two next phase.

    -> Update: in this phase code capture input and information for output images… (Es. modifier
    Lifepoint, set damage and ecc…)

    -> draw: return all information in a output grapich.

1 Like
1

game loop is a controlled infinite loop that makes your game keep running it is the place where all the little pieces are updated and drawn on the screen.

2

initialize, update and draw

3

Initialise phase is used to do game setup and prepare environment for the update and draw phases here we create main entities, prepare menu, detect default hardware capabilities…

update phase is used to prepare all objects to be drawn, here we create physics code, health points, coordinate updates, damage dealt…

draw phase is where all the info is put on screen, here we create code for managing and drawing the levels, layers, chars, HUD…

1 Like
  1. Game loop is an infinite loop that makes the game keep running, which can wait on one or more events to trigger the movement to the next state
  2. Initialise, update, draw
  3. Initialise: is used to do any necessary game setup and prepare the environment
    update: is used to prepare all objects to be drawn such as coordinate updates, health points changes etc
    Draw: is where all updated information is put on the screen
1 Like