GBasic Engine Public Beta 2
Author: | LIJI
|
Submitted: | 18th January, 2007
|
Favourites: | 0 |
Genre: | Miscellaneous
| Downloads: | 241
|
Rated: |
|
|
Edited By LIJI on 1/19/2007
GBasic is a programming language made with MMF2, based on the powerful LUA extension, and used mainly for making games.
GBasic full will include a full code editor and a compiler to make exes.
ATM, this beta of the engine will ask you to choose a .GBS file (GBasic source) to run. Note that files used by the source code are relative to the GBasic engine exe file and NOT the source (this won't cause problems after the compiler is done and it can make EXEs).
GBasic functions that can be used in your game:
SYSTEM GROUP
repetition(times)
How many times should the GBasic engine run the main() function. should be used outside of any function for the first time. Can be called for more than 1 time. Enter -1 for endless loop. You can do repetition(0) at any time to stop the game. (Yet it will not close)
FPS(FPS)
Change the FPS (frames per seconds) of the game, defualt 100.
background(colorindex)
Clears the screen with colorindex. default background is black.
SPRITE GROUP
Creation and Destroying
sprite_create(id)
Creates a sprite with the id selected.
Note: You should never have 2 or more sprites with the same id.
The GBasic engine does allow it and won't stop the application, will not handle it currectly.
sprite_destroy(id)
Destorys the sprite with the selected.
sprite_image(id,image)
Loads an image to the sprite with the id selected.
sprite_exist(id)
Return 1 if the sprite with the id selected exist, 0 if not.
Handling
sprite_background(id)
Pastes the sprite to the background.
sprite_angle(id,angle)
Rotates the sprite by the angle selected.
sprite_quality(id,f)
Change the quality of resizing and rotating.
f=0 means simple.
f=1 means resampling.
sprite_hot(id,x,y)
Moves the hot spot to x,y.
sprite_width(id,width)
Changes the width of the sprite.
sprite_height(id,height)
Changes the height of the sprite.
sprite_x_pos(id,x)
Changes the sprite's X position.
sprite_y_pos(id,y)
Changes the sprite's Y position.
sprite_get_x_pos(id)
Returns the sprite's X position.
sprite_get_y_pos(id)
Returns the sprite's Y position.
sprite_set_value(id,key,value)
Sets value "key" (int) of the sprite "id" to "value".
sprite_get_value(id,key)
Returns value "key" (int) of the sprite "id".
MOUSE GROUP
mouse_x()
Reutrns the X position of the mouse relative the the window.
mouse_y()
Reutrns the Y position of the mouse relative the the window.
mouse_left_click()
Returns 1 if the left button is clicked (Clicked, NOT down), 0 if not.
mouse_right_click()
Returns 1 if the right button is clicked (Clicked, NOT down), 0 if not.
mouse_middle_click()
Returns 1 if the right button is clicked (Clicked, NOT down), 0 if not.
KEYBOARD
keyboard_key_pressed(key)
Returns 1 if the key with the key id `key` if it's pressed, 0 if not.
keyboard_key_down(key)
Returns 1 if the key with the key id `key` if it's down, 0 if not.
keyboard_get_key_id(keystring)
Returns the key id of keystring.
For example:
keyboard_get_key_id( "space" ) will return 32.
The download includes full commented example games of a breakout game and a card matching game. Have fun testing!
If you have any idea of more groups (Example: Sound) or more functions (Example mouse_left_button_down()), don't be shy and post it.
Review This Download
http://clickteam.info/neatwares/downloads/GBasic.zip (869 kkb )
|
|
LIJIFlava's Smarter Twin Registered 29/08/2006
Points 2032
Is this worth a look? Let others know! Favourite
|