Xiaoyu (game engine)

Interpreted this as “JME is not designed JUST for games”…

Though it kind of is and that’s why people have problems making CAD-type applications with it.

The only thing all these games have in common are the big budget/production value. So, assuming we have very deep pockets then yes it’s very possible.

That’s too bad however, because just until yesterday I had a million dollars which I didn’t know what to do with; so I just threw it out of the window.

1 Like

I just wanted to here it. You gave me the hope of life. thanks.
I think no thing can prevent a torrent of world wide community of open source jme.
I have a really great game project in depth of my mind that I will release later. It just need a great group work.(that worried me a bit). but after finding this great forum and become familiar with jme society . I get assured.

As much i like jme, it might be even performant enough for call of duty style games, it lacks a lot of necessary features to create an openworld title like watch dogs.

Sure deep budged for assets helps a lot, but you also require a high performance asynchron engine. But it is good to see also the big players do not always get the data streaming working as it should :wink: I really love to see engine glitches in the million dollar projects… :chimpanzee_amused:

So back to topic. Regarding this engine, do you have any benchmarks showing the exact same scene in jme and your engine?

Last I tried Watch Dogs on PC, it was running at 20 - 25 FPS, had random frame drops and visual glitches - and this was on the lowest settings. There was a big stink about it online about how it won’t run on even the best PCs…

Not exactly the massive performance I would have expected out of “asynchron engine”.

Questions…

  1. Will it be free and/or free source ?
  2. Will it work on witch compilers / systems, just in linux as you said before ?
  3. Will it have an interface like Unit to code in events or more like pure code as Jm3 ?
  1. It will be open source. Likely something like gplv3 or bsd.
  2. I don’t use the open/read (i.e. man 2) functions, so it should work under all major systems. I use SDL2 as a backend (and i try to have some conditionnal compilation to switch from SDL2 to SDL1 with just a flag), plus opengl for the rendering. So, everything should work under windows and under mac os. I’ll maintain more the linux version and if i need some non-portable code i’ll add it. However, everything is pretty modular and fullfill a precise job, so if a part of the code is not portable “as is”, chances that it will not be possible to port it with some conditionnal compilation are low.
  3. i don’t know Unity. However, i plan to add something like javascript but for 3D objects: “onLook”, “onClick”, “onWalk”, “onHit” etc. This is a possibility. An other possibility is to have a system like the Papyrus script for TES, and let the script do the lookup about the onLook etc (and then i can use my device system here too). I can also mix them, with the first idea + a “onFrame” event, or a “setTimeout” system. The main problem is that i don’t want to be fps-specific, and in an rts a onlook doesn’t make much sense.

Tried Lemur’s InputMapper?
Since I used it I can’t use the classic inputManager…
There are a lot of things in Lemur that are not directly related to GUI that we should consider bringing into core, IMO.

Sorry to derail the post

1 Like

You might want to take some time to research the various Open Source licenses you are considering. There can be a vast difference between them. For instance, GPLv3 would essentially restrict anyone who uses your engine from ever doing a proprietary game. The would have to release the entire game as GPLv3 or compatible.

If that is what you intended, that is fine. But if you then accept pull requests for enhancements or buxfixes, you could end up stuck with the same restrictions for your own games. It would be a lot easier to pick a license in the first place that captures the spirit of what you want to do than to try to contact all of your contributors some time down the road to get permission to re-license.

1 Like

I agree with all of this, you are perfectly right. Humanly said i’ll look for something like this:
“free for all use. Put a logo “powever by xiaoyu”, or an indication somewhere about that”
I’ll reconsider it later. I am not at this stage of the developpement.

