Newswire
Features
Connection
Job Search
Directories

by Nick Bobic
Gamasutra
March 30, 2000

This article originally appeared in the
May 1999 issue of:

Printer Friendly Version

Features

Listing 1. Extremely Simplified Game Loop

while(1){
    process_input();
    update_objects();
    render_world();
}

update_objects(){
    for (each_object)
        save_old_position();
        calc new_object_position 
             {based on velocity accel. etc.}
        if (collide_with_other_objects())
             new_object_position = old_position();
             {or if destroyed object remove it etc.}

}

________________________________________________________

Back to Article

Home   JoinHelpContact UsShop
 


Home | Join | Help | Contact Us | Shop | Newswire | Site Map
Write for Us | Features | Connection | Job Search | Directories


Copyright © 1999-2000 Miller Freeman Inc. All rights reserved.
Privacy Policy

Miller Freeman Game Group: GDC, GDMag, IGF Independent Games Festival Game Developer Magazine Game Developers Conference