Hello,
I decided to make a WIP on my latest project to show everyone what I’ve been up to the last couple months. It’s a game engine that at the moment is named the Tabulara Engine (Tabula Rasa Software is the unofficial name I use for what I make, so I shortened it to Tabulara for the engine).
The Tabulara Engine is a collection of “modules” containing functions related to that module to make game development easier. I started making it because I was never able to work on one project at a time, so I have a bunch of half-finished projects sitting around. So I decided to make a game engine that could be used to make creating all of them easier. The engine will probably be used to create both the games and editors for the games. I’m not sure if I’ll actually ever release the engine’s source itself, but I’ll hopefully be releasing what I make with it, which could include game editors for modding the games made with it.
Anyways, enough talking, here’s a list of the current modules and their estimated progress:
3D - 90%
AI – 10%
animation – 50%
camera – 90%
class – 90%
config – 70%
debug – 100%
entity – 75%
entityEdit – 50%
file – 90%
font – 90%
HUD – 25%
Image – 90%
Input – 75%
Interact – 50%
Inventory – 75%
Linkedlist – 100%
Network – 75%
Npc – 10%
Object – 90%
Parser – 90%
Particles – 75%
Physics – 75%
Player – 50%
Script – 50%
Sound – 50%
Terrain – 75%
Toolbar – 90%
Vehicle – 10%
Weapon – 50%
Windows – 90%
I have several games I’m planning to make with it:
-
Pirates of Port Royale
-Pirates of Port Royale World Editor
-
Modern Conflict
-Post-Apocalyptic Co-Op Zombie RPG
-Police Game
The problem at the moment is it’s difficult to show most of the features, because (as you can tell by the module names) it’s hard to show many of them because they handle a lot of behind the scenes stuff (which is really the point of the engine – to make all of that stuff easier). I'll make some more progress videos soon, but here's 3 to start with, along with the code that was required to make them using the modules I've created (to show how relatively simple it is):
Physics
Required Code:
gosub includes
TRS_debug_init( 10, "wipdemo2" )
TRS_3D_init(10000)
TRS_3D_simple( 1, "data/shared/textures/grass.jpg", 0 )
TRS_camera_setupFirstPerson( 1, 60, 0, 0, 10, -.05, .5 )
TRS_class_create(1,"Humvee","Vehicle","data/models/vehicles",1000)
TRS_entity_create(1,"Player Humvee","Humvee")
TRS_entity_load(1,"Player Humvee",1)
TRS_entity_position(1,"Player Humvee",10,50,0)
TRS_class_create(2,"Colt 45","Gun (Pistol)","data/models/guns",1000)
TRS_entity_create(2,"Player Weapon","Colt 45")
TRS_entity_load(2,"Player Weapon",0)
TRS_entity_position(2,"Player Weapon",10,100,0)
TRS_class_create(3,"AK-47","Gun (Rifle)","data/models/guns",1000)
TRS_entity_create(3,"AK-47","AK-47")
TRS_entity_load(3,"AK-47",0)
TRS_entity_position(3,"AK-47",-50,100,0)
TRS_class_create(4,"Police Car","Vehicle","data/models/vehicles",1000)
TRS_entity_create(4,"Police Car","Police Car")
TRS_entity_load(4,"Police Car",1)
TRS_entity_position(4,"AK-47",100,10,0)
TRS_class_create(5,"Crate 1","Container","data/models/objects",10)
TRS_entity_create(5,"Crate 1","Crate 1")
TRS_entity_load(5,"Crate 1",1)
TRS_entity_position(5,"Crate 1",40,10,0)
TRS_class_create(6,"Desk","Object","data/models/objects",8)
TRS_entity_create(6,"Desk","Desk")
TRS_entity_load(6,"Desk",1)
TRS_entity_position(6,"Desk",-100,0,0)
TRS_physics_init(1000)
TRS_physics_setupSimple(1000,"data/shared/textures/grass.jpg")
TRS_physics_setupObject( 1, 2000, 1 )
TRS_physics_setupObject( 2, 10, 0 )
TRS_physics_setupObject( 3, 10, 0 )
TRS_physics_setupObject( 4, 1000, 1 )
TRS_physics_setupObject( 5, 50, 0 )
TRS_physics_setupObject( 6, 60, 0 )
do
TRS_camera_update()
TRS_input_update()
TRS_entity_update()
TRS_physics_update()
TRS_physics_debugButton( 29 )
TRS_physics_freeGrab( 260 )
TRS_HUD_crosshair( 250, 220, 10, 255, 20 )
loop
includes:
#include "includes/TRS_HUD.dba"
#include "includes/TRS_debug.dba"
#include "includes/TRS_physics.dba"
#include "includes/TRS_class.dba"
#include "includes/TRS_entity.dba"
#include "includes/TRS_input.dba"
#include "includes/TRS_3D.dba"
#include "includes/TRS_camera.dba"
return
Destruction
Required Code:
gosub includes
TRS_debug_init( 10, "wipdemo3" )
TRS_3D_init(10000)
TRS_3D_simple( 1, "data/shared/textures/grass.jpg", 1 )
TRS_camera_setupFree( 1, 0, 100, 0 )
TRS_class_create(0,"House","Building","data/models/buildings",7)
firstBuilding = TRS_entity_create(0,"Destroy Building","House")
TRS_entity_load(0,"Destroy Building",1)
TRS_structure_setup( 1, firstBuilding )
TRS_structure_load( 1 )
secondBuilding = TRS_entity_create(0,"Destroy Building 2","House")
TRS_entity_load(secondBuilding,"Destroy Building 2",1)
TRS_entity_position( secondBuilding, "Destroy Building 2", 200, 0, 0 )
TRS_structure_setup( 2, secondBuilding )
TRS_structure_load( 2 )
TRS_particles_setupSmoke( "modules/smoke.png", 1.8 )
do
TRS_structure_update()
TRS_camera_update()
TRS_input_update()
TRS_entity_update()
TRS_particles_update()
loop
includes:
#include "includes/TRS_debug.dba"
#include "includes/TRS_input.dba"
#include "includes/TRS_entity.dba"
#include "includes/TRS_class.dba"
#include "includes/TRS_3D.dba"
#include "includes/TRS_camera.dba"
#include "includes/TRS_structure.dba"
#include "includes/TRS_object.dba"
#include "includes/TRS_particles.dba"
return
User Interface - Windows and Toolbars
Required Code:
gosub includes
TRS_debug_init( 10, "wipdemo" )
TRS_3D_init(10000)
TRS_3D_simple( 1, "data/shared/textures/grass.jpg", 1 )
TRS_camera_setupFree( 1, 0, 100, 0 )
`create windows
TRS_window_init()
TRS_window_create( 1, "Window 1", 100, 100, 200, 300, 0 )
TRS_window_addButton( 1, 1, "Input Field", 10, 30, 180, 20 )
TRS_window_setCanInput( 1, 1, 1 )
TRS_window_addButton( 1, 2, "Click Me!", 30, 60, 150, 20 )
TRS_window_setButtonText( 1, 2, "Click Me!", 1 )
TRS_window_addLabel( 1, 1, "Checkbox:", 10, 90, design_Text_font, 0 )
TRS_window_addCheckbox( 1, 3, 90, 88, 20, 20 )
TRS_window_addTextBox( 1, 4, "This is a text box.", 10, 120, 180, 80 )
TRS_window_setCanInput( 1, 4, 1 )
TRS_window_addList( 1, 5, "Non-Interactive List`Element 1~Element 2~Element 3~", 10, 210, 180, 80, 0 )
TRS_window_create( 2, "Window 2", 400, 100, 200, 500, 0 )
TRS_window_addTree( 2, 10, 30, 180, 460 )
TRS_window_addTreeCategory( 2, "Category", "Category Value", 0 )
TRS_window_addTreeElement( 2, "Element", "Element Value", 1 )
TRS_window_addTreeElement( 2, "Element 2", "Element Value 2", 1 )
TRS_window_addTreeElement( 2, "Element 3", "Element Value 3", 1 )
TRS_window_addTreeCategory( 2, "Subcategory 1", "Category Value 2", 1 )
TRS_window_addTreeElement( 2, "Element 4", "Element Value 4", 2 )
TRS_window_addTreeElement( 2, "Element 5", "Element Value 5", 2 )
TRS_window_addTreeElement( 2, "Element 6", "Element Value 6", 2 )
TRS_window_addTreeElement( 2, "Element 7", "Element Value 7", 2 )
TRS_window_addTreeCategory( 2, "Subcategory 2", "Category Value 3", 1 )
TRS_window_addTreeElement( 2, "Element 8", "Element Value 8", 2 )
TRS_window_addTreeElement( 2, "Element 9", "Element Value 9", 2 )
TRS_window_addTreeElement( 2, "Element 10", "Element Value 10", 2 )
TRS_window_addTreeElement( 2, "Element 11", "Element Value 11", 2 )
TRS_window_addTreeCategory( 2, "Category 2", "Category Value 4", 0 )
TRS_window_addTreeElement( 2, "Element 12", "Element Value 12", 1 )
TRS_window_addTreeElement( 2, "Element 13", "Element Value 13", 1 )
TRS_window_addTreeElement( 2, "Element 14", "Element Value 14", 1 )
TRS_toolbar_init()
TRS_toolbar_addMenu( "File" )
TRS_toolbar_addMenuItem( "File", "New" )
TRS_toolbar_setShortcut( "File", "New", "ctrl+n" )
TRS_toolbar_addMenuItem( "File", "Save" )
TRS_toolbar_setShortcut( "File", "Save", "ctrl+s" )
TRS_toolbar_addMenuItem( "File", "Load" )
TRS_toolbar_setShortcut( "File", "Load", "ctrl+l" )
TRS_toolbar_addMenuItem( "File", "Exit" )
TRS_toolbar_setShortcut( "File", "Exit", "alt+F4" )
TRS_toolbar_completeMenu( "File" )
TRS_toolbar_addMenu( "Show" )
TRS_toolbar_addMenuItem( "Show", "Window 1" )
TRS_toolbar_addMenuItem( "Show", "Window 2" )
TRS_toolbar_completeMenu( "Show" )
do
gosub controlWindows
TRS_camera_update()
TRS_window_update()
TRS_toolbar_update()
TRS_input_update()
loop
controlWindows:
if TRS_toolbar_activated( "Show", "Window 1" ) = 1
if TRS_window_isVisible( 1 )
TRS_window_setVisible( 1, 0 )
else
TRS_window_setVisible( 1, 1 )
endif
TRS_toolbar_setActivated( "Show", "Window 1", 0 )
endif
if TRS_toolbar_activated( "Show", "Window 2" ) = 1
if TRS_window_isVisible( 2 )
TRS_window_setVisible( 2, 0 )
else
TRS_window_setVisible( 2, 1 )
endif
TRS_toolbar_setActivated( "Show", "Window 2", 0 )
endif
return
includes:
#include "includes/TRS_debug.dba"
#include "includes/TRS_input.dba"
#include "includes/TRS_windows.dba"
#include "includes/TRS_font.dba"
#include "includes/TRS_image.dba"
#include "includes/TRS_input.dba"
#include "includes/TRS_LinkedList.dba"
#include "includes/TRS_parser.dba"
#include "includes/TRS_toolbar.dba"
#include "includes/TRS_3D.dba"
#include "includes/TRS_camera.dba"
return
And what documentation I have done on the engine commands if anyone is interested:
debug
public
init( filenum, filename$ )
text( x, y, text$ )
basicDisplay( x, y )
output( text$ )
error( text$ )
time( name$ )
private
prereqs:
input
public
init()
update()
mouseOver( x1, x2, y1, y2 )
mouseClicked( x1, x2, y1, y2 )
notMouseClicked( x1, x2, y1, y2 )
update()
getKBInput()
private
debug(debugText$)
variables
mouseMoveX#
mouseMoveY#
mouseMoveZ#
mousePosX
mousePosY
mousePosZ
mouseClicked
releaseMouse
keystates()
resetSpace
resetEscape
resetCtrl
weapon
public
init()
find( classnumber )
free()
setEntity( entitynumber, weaponnumber )
create( weaponnumber, kind$, classnumber, damage )
defineEquip( weaponnumber, xoffset, yoffset, zoffset )
private
prereqs:
define:
double()
debug( debugtext$ )
entity
public
init()
reinit()
find( classnumber )
free()
setEntity( entitynumber, weaponnumber )
create( entitynum, classnum, name$ )
load( entitynum, name$, collision )
position( entitynum, entityname$, xpos, ypos, zpos )
rotate( entitynum, entityname$, xrotate, yrotate, zrotate )
addAnimation( entitynum, animationnum, entityname$, animationname$ )
animate( entitynum, animationnum, entityname$, animationname$, repeat, override )
stopAnimate( entitynum, animationnum, entityname$, animationname$ )
freeAnim( entitynum )
remove( entitynum, entityname$ )
getNum( entityname$ )
defineEquip( weaponnumber, xoffset, yoffset, zoffset )
private
prereqs:
define:
double()
debug( text$ )
debugPrint()
font
public
init()
addFont( fontNum, fontname$, size, special$ )
setColor( r, g, b, a )
text( fontNum, x, y, text$, align )
boxtext( fontNum, x, y, width, height, text$, alignh, alignv )
private
define:
freeFont()
debug( text$ )
script
public
init()
process( name$ )
execute( name$ )
private
processTag( fileNum, fileWrite, tag$ )
freeScrpt( start, finish )
findNum( name$ )
error( error$ )
debug( debugText$ )
physics
public
init( worldSize )
setupSimple( size, texture$ )
setupObject( num, mass#, kind )
setupPlayer( spd#, x#,y#, z#, rad#, mass# )
freeGrab( castDist# )
destroyObject( num )
debugButton( key )
update()
updatePlayer()
stop()
private
debug( text$ )
camera
public
init()
rotate( camx#, camy#, camz# )
setupFirstPerson( speed# x#, y#, z#, radius#, gravity#, slope# )
setupFree( speed#, startx#, starty#, startz# )
update()
private
debug( text$ )
updateFirstPerson()
updateFree()
INITIALIZATION:
TRS_window_init(): initiates variables needed for windows
TRS_window_reinit(): reinitiates variables needed for windows
window
public
creation
create( num, name$, x, y, xSize, ySize, canScroll )
addButton( num, button, text$, x, y, sizex, sizey )
addLabel( num, label, text$, x, y, font, align )
addCheckbox( num, button, x, y, sizex, sizey )
addTextBox( num, button, text$, x, y, sizex, sizey )
addList( num, button, items$, x, y, sizex, sizey, align )
addTree( num, x, y, sizex, sizey )
addTreeCategory( num, name$, value$, depth )
setCanInput( num, button, canIn )
creation-advanced
setDesign( design$, r, g, b, a )
setAlpha( num, alpha )
setLock( num, locked )
setButtonText( num, button, text$, align )
setLabelText( num, label, text$, align )
setVisible( num, set )
update
update()
data
getWindowOver( num )
getWindowClick( num )
getWindowClickNR( num )
getButton( num, button )
getOffButton( num, button )
textOn( num, button )
isVisible( num )
private
orderAdd( num )
move( num, x, y )
resize( num, x, y )
draw( num )
setInput( num, button )
isInput( num, button )
resetInput()
apply( num, button )
error( error$ )
debug( debugText$ )
toolbar
public
init()
addMenu( title$ )
addMenuItem( menu$, item$ )
completeMenu( menu$ )
actvated( menu$, item$ )
setActivated( menu$, item$, set )
setShortcut( menu$, item, hotkey$ )
update()
private
openMenu()
openMenuItem( menu$ )
findMenu( title$ )
findMenuItem( menu$, item$ )
selectionBox( x1, x2, y1, y2 )
updateMenu( title$ )
error( error$ )
debug( debugText$ )
I'll keep you posted on progress, just thought I'd go ahead and post a WIP to encourage me to keep working on it and to show off what I've done so far. Thanks for reading!