Hello all, been a while since I started a WIP. Well this is my latest one, and it's about an engine I am working on for the release of the DarkGDK.
JemEngine
Currently, the engine only consists of about 1.5 components, but it's still worthy of a WIP, because they are large components and are helpful. I will add to the list of features through time:
List of features:
- OOP DarkGDK programming in C++
- JemScript Scripting System
- OOP DarkGDK:
The OOP DarkGDK was also posted in the DarkGDK section, but I have changed a few things around here and there, just to make it more Jem-ish.
- JemScript:
Ok, I will be doing most of the explaining here for now, since this is the component I have been working on the longest (I have only been working on it specifically for this engine a short while, but actually working on a scripting system: over a year).
It's features include:
- C-Style syntax
- Functions
- Variables
- Arrays (with linked lists capabilities)
- Control structutes ("if" and "do" so far )
- A total of 4 built in commands!!!!! (...so far)
- Typecasting (despite it being weakly typed)
- Ability to pass arrays to and from functions
- Speed
Here is a simple example:
// Display an array
function display( var msg[0] )
{
// Counter
var counter = 0;
// Loop
do
{
// Display array
print msg[counter];
// Inc counter
counter = counter + 1;
// If counter > count
if ( counter > ( sizeof( msg ) - 1 ) )
{
// Break
break;
}
}
}
// Main entry point
function main( )
{
// Create an array and add words
var arr[0];
push arr, "why";
push arr, "does";
push arr, "this";
push arr, "totally";
push arr, "rock?";
// Display
display( arr );
}
It starts by calling the function main() (which parameters can also be passed to). It then creates a blank array, and pushes some messages onto it (linked list stuff). Then, it calls the display() function, and passes the whole array to it (take that DB!). The display() function loops through the array, and breaks when it's finished.
I still have to add a whole range of commands to make it any sort of useful. So far, there is only print, push, pop, and empty.
I will keep posting updates to this as I go along. By tonight or tomorrow there should be some ability for 2D graphics
Comments and critics are welcome (and encouraged.. I hate starting threads that get 0.01 replies)
Cheers
[Update: 15 Dec]
- Started adding DGDK functions to scripting engine: dbSync(), dbSyncOn(), dbSyncRate(), dbKeyState() and dbBox().
- Project handler: Loads Jem project files (for scripting)
- Preprocessor: So far, ability to include files in the local dir, and the project's "root" dir, which is accessible from anywhere.
- Standard library: Simple functions as of yet.