Re: package file request

That's ok, don't worry,
it's not a heavy lib, we will see that later if it is really worth it.

I finished a first pass of the mesh bin, there is still the animation files (separate xml),
and I need to do the reader to be sure the writer is working, right now it's untested.
I'll see if I can continue a bit tomorrow and this week-en at least.

Re: package file request

I managed to get scons building everything again. I even found out how to make it build separate libs, although I still need to do the refactor to make that much work.

When I build with scons, however, it doesn't copy all the necessary DLLs into the prod folder, as the Visual Studio solution does, which means that the publisher doesn't pick them up and realise that they need to be copied also. I ended up with a blue screen, when I copied the DLLs, it crashed. I'm not exactly sure what's going on. I'll have to see what I can find out tonight.

EDIT: just turns out I somehow copied the wrong DLLs

Last edited by Nistur (2012-01-17 16:56:16)

Re: package file request

I still have a little more tidying up to do before this is ready. I now have the player loading first from argv, if a parameter is passed, secondly it's checking to see if there's been an embedded project set (at the moment doen't happen) and finally it falls back to checking the local directory for an mproj file. I am just trying to push the data into the executable tonight. I've sorted scons, although I need to test it on Linux. The only thing left is writing the binary data files smile I won't have a chance to test the OSX publishing though, so I'm almost definitely doing something wrong with it.

Re: package file request

Some final tests and the publishing should be uploaded tonight! As I said, some of the publishing steps will have to be updated for OS X because I don't really know where things should go. I guess probably all inside the .app somewhere...

But yes, I've basically just pushed the project data into the player application, which also has it's name changed to the name of the mproj. The data files are all added to the npk file apart from levels/ and meshs/ which, the folders are currently just copied in their entirety. The Game.dll is copied (if it exists) and I have also set up copying the plugin/ folder if it exists. Running the executable should then automagically run the game.

Just got to compile it all for Linux and check that it all works fine there, then I'm done and it will be uploaded smile

EDIT: Just a point, but the plugins will need to be kept up to date with the engine, otherwise they'll crash. Just ran a test with the water demo and was wondering why it wasn't working tongue

EDIT: Linux test complete. I had to change a bit of code because I forgot to change the mode of the executable... but I added that smile I'm just going to reboot to Windows, update the VS2005 solution, clean out all build files etc, then upload smile Should be up in about 30 minutes smile

EDIT: Uploading smile

Last edited by Nistur (2012-01-18 23:13:15)

Re: package file request

Tadaa! uploaded. I very cleverly decided to remove the .svn directory and all compiled/generated files, which brings the zip to a lighter 22.2MB. Same location as last time
http://nistur.com/maratis/maratis-npk.zip

Enjoy smile

Tested on:
Visual Studio 2005
Visual Studio 2010
scons (linux)

Last edited by Nistur (2012-01-18 23:26:28)

Re: package file request

Great. I had download it, compile failed at first time, I'd to remove comment at import npk_dev, and add libX11 and libdl (I'm using linux), and compile success,
any example of using npk?there is no in any folder.

To make executable we must push the project into the player application? So the game license must be GPL?

Thank you.

(Sorry for English if bad, I'm not native English)

Re: package file request

Hi, sorry, I don't know what happened with the linux compilation, I tested it and it seemed to work.

When I say I "push the project" I just overwrite some static strings in the executable. As far as I can see there's no more reason for the game to be gpl than because it is compiled with gcc.

Sorry I didn't include an example with this download, if you try any of the examples in the binary engine download from the maratis homepage and open it in the editor, if you select "publish project" from the file menu, it should work

Re: package file request

Ahh, I didn't see the "Publish Project" button before, I think I must include npk by myself, lol,

And I think I must develop game under MaratisPlayer to make it standalone, that's why I ask for license since MaratisPlayer was GPL, and if I derived it, it must be GPL too, right?

I test to publish on some example, and it's great,
It's produce executable, and I can play it directly. Cool!!

But I didn't see one package npk file,
all file mesh, level, maps, etc still at their own folder,
any plan to packaging all file to one file?

Re: package file request

Yes, at the moment the xml based files can't be added to the npk but Anael is working on binarising them. That should be added soon smile if you check in published/ you should find everything you need to go, the npk, the executable and any other extra data/libs

With regards to the license, from what I see, MaratisPlayer is zlib, MaratisEditor is gpl. Using the editor as a tool wouldn't require anything made with it to be gpl. I believe that's how it works. There's a topic about it somewhere on the forum, I would link it but I am on my phone right now.

Last edited by Nistur (2012-01-19 08:55:11)

Re: package file request

That sounds great, I'm waiting for it. big_smile
I think Maratis is easier, simpler, but powerful than unity smile

I look at MaratisPlayer it's GPL.

Last edited by jurgel (2012-01-19 09:14:39)

Re: package file request

Cool, I'll check the download files when I have some time.

About the license :
- The engine is Zlib (MCore, MEngine, MGui, contexts, loaders...)
- Maratis and MaratisPlayer are GPL

MaratisPlayer is just a player, your game doesn't have to be open source because you are using it, that's why there is a plugin system, your game, data, scripts and plugin code doesn't have to be open-source.

The only thing you have to do, is, if you improve the Player, you have to release the source in GPL, so it benefits all the community. If you look at MaratisPLayer code, you'll see there is not much, it's basically loading the engine and plugins and running the game loop.

Re: package file request

jurgel: Sorry, I was mistaken. With regards to having to make your game open source, I don't think that will be an issue, as you're just setting 3 C-strings inside the player. I guess I would have to check that to be 100% sure, but I guess if it's an issue you can get the player source code, change the strings it compiles with (something like [EMBEDDED MPROJECT GAME NAME GOES HERE]) replace it with the relevant ones for your project, and provide the source code of your change in case anyone wants it...
EDIT: I forgot to mention, the player executable, even though it has a different name after publishing, will still work the same as the standard player if you pass it another .mproj as a parameter. It remains entirely unchanged apart from the 3 strings.

Anael: No worries. I have a couple extra changes to make, such as allowing the developer to set the teakey for encrypting the package, maybe custom package extensions in case people want to obfuscate a little more... but I will wait for that until you've checked it into svn along with any OS X changes. Oh, and I'll add more comments and documentation. I'm good at forgetting to do that.

I'm sorry that I couldn't sort the OS X publishing myself, Macs are in surprisingly short supply at work and setting one up for a short while at lunch wouldn't make sense. I don't think it will be a big change. Mostly just moving the locations to the correct place inside the .app I guess. For now it doesn't embed the project either, but the code for that is in both the linux and windows sections, and it's fairly self explanitory smile

Last edited by Nistur (2012-01-19 09:47:17)

Re: package file request

@Nistur
Just to make it clear, I don't have to make my work to be GPL when I publish it using your method, right?

Oh, I've create a project, it's contain level, maps, mesh, script, plugin, and sound. After I publish using your method, I only get executable, level, mesh, plugin, and other library. So there isn't maps and script, and I have to remove sound to avoid MaratisEditor crash, is it a bug?

In the newer version of maratis, sound ogg format support was removed?
I can't play ogg now.

Re: package file request

Jurgel: I've asked around a few people who are more versed in GPL than me. GPL respects trademarks There is a slight modification to the GPL library, but potentially, the solution to that is to provide MProject.cpp on your project website with the strings changed. There is no reason why the game itself should be GPL.
EDIT: I should point out that as far as I can see, not even the stricted GPL fanatic would complain if a(n at least small scale) project didn't do this. The procedure is simple to see in the source code and nothing is really changed. If it will make you happier, I will get the publishing process to modify and copy the .cpp into the publish directory too.

The reason there aren't font/, maps/, script/ and sound/ is that they are packaged into the .npk file. soon meshs/ and level/ will follow suit. It required a bit more work though.

With regards to the crashing with sound, do you mean from the published project? Or in general? Maratis should support ogg. I tested with an mp3 I downloaded from jamendo and converted to ogg when I added sound to the packaging. If you can provide reproduction steps, I will check and see what it is.

Last edited by Nistur (2012-01-19 10:25:31)

Re: package file request

Thanks for explanation. You make me clear.

In old version editor (from this web -> Download) ogg sound works perfectly,
In the latest svn, when I open editor from terminal, there is error, here it's "ERROR Load Sound : non supported format", but still open without sound.
In your publish project, when I open editor from terminal (player too), the error is Segmentation Fault, that's mean crash.
But after I remove sound, work perfectly on all version.

How to reproduce:
-> open ./MaratisEditor (or ./MaratisPlayer with project path) via terminal (or just double click for MaratisEditor)
-> load project (contains ogg sound in my project)
-> crash (Segmentation Fault) or sometime it didn't crash but project not loaded (empty workspace)

Thanks.

Re: package file request

Jurgel : did you use the program that is inside the prod/ directory (don't use the one in build/)

About the GPL and embedding files in a GPL executable :
I checked and files embedded inside a GPL executable are then covered by GPL, but in this case it means only the .mproj file that contains 3 lines of text, it doesn't connect with the game itself.

You don't need to copy the cpp with the project, as the source code is freely available on Maratis website, MaratisPlayer source code as to be released only if there is a "real" modification. But we should release the game with a MaratisPlayer licence-text explaining the game is using MaratisPlayer, licensed under GPL, and that the source can be downloaded on www.maratis3d.org.
(I'll make the text file)

Anaël.

Re: package file request

What the differences between prod/ and build/ ?
I copy MaratisEditor and all lib from build/ to my old MaratisEditor, is it wrong?

About license, so I have to release the game with MaratisPlayer? and the game just as a dynamic library?
What if I make it static?Like Nistur publishing method do.

Thanks.

Re: package file request

- in prod/ are all the final executable and libs, ready to use. In build there is only the executable.
If you just copy to your old MaratisEditor it might be wrong because the libs can be out to date (MCore and MEngine specially).

- Nistur publishing is not making the game static, the game files are still outside the executable, he is only embedding the .mproj file that basically tells what level need to be opened first and what is the rendering engine.


A full static executable would be like ManualUse example, where your game code is into the executable and not inside the Game plugin (dynamic library). If you want to do that and not be bound by the GPL, you have to do the engine init manually and to use some 3rdparty lib as dynamic libraries (DevIL and libsndfile).

Re: package file request

I'd copy MCore and MEngine too, and now I'd copy from prod/ dirs, and still have the error message "ERROR Load Sound : unable to read /home/jurgel/Downloads/Maratis-3.02cBeta-Linux_x86-32/Examples/test/sounds/spring.ogg file".

To make a game in IOS, the game must be static, isn't it?
so we have to implement player and some library manually, and compile all to one file, it's true?
I'd never develop app on IOS before.

Re: package file request

- We'll have a look at the ogg thing, I'm not sure right now why it is different than the pre-build beta you downloaded.

- The ios publishing example is 100% zlib and is not using DevIL nor libsndfile.

- If you don't have to modify MaratisPlayer, then you have nothing special to do, you can just publish your game as-it.
- If you want to modify MaratisPlayer you have to publish the source of your modification.
- And if you want to build all static, you have to deal with Maratis engine manually and be sure all the LGPL 3rdparty libs are dynamic.

Re: package file request

Hmmm. I've just tried building Maratis with scons on Windows quickly, it seems to fail because it can't find zlib. Meh. I'll fix it and upload a new version. Also with the change to __init__.py which I swear I made...

I'll have a look whether the Windows version breaks with the .ogg. It's probably something to do with my file loading wrapper tongue
EDIT: I can't fix Linux stuff until I get home tonight

With regards to DevIL. Not that I particularly advocate switching libraries at this stage, but FreeImage has a dual license so you can use it for commercial projects.

Last edited by Nistur (2012-01-19 12:27:39)

Re: package file request

I got it.
Thank you very much big_smile

@Nistur
Thanks for the link.
and I'm waiting for stable official release of Maratis big_smile

Last edited by jurgel (2012-01-19 12:36:37)

Re: package file request

To go back to the packaging,
I think I have the bin mesh done, I need to test and do the reading to be sure,
in one example a 4mo xml mesh makes a 700ko bin mesh. It should also be 4 to 8 times faster to read...

Re: package file request

Anael: That's good news. Loading times were pretty slow before wink

I've made the changes to make scons work under Windows again. Seems like I forgot to copy some files back over from when I was doing Linux testing...

jurgel: I'll just test the ogg stuff. Can you make another topic in the bugs about it please and I'll look into it, rather than sorting it here. Also put whether or not it happens on the release, svn, or just my npk version. Thanks

Re: package file request

@Nistur
Ok, check bug report

Thanks.