🎉 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 Configuration.

Started by
3 comments, last by BornToCode 14 years, 10 months ago
I know if i precompile my script on a windows box that it does not work when i try to reload that script on mac or iphone. But if i precompiled them on the mac everything works. What i want to do is be able to use my game editor on windows and generate the precompile script that just works on mac. I know that the configuration must be the same. Is there a way i can force angelscript to use the same configuration across all three platform. That way once i precompile my script on windows i can load them on mac, or there is no way to do it.
Advertisement
Also one more thing i forgot to mention is that it does work sometimes. It seems to crash on the mac on the scripts where i have global variable pointers. It crashes on the function ReadGlobalVarPointer when i try to load them. I am using the latest version of AS
The configuration is to make code be compatible with the target OS/CPU, this includes big-endian/little-endian differences, pointer size, etc. If it is not compatible with the target OS/CPU it may not compile properly. Actually the bytecode depends mostly on the CPU architecture rather than on the OS, so as long as the CPU architecture is the same in regards to pointer size and endianess on both machines, the scripts ought to be compatible.

In a future version I'll make sure the saved precompiled bytecode is platform independent, but it is currently rather low priority. If you feel up to doing this adaption yourself, the necessary changes should be solely in the asCRestore class.

I've made a few improvements to the saved bytecode in the WIP. The problem you're reporting may have actually been fixed already. I changed especially how the global variables are found when loading the bytecode.

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

Cool, i will definitely look into making the modification myself. That is one feature i really need. Because with that feature i will be able to release an single build in my editor that works across all three platforms.
Sorry about that. Everything seems to work now.

[Edited by - BornToCode on August 21, 2009 12:34:48 AM]

This topic is closed to new replies.

Advertisement