Page 1 of 6

Yae - Game engine for MoonScript, in MoonScript

Posted: Mon Mar 30, 2015 6:15 pm
by deathbeam
Yet Another Engine

Image
Kaizo: Oh! Even someone with a tender face like yours has a great weapon like that! It doesn’t fit someone like you!
Yae: Eh? This bazooka?
Kaizo: Yeah! If I had that weapon, I could have the power of a million people! Well, give it to me! Give it to me!
An engine you can use to make games in MoonScript. It’s free, open-source, and works on Windows, Mac OS X, Linux, Android, iOS and Ouya.

Installation

Code: Select all

luarocks install --server=http://luarocks.org/dev yae
Getting Started Documentation
The Wiki contains all the information you’ll need to write game. You can contribute to the Wiki directly here on GitHub! Also, you can view online documentation generated right from the source code.

Reporting Issues
Use the issue tracker here on GitHub to report issues.

Re: NÖN [Windows, Linux, Mac OSX, Android, iOS]

Posted: Tue Mar 31, 2015 7:55 pm
by deathbeam
Hello, hello ;)

Right now I finished new version (v0.6.4). It includes one awesome feature what is unique to every other Lua game engine, and that is direct interoperability with Java. Small example on how to use Apache Commons IO (popular Java library with many IO utilities).

1. We will add dependency to config.yml

Code: Select all

  libs:
    - "commons-io:commons-io:2.4"
2. Now, we can use it:

Code: Select all

function non.ready()
  fsu = non.java.bind("org.apache.commons.io.FileSystemUtils")
  freeSpace = fsu:freeSpaceKb()
end

Code: Select all

non.ready = ->
  fsu = non.java.bind "org.apache.commons.io.FileSystemUtils"
  freeSpace = fsu\freeSpaceKb!
Also, I added documentation for new non.java module here.

Click here to see full changelog

Re: NÖN [Windows, Linux, Mac OSX, Android, iOS]

Posted: Tue Mar 31, 2015 8:07 pm
by I~=Spam
This is interesting... I like to compare performance (of course LOVE will be faster as it is c++).

What features have you implemented? One thing that it too bad is that if one is to run a game written with this they must have java installed... A lot of people won't like that. One of the things I really like about LOVE is how few dependencies it has and how small the executable is.

An entire java runtime isn't exactly lightweight... but I think most comps have java on them though.

Re: NÖN [Windows, Linux, Mac OSX, Android, iOS]

Posted: Tue Mar 31, 2015 10:20 pm
by deathbeam
Yes you are right, LÖVE would be faster, but only because it is using LuaJIT. It is almost impossible to create thread-safe cross-platform JIT. So my only choice is to use AOT compiler, what I am planning to add. Plus about Lua backend I am using is that it can even compile Lua to Java bytecode what means really really greag performance (not implemented yet because of thread safety I must handle).

Also, you are a bit wrong about C++ vs Java performance, because backend for audio and graphics what I am using is in C++ and compiled as native for Java.

But downside of working with Lua in cross-platform manner is that you won't be able to use C -> Lua calls, because of that I added replacement to support Java -> Lua calls (along with integration of mvnrepository).

To what I implemented, here is full list: http://nononsense.science/docs
As you can see, I also included networking library because of limited support (if any) for native lua sockets.
Also, planning to add physics and lights engine (I already had them in engine before but I was tidying API a bit and decided to remove them until I will finish stable version).

