🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

AngelScript 2.1.0 WIP 5 (2004/03/06)

Started by
13 comments, last by JD 19 years, 3 months ago

Well, I've been struggling between Lua and AngelScript some time ago, but after reading about features, pros and cons of those two scripting libraries, I think that, in my situation choosing AngelScript would be best - honestly, this compatibility with C++ (and C++ like syntax) is really amazing thing, especially after seeing some Lua scripts - it looked kinda strange :-/

Reason I asked about performance, is that recently I've made technical demo which uses OpenGL for rendering some 2D textures, particle effects etc. I was... shocked by the amount of FPS I got - I was expecting something bigger. (ok, in fact, this tech demo wasn't optimized - but that don't matter much here. The fact is, it's slow - and AFAIK it shouldn't be).

So, in the finished game I'm writing now, probably there will be much more graphics, particles, effects etc. on the screen at once + music + sounds + AI + other things, so it would be generally a good idea to get as fast scripting language as I can get - probably, every little CPU cycle will count... and that's why I asked when you will be done with those optimizations - so that I could know when to start incorporating scripts into engine :-) and - what's more important - is there a chance that those changes will arrive before I should release game.


Anyway, probably I won't finish this game very soon, so I'll use Angelscript :-)
Advertisement
if you need the most performance you can get, then an interpreted vm is not the way to go, an interpreted vm (stack or register based) is more suited in "not speed important" parts, like serialization, initalization, gui and so

If you will run scripts inside an important loop, then you probably will need a JITed script.

I have been talking with some users here about incorporating my JIT compiler to the current AS, but i decided that its going to be implemented on AS 1.x, so if you can wait and want to use AS 1.x ....

Lioric
If any JIT-compiler is to be used I'd prefer SoftWire :)
http://softwire.sourceforge.net/
_-=[ "If there's anything more important than my ego around, I want it caught and shot now." ]=--=[ BeatHarness ]=-=[ Guerrilla Games ]=-=[ KillZone ]=-
Think of this as two sides of a fence. On the left side you have all the engine logic being written in C and on the right side you have all the game logic written in a scripting lang. The game logic should not be invoked frequently but once it is from other script or script function then it uses C functions to do its thing, nice and fast. So all the high frequency code is concentrated in those engine side C functions. You do not want to do physics code by calling script functions that compute the physics solution. I think this is one of the important points to remember. Read up Epic's unrealEd scripting notes to see what I mean. Better yet, examine QuakeC's scripts and see what kind of C functions it uses to do its thing fast.
Also, script slowness was the main reason why Doom3 uses DLLs. It also makes debugging easier since you can use VC++ IDE.

This topic is closed to new replies.

Advertisement