I investigated a bit about script languages (as integrate a script language is not as easy in C++ than it is in Java) an so far i didn’t find anything good. Oh, there is a lot of pretty nice languages an even C++ integration of them (like lua etc) but I don’t like most of them (for precise reasons, it’s not about feelings or anything like that).
What i am looking for (just if you want to know):

  • strict syntax. Potentially a lot of people will write script and share them etc, if the syntax is lazy and everything code in its own way (indentation etc.) the result will be a mess. It’s not like a “core” language, a script language is going to be a source of bugs and a lot of people will have to work on piece of code they didn’t write. So, it must be as strict as possible.
  • JIT compilation. Again, even if it’s not a good practice to have one hundred and half script running at the same time, people will do that. So, performance is mandatory.
  • Clean memoy usage. No memory leak, mandatory.
  • /!\ non turing-complete language. It’s doesn’t mean “no-loop” but it means “no-forever loop” and no recursive call. A script should never hang. If someone NEED a “forever-and-in-one-frame” loop then … write a plugin and don’t use the scripting language. And don’t cry when your game hang :stuck_out_tongue:
  • Saving/Loading script state.
  • Synchronization.

The JIT compilation can be replaced with a “at-start” compilation. I will investigate a bit more but i know how yo use lex and yacc in Java (it should be easy to do the same thing in C++). I’ll likely post a zip with an interpreter/translator tomorrow or the day after, if someone wants to give it a try.
And there is a reason behind this: a game-script language is a very specific language. I mean: batch language are specific language, and i don’t think that a lot of programmers would disagree with that affirmation. You can do batch in C or even in ada/fortran/assembly language, but it’s not a good idea.
Same thing for “web browser” language, they are specific (limited authorizations etc).
game-script are also specials. You can use any language you want but they’ll be “meh … ok”.

And i think i’ll have a syntax like this:

scriptname foo;

/* variables used to communicate with the script */
externs:
  natural a_var;
  real an_other_var;
end

/* internal variables */
interns:
  natural toto42;
end

functions:
  natural add:
    /* inout variables */
    externs:
      natural a;
      natural b;
      natural result;
    end
    /* body of the function */
    set result to (a+b);
  end
end

body:
  set toto42 to add(a_var, an_other_var as int)
end

Not sure about anything, don’t throw out :stuck_out_tongue:

I’ll maybe add an explicit block “body” to the function. The idea is that a script is called every “X” event ( a frame ? a “onlook” ? etc) and deals with it externs parameters that are the only way to communicate with it.
I didn’t said if the functions can access these parameters (if they are methods or static methods) and it’s because it’s a big question for me. Maybe, maybe, a game-script shouldn’t make a distinction between an object class and an instance of that object. To rephrase that: maybe that an object should be its own class and people should be able to “clone-and-modify” it to extend it.

Well, anyway: i’ll keep investigate on existing languages and i’ll come back to this later.

Here is the result for the scripting language this far. It not even a pre-alpha, just a bunch of code that compile and parle code and print something.
I also started to write a small “evaluator” but the final version should only compile the code (to assembly language directly OR to c/c++ then gcc OR to a custom byte code). Keep in mind that there is only 2 day of work on that thing and that i never used yacc/lex before.

You can compile the code with “php Makefile.php” if a php-cli is installed on your machine, or run the “commandes.txt” that contains a code produced by the Makefile.php.
You need to have yacc lex installed on your machine.
There is a lot of dirt hack in that. Actually, i just post it here as a proof of concept and a “i can do it” evidence :stuck_out_tongue:
I’ll keep working on this code, it’s going very well (i didn’t met any huge problem). Keep also in mind that i don’t have internet during the day, only during the evening.

(the code, in zip)
http://www.filedropper.com/xscript

This syntax is completely obscure to me, it looks like a mix between python pascal and gambas.
I think that, since the engine is written in c++ and shaders in glsl (i guess), a scripting language with c-like syntax would be better.

If you need to compile, what is the value/interest of a scripting language ?

I need to compile it at runtime (or at start). The interest is that you will be able to hot swap some part of code or even have an ingame console where you’ll write commands. Also, with a scripting language without loops you can ensure that no script will hang and freeze the game. You can also save and load scripts cause you know exactly how the memory they use is managed. And, the last but not the least: you can control authorization on script, and avoid any security breach.
If you do everything in c (or C++) you have a turing complete language AND the risk of buffer overflow, always. If you have a aa script language you can add tests and verification when you compile it (making it a bit slower than a “real code”.

The base of your question (and where your mistake is) is the mix of two concept: scripting language and interpreted language. A scripting language is a phylosophy, an interpreted language is a low level indication on how the language is handled.
And, for the record: Bethesda compiles its scripts (in Morrowind etc.).