Scripting Languages

Started by
4 comments, last by Tylon 18 years, 5 months ago
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.raw = c_code_data; _Zam_
Advertisement
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?
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_

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.
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).
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..

This topic is closed to new replies.

Advertisement