.plan
The engine has a clever name: Enginue (pronounced ingenue). Its using an extended Lua interpreter, which we might even call Luanne just to keep with the feminine naming conventions. I would like Lua to be a rather thick wrapper on the very thin, simple C ++ code. A typical session would go:
[Launch Enginue]
* Enginue executes autoexec.lua
* This configures the screen, starts up the naked engine, registers a splash screen task
at this point autoexec would 1) pass control to another script which sets up other tasks or 2) call a function called enginue.console which will give the user a command line console. The user should be able to do things like:
>> print(engineu.ls_section_types());
['ODE','classic']
>> s = enginue.section('ODE');
>> s = enginue.activate_section(s);
These two lines should create a new section and make it the active section. A section corresponds to a single continuous area in blue_arizona (or any other game). A section should be of extensible type, that is, we should be able to support many different kinds of sections. Tile based sections, with tile based collision detection, and ODE based sections with ODE based collition detection, should be the first supported. We should be able to do things like:
>> polygon = { xpts = [0 0 1 1], ypts = [0 1 1 0], visible=true, type=SOLID };
>> id = s:add_polygon(polygon);
And a nice, blue, solid polygon should appear in at the position which you set.
The interpreter should expose placement of objects, their types, how they interact with the physics engine, how they react when collided with (which I think will be decided via Lua scripts)
the placement of the player, what abilities the player has (powerups), perhaps whether the little man is in the ship or not, if we decide to go that way. You should also be able to do something like:
>> callback = { toid = id; section = s; function call() { p = s:rm_polygon(id) } }
>> polygon2 = { xpts = [2 2 3 3], ypts = [2 3 3 2], visible=true, type=TRIGGER, callback = callback };
>> id2 = s:add_polygon(polygon2);
So that triggers, which are handled by the engine, be written in lua and registered with the engine. This way, its even possible we could write C++/C scripting functions, compile them, link them at runtime with Lua and do something like:
>> fastscripts = loadlib("fastscripts","lua_open_fastscripts")
>> polygon2 = { xpts = [2 2 3 3], ypts = [2 3 3 2], visible=true, type=TRIGGER, callback = fastscripts.cpp_callback };
Thats enough for now!
[Launch Enginue]
* Enginue executes autoexec.lua
* This configures the screen, starts up the naked engine, registers a splash screen task
at this point autoexec would 1) pass control to another script which sets up other tasks or 2) call a function called enginue.console which will give the user a command line console. The user should be able to do things like:
>> print(engineu.ls_section_types());
['ODE','classic']
>> s = enginue.section('ODE');
>> s = enginue.activate_section(s);
These two lines should create a new section and make it the active section. A section corresponds to a single continuous area in blue_arizona (or any other game). A section should be of extensible type, that is, we should be able to support many different kinds of sections. Tile based sections, with tile based collision detection, and ODE based sections with ODE based collition detection, should be the first supported. We should be able to do things like:
>> polygon = { xpts = [0 0 1 1], ypts = [0 1 1 0], visible=true, type=SOLID };
>> id = s:add_polygon(polygon);
And a nice, blue, solid polygon should appear in at the position which you set.
The interpreter should expose placement of objects, their types, how they interact with the physics engine, how they react when collided with (which I think will be decided via Lua scripts)
the placement of the player, what abilities the player has (powerups), perhaps whether the little man is in the ship or not, if we decide to go that way. You should also be able to do something like:
>> callback = { toid = id; section = s; function call() { p = s:rm_polygon(id) } }
>> polygon2 = { xpts = [2 2 3 3], ypts = [2 3 3 2], visible=true, type=TRIGGER, callback = callback };
>> id2 = s:add_polygon(polygon2);
So that triggers, which are handled by the engine, be written in lua and registered with the engine. This way, its even possible we could write C++/C scripting functions, compile them, link them at runtime with Lua and do something like:
>> fastscripts = loadlib("fastscripts","lua_open_fastscripts")
>> polygon2 = { xpts = [2 2 3 3], ypts = [2 3 3 2], visible=true, type=TRIGGER, callback = fastscripts.cpp_callback };
Thats enough for now!
0 Comments:
Post a Comment
<< Home