And yes, you are right about that Java dependency. But after Minecraft boom I am sure that people have Java. I was trying to find some solution what will automatically download and install Java if not present. I do not found anything so :( But atleast I found a way how to automatically install Android SDK if not present, so at the end, having only Java and LuaRocks installed and being able to build for Windows, Linux, Mac and Android is not that bad.

Thanks to Apple (-.-) , building games for iOS is only possible from Mac. And no, I saw in other forums that you can fake it by using some virtual machine tool, but that's not true. You need also Mac hardware to run xcode (atleast from what I know).




So yes, NÖN is slower than LÖVE and even with AOT compiler it will always be (but it won't be noticeable). And yes, it have heavy dependencies. But you can build games in Lua (and MoonScript) for all platforms, with LÖVE-like awesome API with single tool what will behave exactly same on all of them.

Re: NÖN [Windows, Linux, Mac OSX, Android, iOS]

Posted: Wed Apr 01, 2015 2:36 am
by I~=Spam
deathbeam wrote:So my only choice is to use AOT compiler
Great idea!
deathbeam wrote:But downside of working with Lua in cross-platform manner is that you won't be able to use C -> Lua calls, because of that I added replacement to support Java -> Lua calls (along with integration of mvnrepository).
:(
deathbeam wrote:To what I implemented, here is full list: http://nononsense.science/docs
Wow you have added a lot of features so far! Great work!
deathbeam wrote:Thanks to Apple (-.-) , building games for iOS is only possible from Mac. And no, I saw in other forums that you can fake it by using some virtual machine tool, but that's not true. You need also Mac hardware to run xcode (atleast from what I know).
Yeah I think it is pretty stupid too. :\

Re: NÖN [Windows, Linux, Mac OSX, Android, iOS]

Posted: Wed Apr 01, 2015 3:18 pm
by Murii
Hehe,awesome :)

Re: NÖN [Windows, Linux, Mac OSX, Android, iOS]

Posted: Wed Apr 01, 2015 6:44 pm
by deathbeam
Decided to change API to be mostly compatible with LOVE. Be ready for next update ;) Also, working on IDE.

Re: NÖN [Windows, Linux, Mac OSX, Android, iOS]

Posted: Fri Apr 03, 2015 6:12 pm
by deathbeam
Finished porting non.files. Now it is non.filesystem and it is fully compatible with love.filesystem. Also, ported love.timer, love.system and also 80% of love.graphics and love.audio. Also, thanks to this project https://github.com/hagish/love-android I found a way how to optimize engine for almost native java performance.

And, decided that I will make my IDE for NON (what I have almost finished) be compatible and be able to build and run also LOVE projects.

Here is old image of NIDE what I made for very old version of NON. Currently, I am making small changes to make it work with current version and adding support for LOVE projects:

Image

Re: NÖN [Windows, Linux, Mac OSX, Android, iOS]

Posted: Fri Apr 03, 2015 8:09 pm
by I~=Spam
deathbeam wrote:Decided to change API to be mostly compatible with LOVE. Be ready for next update Also, working on IDE.
Great!
deathbeam wrote:I am making small changes to make it work with current version and adding support for LOVE projects
That would be really awesome! Great idea! :awesome:
deathbeam wrote:and in NÖN you would do this:
CODE: SELECT ALL
whale = non.graphics.image("whale.png")

function non.draw()
  non.graphics.draw(image, {
    x = 10,                   -- x position of the image
    y = 10,                   -- y position of the image
    width = 100,              -- to what width will be the image scaled
    height = 100,             -- to what height will be the image scaled
    rotation = 20,            -- rotation (in degrees)
    origin = { 15, 15 },      -- around what point will be the image rotated and scaled
    scale = { 2, 2 },         -- scale of the image
    source = { 0, 0, 50, 50 } -- source rectangle on the image texture
  })
end
I like this. Great idea. But I think that there should be a function overload that doesn't use a table too to be nicer on the lua garbage collector if the programmer wants/needs to. ;)

How long have you been working on this "port"? Seems pretty complete already. :)
deathbeam wrote:And, decided that I will make my IDE for NON (what I have almost finished) be compatible and be able to build and run also LOVE projects.

Here is old image of NIDE what I made for very old version of NON. Currently, I am making small changes to make it work with current version and adding support for LOVE projects:

Image
This looks great! Nice and simple. With it have documentation autocomplete support? Maybe you could make a fork/plugin of github's atom text editor for this so you don't have to write the text editor itself to make it easier.

Re: NÖN [Windows, Linux, Mac OSX, Android, iOS]

Posted: Sun Apr 05, 2015 6:22 pm
by deathbeam
I was working on this "port" for a long time. But I was gaining courage to post it also here ;) I am having small problems with metatables in LuaJ backend right now, but most of API is already finished. Only thing left is non.graphics module and make Source, File and Image objects working (as I said before, having some troubles with userdata and metatables).

And yes, I will try to add autocomplete support to IDE. As I am using pretty nice script area Swing component (Swing is GUI for Java) what supports adding your own autocompletions, it will be easy.