Jump to content

Suggestions For The 0 A.d. Scripting Language


Recommended Posts

I would appreciate it if any future 0 A.D. scripters would throw in their ideas regarding our future scripting language. In order to prompt discussion I have posted a few questions. Feel free to post as often and as much as you want.

1) What scripting languages do you prefer and what do you like about them? What do you dislike about them?

2) What specific features/functions would you like to be available in the 0 A.D. scripting language?

Link to comment
Share on other sites

  • 2 weeks later...

Well, I suggest we use a scripting language similar to the one of AoK. It had a very basic syntax based on if-else-statements.

In addition to that we need some calculation functions of course.

Since ally-coorperation is what makes a good AI we will need a set of functions like "help_ally(&location, &units, &how_long)". Also a function like an advanced town_under_attack -function would be cool: In addition to TRUE and FALSE it returns the location, which units, player_handle (which can be used as parameter to other player-specific-functions like players_age()).

That's those that come off at first glance. Will postm ore later.

Link to comment
Share on other sites

We are going to use Lua as the scripting language so all of the language features will be available (things like branching, looping, standard operators, etc.). We will be adding special functions to send/retrieve data to/from the game and those are the items I would like suggestions for.

The reference manual for Lua can be found at http://www.lua.org/manual/5.0, but we will provide a condensed version for people who would like to write AI scripts.

Link to comment
Share on other sites

  • 3 months later...
We are going to use Lua as the scripting language...

I know this is dated, so I'll consider it stale information. Wijitmaker came to GameDev to inquire about scripting languages here and mentioned that you are considering using a language called ferite. I made my recommendation in that thread not to do so.

Lua is a solid choice, but you seem to lack a Lua programmer. Might I recommend Python? Apart from being a powerful language, it has a simple syntax and is easy for any programmer to learn - once he gets over the whole whitespace thing. The Python interpreter is also part of the Python language (the exec statement and eval function can execute arbitrary Python code as a new process or part of the current process respectively), which gives a lot of power to mods and configuration and extension scripts.

I need the practice (been out of game programming for about 2 years), so I'd be willing to work with you to resolve all your Python issues and to implement many/most of your scripts - even integrate it with the toolset...

As for DarkAngelBGE's concerns per high-level constructs, the SDK would provide those interface.

Link to comment
Share on other sites

When deciding on the language we examined both Lua and Python and came to the conclusion that Lua was a better choice for our project.  Right now we're debated whether or not to stick with Lua or switch to Ferite.

Yes, Wijitmaker mentioned that. However he also said you didn't have a Lua programmer anymore... I can understanding sticking to your existing choice; it's efficient, particularly if integration had already begun/been completed, and it reduces the project changes to getting someone else up to speed on Lua.

I have no explicit desire to learn Lua intimately, though I probably wouldn't mind contributing in a less involved role under those circumstances - discussing efficient ways to implement features, etc with your Lua programmer.

CheeZy's emailed me and he suggested I get in touch with Wijitmaker on this while Wijitmaker suggests I get in touch with Acumen, so Acumen it is.

Link to comment
Share on other sites

Oluseyi, any chance you could meet us on IRC for the programmers meeting we when we will decide this issue?

It would be 10:30 EST... yeah kind of early for us Americans, but we need to catch those Europeans before they go to bed :)

Heh. I'm in Germany right now, interestingly, so that works out fine for me. 4:30 PM. I presume the IRC channel details are available on the site somewhere; either way, I'm composing an email to you and Acumen at the moment, so you can furnish them to me as well.

Link to comment
Share on other sites

Yeah I'll PM to you also just a sec...

Thanks much :)

Yeah that works out to 15:30 GMT, but your to fast for me :)

Cool, we would really appreciate some more input on this subject. I'll see if I can scrounge up some previous meeting logs for you to read if your interested in some more background on the on-going discussion.

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...