🎉 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!

Saving byte code

Started by
12 comments, last by doneval 20 years, 3 months ago
Hello all, It''s possible to save all byte code generated in a file and then execute it directly? thanks, ricard (great to hace an angelscript forum !!!) Tor Nec Donavam!
Tor Nec Donavam!
Advertisement
Work is in progress on this feature.
Right now, no you cannot save the bytecode and execute it directly.

admit nothing, deny everything and make counter accusations.
admit nothing, deny everything and make counter accusations.
And is possible to contribute to the project with code ?

I'm thinking to add some features myself. Is the author accepting contributions?



[edited by - doneval on March 10, 2004 7:41:23 AM]
Tor Nec Donavam!
Yes, I accept and welcome contributions. The contributions pass my avaliation of course. Contributions that follow my goals are generally accepted. If the contribution is sufficiently good it might even change my goals with AngelScript

So far I've accepted two contributions, the port to DJGPP (which is what made AngelScript available for Linux developers), and support for the for-loop statement (sent by echo, in fact ).

If you're planning some new features it might be a good idea if you tell me about them first so that I can tell you what I would like, or perhaps if it is already in development, or something like that.

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

[edited by - WitchLord on March 10, 2004 8:46:15 AM]

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

Great!

Have you any "TODO.txt" avaliable where we can check in a glance what is in development and what is planned for the future ?

--

Tor Nec Donavam!
Tor Nec Donavam!
There is one in the sdk. Perhaps I should make it available as a page on the AngelScript page?

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

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

Hey!

Since when was the for loop available, Anyway......I dont think i was reading the documentation. i would like to know if anyone has made a small compiler which can be plugged to VC for error checking a script before the actual Host App actually begins to run.

Cheers

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.
Hi Andreas
I would like to know how you can map a function like in AngelScript ( to a string or variable like the registersystemfunction method) that can be used in a dynamic situation just like a scripting language. the application for this would be making some sort of a AS-to-DLL/AS-to-C++ converter once to lock/hard code the script code to get a speedy version (or simply get the C++ compiler to compile AS code). this would also require us to make sure most of our code will remain very very simlar to C++ code.

Regards

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.
The for-loop is available since 1.6.1 beta 1 (2004/02/27). You missed out on a lot of updates during the latest 1.6.1. Coollist failed to deliver e-mails and it took a while for people to migrate to the new freelists.org mailing list.

Jayanth, it is a small chance that anybody has written such a compiler, because the compiler needs to know about the system functions that you register in your application in order to appropriately verify if the script is without syntax errors. I suggest you yourself write this compiler. When registering the system functions use a null pointer, that way you don''t have to link with the entire application.

I''m not sure what you mean by mapping an AngelScript function to be used in a dynamic situation. Do you want to have some kind of function like GetProcAddress() to get a C++ function pointer to call the script function? I remember you asking for this before, and I still have it in mind but it is very far down on my to-do list. What you can do is write some proxy function for calling the script function, e.g:

float DoSomething(int a)
{
float retVal;
engine->CreateContext();
int id engine->GetFunctionIDByName("DoSomething");
context->PrepareContext(id);
context->SetArguments(0, &a, 1);
context->Execute();
context->GetReturnValue(&retVal, 1);
context->Release();
return retVal;
}


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

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

Hi
What i wanted was a way to bypass Angelscript and create a C++ file for the script( get the compiler to compile ). one of the main reasons for me using angelscript right now is the ability to call functions dynamically ( eg: strChacaterFrameMove = "char1framemovefunc" )

Now i want to be able to do a similar thing once i have finished work with a similar script. (to make it hard coded to increase performance until i decide to change it later) we could make a AS to C++. my question was to know how i could store a functions address instead of the way i use strings and functionIDs from angelscript.

i''ll check out some info on GetProcAddress() and get back. i still have''nt implemented 1.6.1 cos i have''nt found time.

Thanks

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.

This topic is closed to new replies.

Advertisement