Script compiler

Do you want to contribute to improving ZGameEditor? Check out the list of open activities and find out where you may be able to help!

Moderator: Moderators

Post Reply
User avatar
VilleK
Site Admin
Posts: 1924
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Script compiler

Post by VilleK » Wed Mar 12, 2008 12:01 pm

The script engine in ZGE is a very simple parser which allows for numerical expressions, assignments and if-then conditional statements.

The lack of advanced features in scripting is currently the major obstacle for making many types of games in ZGE.

Wish-list for improved scripting support:
- functions
- parameters
- more datatypes
- local variables
- arrays

Technical details/requirements:
- parser and runtime implemented in Delphi/freepascal
- Runtime implemented with minimal footprint to be part of 64kb binary

If you are interested in helping with this task then please reply to this topic.

More info:
- ZGE script documentation http://www.zgameeditor.org/index.php/Ma ... xpressions
- ZGE source code http://www.zgameeditor.org/index.php/Main/Download

User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

angelscript

Post by jph_wacheski » Fri Oct 03, 2008 6:29 pm

found this;

http://www.angelcode.com/angelscript/

not sure if it helps or if you already know about it,. however it does look interesting nevertheless,. and is free and "It is successfully being used in Delphi projects"!
iterationGAMES.com

stevenp
Posts: 11
Joined: Thu Sep 20, 2007 2:28 am

Post by stevenp » Thu Oct 09, 2008 5:08 pm

AngelScript is used in professional products such as GameCore (http://www2.gamecore.ca/home/anonymous)). It's a nice language.

nadams
Posts: 9
Joined: Wed Nov 30, 2011 10:52 am

Re: Script compiler

Post by nadams » Sun Dec 04, 2011 4:53 am

VilleK wrote:The script engine in ZGE is a very simple parser which allows for numerical expressions, assignments and if-then conditional statements.

The lack of advanced features in scripting is currently the major obstacle for making many types of games in ZGE.

Wish-list for improved scripting support:
- functions
- parameters
- more datatypes
- local variables
- arrays

Technical details/requirements:
- parser and runtime implemented in Delphi/freepascal
- Runtime implemented with minimal footprint to be part of 64kb binary

If you are interested in helping with this task then please reply to this topic.

More info:
- ZGE script documentation http://www.zgameeditor.org/index.php/Ma ... xpressions
- ZGE source code http://www.zgameeditor.org/index.php/Main/Download
The one thing I would recommend is using Python as the scripting language. It's cross-platform and can be compiled to byte code.
I'll add that I'm not exactly a fan of Python, but for what it's worth - Blender heavily hinges on it.

However, I'm sure the binaries will be way over 64KB. Which, perhaps having two options isn't a bad idea - ability to not use Python and use the "limited built in" scripting language when you want to target 64KB, and ability to hinge Python and have a larger toolset but have the understanding that it will create larger binaries.

Here is a link from stackoverflow talking about it:
http://stackoverflow.com/questions/5512 ... g-language

My two cents.

User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski » Sun Dec 04, 2011 1:41 pm

Seems all of these areas have been addressed in the continual updating that Ville has been up to. The built in ZGE scripting has become very powerful lately. Although, I am sure a dedicated widely used script system would be even more powerful, (I used Lua for a Caanoo game, and it is nice to have dynamically sized arrays, for example.) I am not so sure it is really needed any longer?
iterationGAMES.com

User avatar
Kjell
Posts: 1650
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell » Sun Dec 04, 2011 2:03 pm

Hi guys,
jph_wacheski wrote:Seems all of these areas have been addressed in the continual updating that Ville has been up to.
Seconded, all of the scripting issues mentioned in the first post have been solved.
jph_wacheski wrote:I used Lua for a Caanoo game, and it is nice to have dynamically sized arrays, for example.
There are actually some benefits to static arrays, such as the fixed footprint and the fact that it forces you to use batched solutions .. but in some cases it would be convenient yes. However, you could for example use a linked list to maintain a collection instead ( that way you don't need a array at all ). Attached is a example.

K
Attachments
LinkedList.zgeproj
(5.71 KiB) Downloaded 357 times

User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski » Sun Dec 04, 2011 4:09 pm

Cool, thanks for that logic structure. Simple logic setups like this are often tough on my little monkey brain, but I think it get this. Each model maintains the reference to the one before and after in the list, so the list is distributed throughout the models. Interesting.
iterationGAMES.com

StevenM
Posts: 149
Joined: Thu Jan 20, 2011 10:03 am

Post by StevenM » Sun Dec 04, 2011 8:30 pm

LinkList that is pretty neat - You did that without any arrays too - I'm kind of in same boat as JPH with it though - It's a bit confusing to understand how it's working.

I do like dynamic arrays. esp. things like Push,pop,append...but I do like the ability to use arrays as arguments in functions too - would be very useful for dealing with some math operations.

Post Reply