#1 2015-08-29 02:28:24

chasester
Member

Scripting Language

Any suggettions (other than lua) on a scripting language to implement in tesseract. Preferable something that is java, or C# like.

Thanx

Offline

#2 2015-08-29 07:30:28

Lord Kv
Member

Re: Scripting Language

It already has CubeScript. Although not intended for scripting game logic it can do that too, sort of.

Offline

#3 2015-08-29 08:38:48

ImNotQ009
Moderator

Re: Scripting Language

*cough* OctaForge *cough*

Offline

#4 2015-09-10 16:04:26

chasester
Member

Re: Scripting Language

octa forge uses lua idb, Lua is old and bulky, and slow. I found a better solution, angel script. The sytex for AS is more c++ based, so it can drag and drop, actual source code right into angel script files. Also it has a compiled version which allows for encrypting code into binary (idk if lua does this). You can google it obviously for more info, But it will work better in my option than lua.

Offline

#5 2015-09-11 07:17:47

ImNotQ009
Moderator

Re: Scripting Language

chasester wrote:

octa forge uses lua idb, Lua is old and bulky, and slow. I found a better solution, angel script. The sytex for AS is more c++ based, so it can drag and drop, actual source code right into angel script files. Also it has a compiled version which allows for encrypting code into binary (idk if lua does this). You can google it obviously for more info, But it will work better in my option than lua.

I don't know about the actual speed of Lua on itself but I do know that if you use LuaJIT you get rather impressive execution speeds. It's what OctaForge uses, so saying it's slow is just wrong.

On another note, it only uses Lua internally, the actual scripting language you use do to things is OctaScript
https://github.com/OctaForge/OctaScript/wiki

Last edited by ImNotQ009 (2015-09-11 07:20:47)

Offline

#6 2015-09-11 21:29:19

chasester
Member

Re: Scripting Language

I didnt realize it used luajit internally (jit is just in time compiling, just compiles on frame rather then precompiling allowing for run-time changes).

It seem to lack type casting, on speed i just heard things from people never researched it.

Offline

#7 2015-10-06 19:50:20

OnlyTheGhosts
Member

Re: Scripting Language

Personally, I'd go with AngelScript,
https://en.wikipedia.org/wiki/AngelScript
http://www.angelcode.com/angelscript/

for the following reasons;

1 - It's game oriented anyway.
2 - It is not focused entirely on a single game engine but is already used by other games (meaning more people already know it well enough to use it).
3 - It is very similar to C in syntax, so there is less of a hurdle in learning it for those who know C.

Offline

#8 2015-10-07 05:00:24

chasester
Member

Re: Scripting Language

thanks for the help,

I decided on the same, I've already implimented most of the base code (strings, ref, etc) and am now adding new class archtypes (vec, vec2, vec4, matrix3x3, matrix4x4 etc).

After base types are in I will be implimenting functions for rendering and udating using angel script.

It will look similar to the game project that is included in the source zip. I am still a little shaky on the exact implimentation but an interface that you inherent from and then base fuctions that are looked for by the as compiler.

The idea will be to make it modular by using the asIScriptModule declaring one for each file and class type. So at run time i can recompile a module with out having to recompile the entire code. Meaning that onframe you can be modifying the code, changing varibles or functionality inside of your class object. And see the changes simi instantly, speeding up debug time.

entity and extentity will be replace by a simpiler version linking to a set of controlers, which is a call based implimentation of a predefined interface. Something like:

class mapmodel : IENTITY {
uint modelID;
 vec rot;
 float scale;

mapmodel (uint modelID, vec rot, float scale) { //assign all these variables} //init phase on map start or called when an object creates another object

update(int lastmillis){ //simple update loop } //called every frame cycle

// simple message input this could handle anything from collision to user input
message(ref mes, entity @callobj, int messagetype){  
   switch(messagetype){
       //cast the mess object based on the type
   }
}

render(){
    rendermodel(modelID, rot.x, rot.y, rot.z, scale);  
    if(editing) renderbounds(getbbfrommodel(modelID));
}

gui(){ //render any gui commands}
}

chasester

Offline

Board footer