Is orx support lua or other script language?

edited July 2013 in General discussions
Just as the title show up. Is orx support lua or other script language?

Comments

  • jimjim
    edited July 2013
    Orx does not support lua or any scripting language atm. As orx is in pure C code, it would be fairly easy to add lua in your program. Generally, most people are not satisfied with scripting and its performance.

    So, it is better to roll your own, because you might not need all the functionality of an engine for a particular game and above all, it depends on your need. As a result, converting the whole engine to work with a scripting language might not be much of help. Bcs, most part of it would remain unused. I had something in mind, making a wrapper to integrate lua with orx, but never got enough time for actual work :(

    Not to mention, you can do a sort of scripting using orx config. Its fairly powerful and with the addition of command and timeline, almost 50% work of general scripting language can be done using config alone.
  • edited July 2013
    I also know that some users have written (or generated) some bindings for python in the past and some went down the .NET road.

    However I don't think any of those wrappers/bindings were either completed and/or shared publicly.

    I second Jim's opinion about commands/timelines, I find them powerful enough for my own needs, and new custom commands are pretty easy to add.
  • edited July 2013
    Thank you for your reply! But what do you means by making a wrapper?
    jim wrote:
    Orx does not support lua or any scripting language atm. As orx is in pure C code, it would be fairly easy to add lua in your program. Generally, most people are not satisfied with scripting and its performance.

    So, it is better to roll your own, because you might not need all the functionality of an engine for a particular game and above all, it depends on your need. As a result, converting the whole engine to work with a scripting language might not be much of help. Bcs, most part of it would remain unused. I had something in mind, making a wrapper to integrate lua with orx, but never got enough time for actual work :(

    Not to mention, you can do a sort of scripting using orx config. Its fairly powerful and with the addition of command and timeline, almost 50% work of general scripting language can be done using config alone.
  • jimjim
    edited July 2013
    To call a C function from lua without any binding library like luabind or tolua, you have to consider two things, one is function definition and registering the function. Lua can only call C functions which have a definition like the following
    typedef int (*lua_CFunction) (lua_State *L);
    

    Also to register the function, you have to call this
    lua_register( lua_State *L, "function_name_in_lua", lua_CFunction);
    

    So, a wrapper would be few header and source, that would do this for you. So, it would make all orx function lua compatible and also register the corresponding function for you. It would also make calling lua functions from C bit easy. I answered as quickly as possible. Got some important work to do. Hope, I could make myself clear.
  • edited July 2013
    Got it! Are you busy?
    jim wrote:
    To call a C function from lua without any binding library like luabind or tolua, you have to consider two things, one is function definition and registering the function. Lua can only call C functions which have a definition like the following
    typedef int (*lua_CFunction) (lua_State *L);
    

    Also to register the function, you have to call this
    lua_register( lua_State *L, "function_name_in_lua", lua_CFunction);
    

    So, a wrapper would be few header and source, that would do this for you. So, it would make all orx function lua compatible and also register the corresponding function for you. It would also make calling lua functions from C bit easy. I answered as quickly as possible. Got some important work to do. Hope, I could make myself clear.
  • jimjim
    edited July 2013
    Yep, currently I am working on my final year project and making its report with latex (this is pain in the ass).
  • edited July 2013
    Hi I am brand new here

    Please tell me whether i can use C++ instead of C in ORX?

    And I want to use SDL and C++ to make android games.Does this ORX helps it in anyways?

    Let me know please so that I can start working with ORX

    Thank you
  • edited July 2013
    Hi simplelenz, welcome to ORX!

    ORX isn't any more C++ unfriendly than SDL itself is, after all SDL is also a C library and it's perfectly OK to use C libraries from C++. On top of this, Iarwain even made a C++ wrapper for the most useful ORX functionality. That wrapper is called Scroll.

    If you insist on using SDL for whatever reason, I don't think ORX will be very useful, since it provides functionalities at a higher level of abstraction. That said, why would you insist on using SDL? ORX is a much nicer basis to build on top of, as it provides many many useful services you'd have to build yourself on top of SDL.

    I'd recommend experimenting with ORX on the desktop first and building the basics of your game running on the PC, knowing that when you want to switch to Android (or iOS), it's quite easy to do (since ORX also runs on Android). Trying to learn ORX and setting up your Android development environment at the same time would quickly kill your enthusiasm.

    Cheers
  • edited July 2013
    Hi simplelenz and welcome here!

    I haven't much to add to enobayram's great and detailed answer. :)

    I merely wanted to stress out that (in addition to being able to use C++ - there are even some tutorials written in C++ if you look at the tutorial page on the wiki), SDL and orx are not really aimed the same public:

    - SDL is a library: it's low level and brings a small set of features/services while letting the developer entirely create his/her own execution workflow

    - ORX is an engine: it's high level, brings to the developer many more features/services and let him/her focus on the actual content instead of the underlying workflow

    Cheers! :)
  • edited July 2013
    Thank you.You guys are amazing

    The thing is I saw in wikipedia that ORX supports SDL.
    So if any case can i use SDL within ORX?

    Is ORX good for someone who is willing to join game development field.
    If he wants to be a professional game developer isn't he should be able to make games using scratch.That is why I thought of SDL.

    I feel like wanting to use ORX.Hope you guys guide me through in my failures.

    Thank you
  • jimjim
    edited July 2013
    Hi simplelenz.
    So if any case can i use SDL within ORX?
    You cant use SDL with ORX, both are different things. And Orx provides much more functionality than SDL. Even with the release of SDL 2.0, I am not sure if it would be an option to use SDL 2.0 under the hood because GLFW 3.0 seems equally impressive.
    Is ORX good for someone who is willing to join game development field.

    Of course it is, its all about doing anything with something. No matter what you use, you have to utilize it and make something out of it, besides you get to learn how a system works.
    If he wants to be a professional game developer isn't he should be able to make games using scratch.That is why I thought of SDL.

    I used to think like this, so I learned SDL 1.2 and some 2D opengl functionality myself and built a small library of my own. I could make pretty basic games out of it. But then I asked myself,"Do I want to make games or engine". If you want to make engine, even then it would be better to contribute to an existing engine. This would not only help you but also help others.

    So, starting form scratch is good to an extend, after that it is better to pick an existing engine.

    And don't worry ORX community is very small but is very very helpful. You won't get lost, even in your worst failures :)
  • edited July 2013
    jim wrote:
    But then I asked myself,"Do I want to make games or engine".
    That's the most important piece of advice on this thread, I think.

    I've been working in the game industry for 12 years now, and I can definitely tell you that a lot of successful game programmers don't have an extended low level knowledge.

    Now if you want to focus on writing low level tech (mostly engine), you'll have to learn lower level stuff than SDL anyway. I personally believe it's always nice to learn about how things works all the way down to the lowest level, but it's not a requirement anymore to do game development.

    When I started working on orx back in 2001/2002, it was out of frustration with the game technology I had to use on an everyday basis. I tried to come up with a better architecture for a non-hardware specific game engine.

    A decade later I do believe this goal has been reached (and I've seen many more game engines/libraries over working at six different companies).

    I think orx is very competitive in the field of 2D game development and offers quite a lot of interesting features for game developers. Unfortunately, with a very small dev team, we're lacking some nice features such as a nice editor, for example.

    Orx uses plugins for providing low level services. On computers, one set of these plugins uses SDL, that's what is mentioned on the wikipedia page. It's not the most efficient nor up-to-date set of plugins though, focus has been given to GLFW over the past couple of years.
    And don't worry ORX community is very small but is very very helpful. You won't get lost, even in your worst failures :)
    I concur! The community might be small but is also very reliable and, most important, very kind and willing to help others. That's priceless. :D
  • edited July 2013
    Thank you guys.Yes you guys are really helpful.

    I saw that the community is small but now I know they are effective.

    I successfully setup VS 2010 and compiled a standalone.

    I was just copy pasting the tutorial code just to see whether it is working.Now going to study it.

    Keep in touch please.Thank you
  • edited July 2013
    Ohh and please guys tell me this.

    My main intention is to get into andriod game development.Because playing 2D games in android is different than playing a 2D game in a PC nowadays.

    So is ORX working fine with android?
    Will I get stuck when I get into android game development using ORX?
  • edited July 2013
    Orx is working fine on android which is just one of the supported platforms.
    There were already a couple games released there. You can find some of them in the projects section of the forum.
  • edited July 2013
    Thanks.i will check them out.is it possible start by targeting the android platform straight away?
  • jimjim
    edited July 2013
    A small piece of advice, developing of android itself is quite challenging, if you have no prior knowledge of android then I would not recommend to start developing for android right away.

    Take your time, learn Orx first or learn android first. By learning android I mean, learn how a basic android app works, what's manifest, how to setup a simple NDK project in android. how to run a simple C code in android.After that learn Orx for desktop. Once you got down the basic of Orx, then try to setup for android.

    Remember developing for android is also challenging as debugging is not as easy as desktop, in fact with andorid NDK there is no way to debug your game afaik.
    Also android comes with different screen resolution and sizes. Making your game suitable for all devices is gonna hard.
    Another thing is, you need to know some java and jni, if you want to add third party tools for ads or iap.

    Choose wisely, its important which way you want to go first :)
Sign In or Register to comment.