[ !!! still being written !!! ]
bee engine is a 3d game engine, probably used best for less intense projects and defenitely don't use it for commercial purposes.
I didn't make the gravity runtimeinterpreter, it can be found here. the creators of gravity also have provided documentation for the swift like language which i encourage you take a look at before reading further here about bee engine specific functions and what they do.
as gravity does dynamic typing, aka. the variables seemingly have no type, when number is given as an argument or return type, that means integer or floating-point will work.
- example
- entity interface
- world interface
- input interface
- game interface
- ui interface
- collision interface
// import the diffent interfaces for the engine
extern var Entity;
extern var World;
extern var Game;
extern var Input;
extern var UI;
// variables, dynamically typed
var check;
var btn = false;
// called once at startup
func init()
{
System.print("hello, world");
}
// called every frame
func update()
{
// these vars expose the functions hooked into bee engine
var this = Entity();
var world = World();
var game = Game();
var input = Input();
var ui = UI();
// ---- code ----
var enemy = world.get_entity("enemy");
if (input.get_key_ENTER())
{
var speed = 2 * game.get_delta_t();
this.move_y(speed);
world.move_y(enemy, speed);
game.load_level("good_level");
}
// in game "immmediate mode ui", wrapper for nuklear ui
ui.begin();
if (ui.window_begin("in game nuklear ui", 900, 10, 300, 250))
{
ui.layout(25, 1);
if (ui.button("button"))
{
btn = !btn;
}
if (btn)
{
ui.layout(25, 2);
ui.text("checkbox describtion");
check01 = ui.checkbox("option a", check);
ui.layout(25, 1);
}
} ui.window_end();
ui.end();
}
brief overview
extern var Entity(); // import
func init()
{
var this = Entity(); // accessing
this.move_x(1); // usage
}
number Entity.get_x()
get the position on the x axis of the entity the script is attached to.
number Entity.get_y()
get the position on the y axis of the entity the script is attached to.
number Entity.get_z()
get the position on the z axis of the entity the script is attached to.
Entity.move_x(number distance)
moves the entity the script is attached to by the distance given on the x axis.
Entity.move_y(number distance)
moves the entity the script is attached to by the distance given on the y axis.
Entity.move_z(number distance)
moves the entity the script is attached to by the distance given on the z axis.
number Entity.get_rot_x()
get the rotation on the x axis of the entity the script is attached to, in degree.
number Entity.get_rot_y()
get the rotation on the y axis of the entity the script is attached to, in degree.
number Entity.get_rot_z()
get the rotation on the z axis of the entity the script is attached to, in degree.
Entity.rot_x(number degree)
rotates the entity the script is attached to by the degrees given on the x axis.
Entity.rot_y(number degree)
rotates the entity the script is attached to by the degrees given on the y axis.
Entity.rot_z(number degree)
rotates the entity the script is attached to by the degrees given on the y axis.
not finished
number Entity.get_scale_x()
get the scale of the entity the script is attached to on the x axis.
not finished
number Entity.get_scale_y()
get the scale of the entity the script is attached to on the y axis.
not finished
number Entity.get_scale_z()
get the scale of the entity the script is attached to on the z axis.
not finished
Entity.scale_x(number degree)
scale the entity the script is attached to by the degrees given on the x axis.
not finished
Entity.scale_y(number degree)
scale the entity the script is attached to by the degrees given on the y axis.
not finished
Entity.scale_z(number degree)
scale the entity the script is attached to by the degrees given on the z axis.
brief overview
extern var World(); // import
func init()
{
var world = World(); // accessing
world.get_entity("entity"); // usage
}