Jump to content
  • Advertisement
Sign in to follow this  
jopy

anglescript , getting started ? ...

This topic is 3087 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

Hello , I want to use anglescript for a game I'm making (I use linux). Im trying to integrate anglescript , but every tutorial I can find is either so deeply bound to windows of is so poorly coded that I cant get it into a usable state. Can somone point me in the right direction and post a bit example code (not bound to windows by headers , ect ...) that loads and executes more than one script ? thanks Jason White more info: I chose anglescript because its free and is almost exactly the same as C/C++. Id like to have scriptable objects to allow me or even a user to create a very dynamic level/enemy/whatever while not being bounded by whats hardcoded in the game already. [Edited by - jopy on April 11, 2010 5:13:22 PM]

Share this post


Link to post
Share on other sites
Advertisement
Erm, don't take this too harshly, but I get the sense that if you can't isolate the Angelscript library examples from the application wrapper that directs them you probably aren't (yet) in the position to be using the library to begin with-- performing app bindings is a fairly involved process that requires some (admittedly basic) knowledge of C++ calling conventions.

Really, it's all of maybe 8 C++ function calls to load, compile and run scripts. asCreateScriptEngine(), asIScriptEngine::GetModule(), asIScriptModule::AddScriptSection(), asIScriptModule::Build(), asIScriptEngine::CreateContext(), asIScriptModule::GetFunctionIDByX/asIScriptEngine::Prepare() and finally asIScriptEngine::Release() when you're done. The rest is dependent on how comprehensive you want your AngelScript->C++ bindings to be and the specific way in which you want to handle the scripting of objects.

That being said, the included documentation is actually very good. Look in the docs subdirectory of the main AngelScript library folder. Examining the behaviors of the functions I mentioned above would probably be a good starting point, and you should be able to pick up most usage caveats/examples by looking at the samples in the documentation and the source code for the standard extensions package.

EDIT: Whoops, I lied about function count. Fixed.

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!