Thread: Game layout..

  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    102

    Game layout..

    I'm searching for the best Game layout using windows. Currently I haven't found a layout that enables me to do everything I need(Rendering different things and handling different stuff at different times) while maintaing the windows message procedure. I need to be able to handle and receive messages constantly, so I can't have any real while loops inside of the windows main while loop, or it crashes.
    I was thinking of having a switch statement inside of the main while loop with variables that handle different parts of my games.(Opening Menu, Level rendering, Credit Rendering etc..). If anyone could please post their thoughts on the best way to handle windows messages while still having ability to change what's rendered and the variables present constantly.
    My Favorite Programming Line:
    Code:
    #define true ((rand() % 2) ? true : false)

  2. #2
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    You'd need to use windows api, or some windowing framework. If You're using OpenGL they have GLFW, GLUT, and you can set callback functions - for what to do when the loop is idle(animatinon would go there), when you press a key or move the mouse- before you initialize the framework's main loop, which uses these callbacks to handle the window.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do the game engine and the api interact?
    By Shadow12345 in forum Game Programming
    Replies: 9
    Last Post: 12-08-2010, 12:08 AM
  2. Open-source Game Project
    By Glorfindel in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 03-24-2009, 01:12 AM
  3. Open Source / Semi Open source game idea. Help needed
    By CaptainPatent in forum Projects and Job Recruitment
    Replies: 10
    Last Post: 05-16-2007, 10:44 AM
  4. game engine advice?
    By stien in forum Game Programming
    Replies: 0
    Last Post: 01-23-2007, 03:46 PM
  5. My Maze Game --- A Few Questions
    By TechWins in forum Game Programming
    Replies: 18
    Last Post: 04-24-2002, 11:00 PM