AngelScript 1.8.0 WIP #2 (2004/06/26)

Started by
46 comments, last by WitchLord 19 years, 9 months ago
Hi guys, I've just released the first work-in-progress version of 1.8.0. You can find it and the description of its changes here: http://www.angelcode.com/angelscript/wip.asp Regards, Andreas Jönsson Author of AngelScript __________________________________________________________ www.AngelCode.com - game development and more... AngelScript - free scripting library - Tower - free puzzle game <SPAN CLASS=editedby>[edited by - WitchLord on June 11, 2004 5:39:04 PM]</SPAN> [Edited by - WitchLord on June 26, 2004 2:16:32 PM]

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement
Just make sure performance is not taking a hit with the new features. Performance is key to a scripting language used in games.
You can eventually call it Angel C++ :D. Anyway as for the other post the 1.7.1a in .NET (i dont have 2003 ) it asks me for a .rc/.res file during compile, so i guess you should check this out, the only way i could fix it was copy the .rc file and recompile (with version changes). i dont know if this is required, but i guess you should try it in .NET sometime to confirm.

Later

Jayanth.K
Raptor Entertainment Pvt. Ltd.
http://www.raptorentertainment.com
Jayanth.KRaptor Entertainment Pvt. Ltd.http://www.raptorentertainment.com---------------------------------------------------------Why Mr. Anderson? Why? ...Why keep fighting? Do you think you're fighting for something - for more than your survival? Can you tell me what it is? Do you even know? Is it freedom, or truth, perhaps peace, could it be for love? Illusions Mr. Anderson, vagaries of perception. Temporary constructs of a feeble human intellect trying desperately to justify an existence without meaning or purpose.
Malmer:

I''m not adding anything that should change the performance. It will just be more flexible.

Did you note a difference in performance? Perhaps you are compiling the library in debug mode?

EddHead:

I think the problem is not with .NET but with the project file I was distributing. It was referencing a resource file, but I didn''t include the resource file in the distribution. You ought to be able to just remove the reference to the resource file and it should work.

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

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Just make sure teh reference is not present in 1.8.0. just to avoid confusion.

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

---------------------------------------------------------
The blue pill was a placebo!
Jayanth.KRaptor Entertainment Pvt. Ltd.http://www.raptorentertainment.com---------------------------------------------------------Why Mr. Anderson? Why? ...Why keep fighting? Do you think you're fighting for something - for more than your survival? Can you tell me what it is? Do you even know? Is it freedom, or truth, perhaps peace, could it be for love? Illusions Mr. Anderson, vagaries of perception. Temporary constructs of a feeble human intellect trying desperately to justify an existence without meaning or purpose.
I've updated the WIP

http://www.angelcode.com/angelscript/wip.asp

Not too much has changed though as I haven't had the time to really work on AngelScript for the last two weeks.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

problem using the WIP... Everything links fine and everything, but I get this error when creating the scripting engine (I based everything I did off the sample program):

Failed to create script engine - Expecting library version 1.6.1, found 1.8.0 WIP 20040611

I compiled and linked to the WIP lib. I then included the WIP angelscript.h header. I don't think I am mixing the two versions. Any help?
I think you just need to recompile the application. First clean target files to make sure the compiler really compiles all of the modules.

You said you updated the angelscript.h file, but your application is still expecting version 1.6.1. This tells me that the application wasn't compiled with the new angelscript header.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Problem with registering global functions...

the functions are defined like so:
void GetAndReleaseKey(int key);
void GetKey(int key);
void ReleaseKey(int key);

then I try to register them:
r = engine->RegisterGlobalFunction("void GetAndReleaseKey(int)", asFUNCTION(GetAndReleaseKey), asCALL_CDECL); assert( r >= 0 );
r = engine->RegisterGlobalFunction("void GetKey(int)", asFUNCTION(GetKey), asCALL_CDECL); assert( r >= 0 );
r = engine->RegisterGlobalFunction("void ReleaseKey(int)", asFUNCTION(ReleaseKey), asCALL_CDECL); assert( r >= 0 );

and I get this error message:
....
Debug Error:
....
file: "i386\chkesp.c"
Line 42
The value of ESP was not saved properly accross a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with another calling convention.

So, anyone know what's wrong?

Here is how I set up my engine and everything:
engine = asCreateScriptEngine(ANGELSCRIPT_VERSION);
if( engine == 0 ) { hge->System_Log("Failed to create script engine"); hge->System_Log("- Expecting library version %s, found %s", ANGELSCRIPT_VERSION_STRING, asGetLibraryVersion()); return -1; }




Do you get the error message when you try to register the functions, or when your script is calling the registered functions?

If it is when you register the functions then something is seriously wrong. It might even be a bug in AngelScript.

If it is when your script is calling the function then perhaps your functions aren't really using the cdecl calling convention. Try declaring the functions with the __cdecl modifier, or if that doesn't work with extern "C".

If you compile the test frame work (available from the WIP page) do you get the same errors?



AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement