Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
Adding a new language to Gideros? - Gideros Forum

Adding a new language to Gideros?

Hello! I'm a big Lua fan and Gideros is a really great project. The open source nature of Gideros got me thinking of adding a new scripting language. I'm particularly interested in forking Gideros and implementing Wren. The only thing is I've never really messed with an open source project and there isn't many pointers I can find in understanding how Gideros is laid out and compilation etc etc.

I've messed with C++ and can generally read it as long as I have some documentation pulled up. I'm usually a quick learner if I can get a good start. If anyone can lead me in the right direction or if Gideros is even set up in a way to make this practical, it would be much appreciated!

Likes: Apollo14, totebo, antix

+1 -1 (+3 / -0 ) Share on Facebook

Comments

  • can I ask why do you want this? and why wren? ( i've never heard about it before)
  • keszegh said:

    can I ask why do you want this? and why wren? ( i've never heard about it before)

    1. It would make an interesting project for myself for experience in working with an open source product.

    2. Wren is a language I have recently discovered and it is commonly compared to Lua due to its goal in being small and performant. I personally really like the design of Wren, but its not widely adopted. afaik the only places its really being implemented is the Luxe engine which is just hitting release 1.0 and toyengine (a C++ game framework) has plans to implement it. So i'd like to breathe some life into Wren by adding support to it in Gideros.

    I'm not really trying to imply Lua is insufficient, this is more of a learning thing for me that hopefully will result in a productive end product for people to use if they wish.

    Likes: keszegh

    +1 -1 (+1 / -0 ) Share on Facebook
  • olegoleg Member

    Likes: Shadowraix

    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
    +1 -1 (+1 / -0 ) Share on Facebook
  • I think Gideros was originally designed so the scripting language could be 'swapped' out with another. You could possibly add Wren so that it could co-exist with Lua. I think that would be the best solution.

    Likes: Shadowraix

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 ) Share on Facebook
  • oleg said:
    A plugin sounds like a good modular idea. Now, from what I have looked it still poses a few questions.

    1. How does a plugin initialize? From one of the forum threads on there they interfaced with Lua and called functions through that after a "require" will a plugin run on startup so I can have it track down the main file and start interpreting Wren code?

    2. Assuming I become familiar with Wren's C/C++ API how can I access Gideros' API in C++ so that I can create a binding of sorts to implement int oWren?
  • olegoleg Member
    edited August 2018
    This should be asked at @hgy29

    and there is still some outdated documentation

    https://docs.google.com/document/pub?id=149g_P1YlE4_6v_hHbFx3YAaYpdU0HoM70XJSLTE38ww#h.6x0eblw70xbq

    Likes: Shadowraix

    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
    +1 -1 (+1 / -0 ) Share on Facebook
  • I think Gideros was originally designed so the scripting language could be 'swapped' out with another. You could possibly add Wren so that it could co-exist with Lua. I think that would be the best solution.

    Of course! It doesn't really matter to me if Lua stays or gets removed as long as my end goal meets success. If I can implement it via a plugin like oleg suggested, that would be fantastic so people don't necessarily have to download an entirely different build of Gideros. :D
  • No, what you do is test it on a new build and if all works ok (with both) then merge it in with the main version of gideros.

    Likes: oleg

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 ) Share on Facebook
  • No, what you do is test it on a new build and if all works ok (with both) then merge it in with the main version of gideros.

    They'd still have to download my modified version of Gideros, no? Much easier to install a few dlls via plugin.

    Dislikes: Yan

    +1 -1 (+0 / -1 ) Share on Facebook
  • Apollo14Apollo14 Member
    edited August 2018
    @Shadowraix that's very intriguing :smile: I've never heard about Wren :smile:

    I hope you'll make basic integration and benchmark Wren vs Lua in Gideros, how they perform in a game project (I guess results will be different from synthetic benchmarks, maybe Wren will make even greater difference).
    It's really interesting.
    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
  • SinisterSoftSinisterSoft Maintainer
    edited August 2018
    @Shadowraix yes, but I think that something so deep as a 2nd scripting system may have to be in the main code rather than as a plugin.

    @Apollo14 Wren appears to be faster than Lua. It looks like it doesn't support true concurrency (same a Lua), but it seems to imply it does at first glance.

    It's also created by a games coder, so +1 from me for it as a second script system maybe.

    Likes: Shadowraix

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 ) Share on Facebook
  • @SinisterSoft

    Well, its a matter of getting some solid information then. If I can access the Gideros API with the plugin system in C++ then I can see it being feasible. Otherwise it'll be quite a road ahead ahha.

    Hopefully somebody here can lead mein in the right direction. :)
  • SinisterSoftSinisterSoft Maintainer
    edited August 2018
    @hgy29 @ar2rsawseen @atilim are the ones to chat to regarding this. There is a disconnect though in the source between the Lua bindings and the actual api. Look in github for the Lua binding files - it may be a matter of adding equivalent Wren binding files and going from there.

    https://github.com/gideros/gideros/tree/master/luabinding

    You could start with making debug work correctly (so you can output to the console), the file io redirection, etc then add the applicationapi binding and go from there.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • I'm not sure if/how the two would co-exist, but possibly if there were no Lua files then no need for them in the export and if Wren wasn't used then no need for that either.

    An alternative idea:

    It is possible that Wren could run on a completely different thread to Lua, it could 'talk' to Lua that runs in the main thread and that then talk to Gideros under the users code control. That way it could be a plugin I suppose, it would also use spare unused processing time so it would be a nice plus.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • hgy29hgy29 Maintainer
    I am late in this discussion, but @SinisterSoft gave you the right pointers. Obviously the language engine is tightly integrated with Gideros core, so to switch to another language you'll have to adapt a significant amount of files in gideros. Most (if not all) of them are located in luabindings folder, the entry point being luapplication.cpp

    Probably the first step will be to be able to compile gideros by yourself, and then you will be able to tinker with code and understand how it works

    Likes: SinisterSoft

    +1 -1 (+1 / -0 ) Share on Facebook
Sign In or Register to comment.