Jump to content
  • Advertisement
Sign in to follow this  
nopcoder

C++ like Script language

This topic is 4286 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
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:)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You may want to check out the "Nasal" scripting language, whose syntax is C/C++ oriented (ECMA-script based), however it isn't exactly "strongly typed"...

Share this post


Link to post
Share on other sites
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 =)

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.


//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();
}

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!