Sign in to follow this  
_Zam_

Scripting Languages

Recommended Posts

I'm looking for a scripting language that has the ability to do the following: declare a structure in the script (example) struct { int Size; char Name[40]; } MyStruct; And then be able to get direct access to the memory such as the c/c++ language could have raw memory access to the structure as a 44 byte array. Or an easy & very fast method to fill a struct elements so that if I passed the struct to a routine it could either fill it in one fell swoop (44 bytes) or in a quick for (i=0;i<MyStruct.elementes;i++) MyStruct[i].raw = c_code_data[i]; _Zam_

Share this post


Link to post
Share on other sites
Why would you want a scripting language for such low level things? Actually, why would you want to do low-level things like that at all?

Share this post


Link to post
Share on other sites
Quote:
Original post by Roboguy
Why would you want a scripting language for such low level things? Actually, why would you want to do low-level things like that at all?


Because I have a specific data manipulation need. ;-) I'm thinking I'm either going to have to retrofit one of the scripting engines; or write my own limited engine; but I figured I would ask the experts... Typically Game engines need speed in Int

I'm looking for speed #1, flexabily #2; so even if it is a bit cumbersome as long as it is fast.

I figure part of the DML (filling and empting the structures) will be sent straight C/C++ compiled code; but the rest needs to be user defined for flexability.

_Zam_

Share this post


Link to post
Share on other sites
If you want speed and flexability, you should write it in c/c++, then you will get what you want. Script can not and need not to satisfy that requirement.

Share this post


Link to post
Share on other sites
Solutions:

1.Use c++ as a scripting language. Add a free c++ compiler to your project and compile the scripts at runtime to dlls.
2.use some .net language(c#,Jscript.net) as your scripting language(You can easily compile such scripts at runtime).

Share this post


Link to post
Share on other sites
You can use any scripting language, and write bit access functions in C, which you open up to your scripting language.

like getbit(void* obj, int bitOffset) and setbit(void* obj, int bitOffset, bool set) etc..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this