Blox Game Engine:Tutorials:Basics
From GPWiki
The wiki is now hosted by GameDev.NET at wiki.gamedev.net. All gpwiki.org content has been moved to the new server. However, the GPWiki forums are still active! Come say hello. [edit] IntroductionThis tutorial will explain the basics of the Blox Game Engine such as Sprites, Textures, Fonts, Sounds, Colors and Scenes. I am assuming that you have the latest version of the Blox Game Engine. [edit] ScenesEverything that you want rendered to the screen must be in a graphics scene. This allows for batching the entire scene at once to the video card, for much much faster rendering speed. There are currently 6 methods in the video driver class that are associated with scenes. They are: ClearScene(BGECOLOR color); BeginScene(); EndScene(); PresentScene(); StartScene(); StopScene(); I will explain each one. ClearScene(BGECOLOR color); This clears the backbuffer to a specific color, clearing any data(images, drawings, fonts) that is currently on it. This is should be called every frame. BeginScene(); This begins a scene. All of your rendering should be inbetween the BeginScene() and the EndScene() methods. EndScene(); This stops a scene. All of your rendering should be in-between the BeginScene() and the EndScene() methods. After this method is called, you most likely will want to call PresentScene(). |


