|
vbjaengine_programmer_s_guide 06.10.2011 |
vbjaengine_programmer_s_guide 06.10.2011 current |
| - | **VBJAENGINE PROGRAMMER's GUIDE** | |
| - | | |
| - | | |
| - | | |
| | ====== Overview ====== | | ====== Overview ====== |
| | The vbJAEngine has been developed to fill the gap between the developer's game logic and the hardware management required to produce visual and audio results on the Nintendo Virtual Boy. The engine is a sprite based engine, which takes care of all the work necessary to display user defined sprite images on screen, allocating graphical and CPU's memory to hold the definitions of such images. | | The vbJAEngine has been developed to fill the gap between the developer's game logic and the hardware management required to produce visual and audio results on the Nintendo Virtual Boy. The engine is a sprite based engine, which takes care of all the work necessary to display user defined sprite images on screen, allocating graphical and CPU's memory to hold the definitions of such images. |
| | Notice the kDead enum, which tells the engine to not load the Entity again if it is within the screen range. | | Notice the kDead enum, which tells the engine to not load the Entity again if it is within the screen range. |
| | | | |
| - | ===== The Game's StateMachine ===== | + | ====== The Game's StateMachine ====== |
| | | | |
| | The Game itself has a StateMachine to hold the actual state of it and execute the proper logic. So after creating the game, and before entering the game's infinite loop, it must enter a valid state: | | The Game itself has a StateMachine to hold the actual state of it and execute the proper logic. So after creating the game, and before entering the game's infinite loop, it must enter a valid state: |
| | Notice that the total cols and rows which represent the image's size, are 8's divisors since each char is 8 pixels wide and 8 pixels height. | | Notice that the total cols and rows which represent the image's size, are 8's divisors since each char is 8 pixels wide and 8 pixels height. |
| | | | |
| - | ===== Creating Animations ===== | + | ====== Creating Animations ====== |
| | | | |
| | Characters are used to represent Entities which have certain animations and which can move inside the Stage. In order to provide a Character with an animation it must be defined as follow: | | Characters are used to represent Entities which have certain animations and which can move inside the Stage. In order to provide a Character with an animation it must be defined as follow: |
| | | | |
| | | | |
| - | ===== Animation allocation types ===== | + | ===== Animation allocation types ===== |
| | | | |
| | Since there can be Characters with many frames of animations like Mario, and Characters with simple animations like Koopas, there is a need to allocate each kind in different ways. | | Since there can be Characters with many frames of animations like Mario, and Characters with simple animations like Koopas, there is a need to allocate each kind in different ways. |