Jump to content

  • Log In with Google      Sign In   
  • Create Account

- - - - -

How do you use AngelScript?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Desdemona   Members   -  Reputation: 158

Like
Likes
Like

Posted 03 June 2004 - 04:03 PM

I just finished my current project, so I have just been looking back at how I used things like AngelScript, and thinking about what might be a better approach for other projects. My engine was single threaded. During each pass through the engine''s update loop, I would ExecuteStep on each script that was running. That made it so each script essentially ran concurrently. I actually called ExecuteStep on each script a bunch of times during each pass, just so it would speed up their execution. My question is, how does everyone else deal with integrating AngelScript with their project? I was thinking about how multithreading with AS might work. I''m sure that I would need to protect the call to asIScriptEngine::CreateContext with some form of critical section, but can two contexts be running in seperate threads without crashing AS?

Sponsor:

#2 meink   Members   -  Reputation: 133

Like
Likes
Like

Posted 03 June 2004 - 06:32 PM

In my project I have no need for concurrent scripts as they are not attached to individual game objects. As such my script usage is rather basic - during initialisation the script registers what callbacks it wants to receive (input, timers, etc...), and then on those events the registered script function is called.

- Xavier

#3 EddHead   Members   -  Reputation: 140

Like
Likes
Like

Posted 04 June 2004 - 02:42 AM

Angelscript is all over our game............Xtreeme Forces. its heavoly used and to just name a few, the AI file right now is 5000 lines of AS Code. my only issue is its so tightly integrated with our game, i have to literally struggle to update every new version to make sure everything works perfectly fine!

Jayanth.K
Raptor Entertainment Pvt. Ltd.
http://www.raptorentertainment.com

#4 Andreas Jonsson   Moderators   -  Reputation: 3375

Like
Likes
Like

Posted 05 June 2004 - 09:20 AM

Desdemona:

Angelscript will probably not work very well in multiple threads. I know for sure that asGetActiveContext() will present problems, as it is not thread aware. This doesn''t prevent you for using threads for other tasks.

I''ll correct this behaviour for a future version though.




__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library - Tower - free puzzle game




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS