project-navigation
Personal tools

Author Topic: new ui script language: lua, angelscript, python???  (Read 5574 times)

Offline xray

  • Rookie
  • ***
  • Posts: 72
    • View Profile
new ui script language: lua, angelscript, python???
« on: June 08, 2014, 08:08:43 am »
Hi,

I noticed in the todo-list an item to replace the current custom script language with a general purpose script language. AngelScript was mentioned as a candidate. I also find some references about lua and the AI, however, I cannot seem to locate where they are used in the codebase.

My question: is anyone actually using lua?

I'm interested in making a patch to the ui script base so that (next to the current custom script language) a second script language could be used. That way current ui-scripts would remain functional up to the point the new language is solid enough to replace it. If lua is already in view somehow, it would make sense to reuse it. There should be no need to implement multiple script language in the same game. If not, what language is preferred. Lua, AngelScript or something else (Python??).

Any thoughts?

xray

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: new ui script language: lua, angelscript, python???
« Reply #1 on: June 08, 2014, 11:51:53 am »
LUA is in fact part of the server logic ai already. see src/game/g_ai_lua.cpp

using LUA for the UI would be quite cool, as it would allow us to move more things into scripts. Converting all the existing stuff would be quite a lot of work - but by doing this we would gather a lot of advantages. So if you are willing to start such a project, please go on and do so. I'm not sure whether you have experience with github, but maybe the best would be to fork it on github and do a pull request once you have something that works.

To sum it up again: I would be very interested in a lua ui binding/replacement.

Offline xray

  • Rookie
  • ***
  • Posts: 72
    • View Profile
Re: new ui script language: lua, angelscript, python???
« Reply #2 on: June 11, 2014, 09:07:02 pm »
OK.

I'll create a fork in git. I'm not sure how long it will take me to create a working implementation.
I've read the lua docs on this and looking at youre code I see a lot that looks familiair.

I'll also start a new topic on this to discuss some design issues.

xray