Scripting

Everything related to the code /
Tout ce qui touche au code
Post Reply
User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Scripting

Post by zuzuf » Wed Feb 25, 2009 6:53 pm

I am rewriting the scripting interface in order to have the same interface for all script languages (basically I am writing a SCRIPT_INTERFACE class that script classes must inherit from, this class does all the "thread" management - not real threads, only script instances sharing the same global environment).

I had to rewrite script integration in UNIT objects (currently unit scripting is broken because it's still work in progress). So now, the COB VM is separated from UNIT objects, it's located in the cob.vm module in the scripts folder.
=>;-D Penguin Powered

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Fri Feb 27, 2009 3:11 pm

unit scripts are working again in development branch :)

COB scripts are still buggy for now (many things that should spin don't spin, or in the wrong direction) and currently unit scripts are not synchronized in multiplayer mode since we now use script names instead of script IDs because this is easier to code and faster to get working, but things will be reverted to a script ID system since we only use a limited number of script names ... so this can be stored into a script ID, then transmitted over the network or directly to a script virtual machine which then converts it to a script name if needed and runs the script :), so normally there won't be too much changes to this part of the networking code (it's only disabled for now because it wouldn't build).
=>;-D Penguin Powered

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Fri Feb 27, 2009 9:08 pm

Most bugs in COB VM should be fixed now but the weapon aiming system isn't working any more (it was not working exactly like in OTA, so fixing some bugs in COB VM broke this mechanism). :D
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Fri Feb 27, 2009 9:41 pm

:cry:

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sat Feb 28, 2009 2:33 pm

Aiming code fixed :)

it's working like in TA now :), and it's much more efficient for weapons that track units (weapons with a turret).

I think the COB VM is now fully operational :), let's fix that texture loader, then make a prealpha package :P
=>;-D Penguin Powered

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sat Feb 28, 2009 11:56 pm

Save/restore mechanism implemented for COB_VM scripts, so now we can save and load games (breaks compatibility with previous saved games format).

Currently the save/restore mechanism is not implemented for Lua scripts, so when Lua script interface for units will be working saving/loading games with Lua scripted units won't be possible until this is implemented.
=>;-D Penguin Powered

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests