🔒 Locked
C++ like Script language
Advertisement
Original Post
I have decided to go “Data-Driven”-design with my project and use a script language for game code. I’ve looked at Lua, Python, Ruby, AngelScript and UnrealScript (seems great, shame it’s not free). Except for the annoying lack of inheritance, AngelScript seems good. I’m mainly looking for a C++/Java syntax-like (strongly-typed and object-oriented) language that binds well with C++, suggestions are appreciated. Thank you. [Edited by - nopcoder on January 30, 2007 8:24:47 AM]
Look at the JNI (Java Native Interface). You may actually be able to use Java as a scripting language (I've never done this, nor am I sure it would work, but it would be pretty cool:)
Quote:
Original post by jflanglois
Have you looked at Squirrel with SQPlus?
Squirrel is not strongly-typed. It's a shame there aren't many strongly-typed scripts out there. It gives a great advantage (less error-prone, clearer and potentially faster code).
Quote:
Original post by sevensevens
Look at the JNI (Java Native Interface). You may actually be able to use Java as a scripting language (I've never done this, nor am I sure it would work, but it would be pretty cool:)
That would be cool, I'm looking in to it now =)
I'm working on a strongly-typed scripting language for games. It has quite a few features that have passed the proof of concept stage (but not too much past that).
But yeah, it's not finished... I just haven't had time to work on it.
Been in development for around 3 years on and off.
Anyway, I'm not really adding to the thread other than agreeing that the strongly typed aspect of scripting languages is lacking. I'm an advocate for strongly typed everything.
[Edited by - umbrae on February 15, 2007 2:03:57 PM]
But yeah, it's not finished... I just haven't had time to work on it.
Been in development for around 3 years on and off.
Anyway, I'm not really adding to the thread other than agreeing that the strongly typed aspect of scripting languages is lacking. I'm an advocate for strongly typed everything.
[Edited by - umbrae on February 15, 2007 2:03:57 PM]
Python. You can integrate c++ seamlessly with it.
What I'd like to see is a scripting language with ML-like static typing and type inference... Screw stronly typed... [lol]
I'm working on a typeless (variables are stored as strings and converted to numbers, pointers, etc. as needed) language for my engine. It's called VulcanScript and seems to be working pretty good so far.
I can't give out source - it's not even finished yet - but I can give you some technical details and partial code samples if you email me at webmaster@t104.org.
I can't give out source - it's not even finished yet - but I can give you some technical details and partial code samples if you email me at webmaster@t104.org.
//Scripted routines for Clubhouse map//PlayRandomAmbientSound(pTrigger)function PlayRandomAmbientSound{ //Get a pointer to our trigger (spawn point) and verify it var pTrigger=params[0]; Assert(IsValidPtr(pTrigger)); //Pick a random sound var num=RandomNumber(); num=num%3; var sound_id=""; if(num==0) { //No sound played in this case return 0; } if(num==1) { sound_id="s-clubhouse.ambient.phonering"; } if(num==2) { sound_id="s-clubhouse.ambient.truckpassby1"; } //Create the actor var pActor=CreateActor("AmbientSound",pTrigger->pos.x,pTrigger->pos.y,pTrigger->pos.z); //Set its properties pActor->sound=sound_id; pActor->soundvol=0.3; pActor->looping=0; pActor->ResetSound();}
Angelscript. Strongly typed and quite C++ like.
Might I suggest GameMonkey Script.
From the site:
From the site:
- Small code base. Compiled code may use about 50kb of RAM. Less when tweaking or sharing with application.
- Compile source code at run time, or link to precompiled libs.
- Lightweight, native threading.
- Soft real-time incremental garbage collection. Controllable memory footprint.
- No painful reference counting.
- Easy to bind C\C++ functions and call script from C\C++.
- Runtime debugging and reflexion support.
- C style syntax.
- Competitive performance when compared to other scripting languages for both CPU and Memory usage. Speed is a trade off for flexibility and simplicity.
- Easily modifiable as it is written in C++ and uses Flex and Bison.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement