Jump to content

Leadwerks Editor SQL

Canardian

1,132 views

Today I wanted to start a GameLib tutorial series, and wanted to eliminate all temporary code and build the tutorial from beginning so that it will only expand and build on the previous tutorial steps.

 

Loading models and creating meshes programmatically is out of question, as you don't do that in real games. You would at least somehow have them loaded from a config file.

 

Then I thought I should put all assets into a Leadwerks Editor scene, but that won't work with real games either, as you can't save gamestates with sbx files. Well, you could have a small seperate gamesave file, but then you would need to load the sbx file each time and remove things which are not there anymore in a later gamestate.

 

Then I thought that having the assets in a sqlite database would work, as then I can just save changes into the database, and it would load much faster than a sbx file anyway, since it would load only assets in camera range. Of course the game should leave the original sqlite database unchanged, and rather use a copy of it. A combination of static scene dbs and dynamic scene dbs, and also partial scene dbs would work.

 

There's only a little problem using sqlite databases with LE: There is no visual 3D Editor for Leadwerks which can use sqlite databases! With sqlite3 there comes a handy table editor, but that's not enough for making game scenes.

 

As I'm working on a dynamic MMO also, and I wanted first to make the GameLib tutorial series to see that everything works, it seems I need to make a Leadwerks Editor SQL first. If my game uses sqlite scenes, the Editor would be needed also by team members who are working on the game content.

 

The first version of Editor SQL can be quite simple. You can place models in front of the camera, and then you can move/scale/rotate them with the cursor keys, including grid alignment. Scaling should be possible, if I study the phy file format a bit, and change the phy file according to the mesh's scale.



2 Comments


Recommended Comments

SQLlite has an R*Tree module for optimised spatial queries (http://www.sqlite.org/rtree.html ) which would be nice to have.

 

It would certainly add a lot more possibilities to making games with LE. All the issues you mention and more are ones I've had to resolve and find work-arounds for.

 

I don't have time to make an editor so what I was thinking to save time was adding an 'in-game' paintbox to stick objects (dynamic veg and ground clutter) into the database.

Link to comment

//Scaling should be possible, if I study the phy file format a bit, and change the phy file according to the mesh's scale.

 

this should be great :)

 

btw, looking like i can help with writing tutorial on Rick's RakNet old demo.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...