Toasty Update #9

Published January 28, 2014
Advertisement
Hey guys!

The lack of recent updates was because I was travelling with my partner, we went to many places but the main event was Las Vegas new years, which was insane!

So, I've been back for a few days and I'm ready for another update in this one I have added a basic AngelScriptSystem, which is pretty interesting.

The angelscript system has a few cool features, the first being you can provide a main file to use which will make AngelScript your main entry point, this means your entire game needs to be in AngelScript rather than C++. The second is that you can add behaviour scripts to an entity, this should work exactly like Unity.

At the moment only the first feature is in place and I am still attempting to register all the methods and functions! But check it out:void main(){ print("Hello world\n"); print(1+1); print("Creating an entity!\n"); Entity@ ent = Entity(); print("The default name of this entity is: "); print(ent.GetName()); print("\n"); print("Setting the name to something else...\n"); ent.SetName("NathansEntity"); print("New name is: " + ent.GetName() + ".\n"); GameSystem testSystem; testSystem.AddEntity(ent); print("Starting the loop in...\n"); DoCountdown(5); while(true) { testSystem.Tick(); print(testSystem.GetFPS()); }}void DoCountdown(int a){ for( int n = 0; n < a; n++ ) { print(a-n+"\n"); WaitForSeconds(1); } print("Go!\n");}
The C++ is literally just this:#include "AngelScriptSystem.h"//Commented like a newb.int main(int argc, const char* argv[]){ Toasty::AngelScriptSystem* system = new Toasty::AngelScriptSystem(nullptr, "main.as"); delete system; return 0;}
This script results in the following:

AngelScript1.PNG
AngelScript2.PNG

The only issue is the fact that Toasty is modular which means I have to make a choice, does the angelscript system know about every other system or does every other system know about angelscript? Not sure at the moment, but as I think on it more I am sure I'll come to a conclusion.
Previous Entry Toasty Update #8
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Dimins V2018.2

1814 views

Dimins V2018.1

2326 views

Octree Voxel Planet

3834 views

Toasty Update #9

2267 views

Toasty Update #8

2058 views

Toasty Update #7

2134 views

Toasty Inspiration

2054 views

Toasty Update #6

1852 views

Toasty Update #5

1954 views
Advertisement