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.
Scripting
- zuzuf
- Administrateur - Site Admin
- Posts: 3281
- Joined: Mon Oct 30, 2006 8:49 pm
- Location: Toulouse, France
- Contact:
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).
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
- zuzuf
- Administrateur - Site Admin
- Posts: 3281
- Joined: Mon Oct 30, 2006 8:49 pm
- Location: Toulouse, France
- Contact:
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.
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
Who is online
Users browsing this forum: No registered users and 30 guests