RootSoft's Game Engine Library Beta!
---------------------------------------------------------
---------------------------------------------------------
I. Introduction
I'm proud to introduce my beta version of my new RSGameEngine Library!
This library tries to make Game Development a lot EASIER with Basic4Android.
The library is completely written by myself with credits to thedesolatesoul and NJDude!
With only 50 lines of code I wrote a sample that controls an ANIMATED 3/4 view (zelda like) - character with a GUI.
Note that this is still an early beta version and might contains bugs!
---------------------------------------------------------
II. Usage
The library is very easy to use and there are 6 classes available so far.
B4X:
Dim GameEngine As RSGameEngine
Dim GameConstants As RSGameConstants
Dim sprMain, sprLeft, sprUp, sprDown As RSGameSprite
Dim objMain As RSGameObject
Dim Effects As RSGameEffects
Dim GameAudio As RSGameAudio
1. RSGameEngine.
The RSGameEngine is the base engine of the class. This takes care of the DrawingPanel and objectplacing so far. Later it will support saving, loading, etc.
The DrawingPanel is the panel where your game is playing. Objects can be placed here. This is a normal panel that can be used in Basic4Android.
2. RSGameSprite.
Sprites are the images in a game. In the RSGameSprite class you can specify a spritesheet (1 row) in a bitmap. GameSprites have no actions, you can however get data like number of frames, get width, height, etc.
3. RSGameObject.
An RSGameObject is an object on the DrawingPanel. These can be placed on the panel with RSGameEngine.PlaceObject. GameObjects are deliverd in an ImageView. So you can set a bitmap in it, specify it's X and Y position and more variabeles and actions like levels, hitpoints, mirroring, flipping, .... (Note that the X and Y are like Top and Left of an imageview. These are NOT the centre of the Image but the top left corner.)
4. RSGameEffects.
GameEffects can be binded with GameObjects. Doing this you can easily control the Object like moving, animation, etc. Physics for platformer games will be added.
5. RSGameAudio.
RSGameAudio is the audio used in the game. Currently it only supports MediaPlayer, but SoundPool will be added in a next version. We recommend to use MediaPlayer for background music and Soundpool for sound effects.
6. RSGameConstants.
These are constants used in the game like FACING_LEFT, FACING_RIGHT. These can come in handy if you want to know where a charachter is facing at.
---------------------------------------------------------
III. Library Files & Sample
The library files doesn't need ANY permission!
Download the zip file and extract the RSGameEngine.jar and RSGameEngine.xml to your additional library folder and check them in the library tab in the Basic4Android IDE.
A sample is included with a character than can walk. The code is commented so you can understand the code. The sample is designed for 854*480 screen resolutions! The sample is delivered with 1 audiofile and multiple sprite(sheets)! You cannot use them in commercial products! We are not responsable!
Download the sample here: http://www.rootsoftllc.com/Basic4Android/RSGameEngineSampleBeta1.0.zip
A more reliable sample is downloadable here: http://www.b4x.com/forum/additional...e-beta-game-development-easy-3.html#post94453
Library files are in the attachments of the forum.
---------------------------------------------------------
IV. Spritesheets
The RSGameEngine supports single rows spritesheets.
I'm recommending GameMaker Standard(Lite version or Pro) or GraphicsGale to create your .png spritesheets.
With GameMaker you can easily add sprite, see the animation, extract a spritesheet and save them as a spritesheet to use in RSGameEngine Library.
---------------------------------------------------------
V. Credits
Credits are NOT necessary, but it is allowed. If you do give credits, mention RootSoft - Mobile Application Development
---------------------------------------------------------
Kind regards,
Tomas
Attachments
Last edited: