1

(4 replies, posted in Editor)

I am working on an updated version for Code::Blocks+MinGW32. I noticed that Maratis 3.21 has now a CodeBlocks10 project file, but it works only with Cygwin. There are also no Code::Blocks+MinGW project files to compile the 3rdparty libraries, which would be very useful.

2

(10 replies, posted in General)

I added kNet into my Maratis for MinGW version, and it was very easy to compile (just like Maratis). It compiled even on my Debian server, and it compiles also for Android and many other platforms.

3

(5 replies, posted in Engine)

Now I finished my proposal for r100, and uploaded all source code.

I called it r100_Lumooja_v1, which has the following changes over original r99 SVN:
1) Wrote in file trunk/dev/MSDK/MCore/Includes/MFile.h in line 33: #include <cstdarg>
2) Added #ifndefs for redefined original GNU C++ macros of stat.h in 3rdparty/dirent/include/dirent.h
3) Opened file trunk/dev/MSDK/MGui/Sources/WIN32/MWin32Window.cpp in WordPad and saved as plain text
4) Added Bullet 2.8.0
5) Added FreeType 2.7.9 (Note! When compiling freetype, it creates 3rdparty/freetype/objs/win32/CodeBlocks/libfreetype249.a, which must be manually moved into 3rdparty/freetype/win32/libfreetype.a (same for freetype.lib for Visual Studio 2012))
6) Added CodeBlocks project files for all projects
7) Added Visual Studio 2012 project files for all projects

Download complete source code:
https://sites.google.com/site/maratis3d … ooja_v1.7z

I hope anael you can manually merge into the official r100 what you like, then my Lumooja branch can get less differences. These are the minimal changes to get Maratis to work with MinGW and Visual Studio 2012.

My next plans are to expose more functionality to C++ and Lua. For example I saw also that there is indeed a per-light ambient setting in the engine, which would be nice to expose to C++ and Lua API too. Currently all-light ambient is just pure black.

Then I also noticed that Editor has a "duplicate" function, which some users have asked to be available in C++ and Lua API too, and I think this would be quite easy to transfer.

I only know that even a simple: if(varType == M_VAR_BOOL) crashed it. It was like varType was not readable at all, and caused a segment fault. The crash occured always after a call to some function of user32.dll, so I thought there was going on something instable. Of course the real leak might be somewhere else, but when code crashes which shouldn't crash, it's very hard to debug it. I've seen this before also in BlendELF, and there also a printf("") fixed the crash.

5

(4 replies, posted in Bug report)

In r98 the file is still wrong when using Code::Blocks. The only way I found to fix it, is to open it with WordPad and then save as text.

The new MString.cpp didn't help. But adding a MessageBoxA() or printf() to access the varType parameter fixed the crashing:

void MaratisUI::addValue(MGuiWindow * window, const char * valueName, M_VAR_TYPE varType, void * pointer, MVector2 * position)
{
    float size = 16;
    float ySpace = 15;
    MVector4 color(1, 1, 1, 1);
    MVector4 valueColor(1.0f, 0.95f, 0.45f, 0.85f); // 1.0 0.97 0.33
    MVector4 variableColor(0.66f, 0.76f, 0.87f, 1.0f);

    printf("%d",varType);   // wierd bug fix!

    if(varType == M_VAR_BOOL)

There must be somekind of memory leak going on in the user32.dll or somewhere, when these kind of wierd fixes stabilize it.
Everything works fine now, and this hack doesn't take any performance either, because it's only called 4 times when "add camera", "add light", etc... is pressed in Editor.

Oh well, I found a funny bug fix: just disable the whole MaratisUI::addValue() method and everything works and doesn't crash anymore:

void MaratisUI::addValue(MGuiWindow * window, const char * valueName, M_VAR_TYPE varType, void * pointer, MVector2 * position)
{
    return;    // funny bug fix!
    float size = 16;
    float ySpace = 15;

Surely this function must do something useful, what could it be?

EDIT: Ok, it seems to be a useful function after all, because it's needed for example for changing texts. But now it should be quite easy to find out on which line it crashes.

I get this kind of disassembly when I run in debug mode and click on "add camera" icon in Maratis:
https://sites.google.com/site/maratis3d … crash1.png

I wrote this on the Maratis for MinGW webpage:

Support issue: Maratis Editor crashes when trying to add entities. As workaround, you can load the demo project, then click on an entity on the left side list, and after that it doesn't crash anymore. It must be some issue with missing NULL initializations in the MGui code, which MinGW elegantly optimizes.

I hope this helps to find the bug in the source code.

10

(5 replies, posted in Engine)

I added now also Bullet 2.80. It compiled without any code changes, like FreeType 2.7.9 did too.
I think Maratis is now the first engine which has Bullet 2.80! smile

11

(5 replies, posted in Engine)

Thanks!
Yes, I was hoping you would add the .cbp project files and FreeType 2.4.9 to the official SVN, once I have polished and published them.

12

(5 replies, posted in Engine)

I uploaded the recompiled MinGW version of Maratis here, it includes Maratis.exe, MaratisPlayer.exe, ManualUse.exe:
http://sites.google.com/site/maratis3d

It should be theoretically a bit faster (around 8%) than the official Visual Studio version.
Next I will upload also the project files for Code::Blocks.

13

(15 replies, posted in General)

Network support is relatively easy to include as another 3rdparty lib. I would use SDL_net with a MMO handler. I have the source code somewhere, and can find it again on the net. They said they tested it with 30000 players and it worked very fast.

14

(15 replies, posted in General)

Compiling Maratis from source with MinGW needs only one little update: The latest FreeType 2.4.8. Everything else compiles with the supplied 3rdparty libs in the SVN trunk.

Bullet has very advanced collision handling (I love how you can configure it how to behave when bodies overlap, and the CCD (Continous Collision Detection) collision demo is simply amazing - you can shoot at insane speed and objects always hit), and with Maratis there comes even a demo which shows how it works. I think it's done with Lua though, but it should be not a big deal to make in C++ either. I will need it too for the game I am doing.

15

(15 replies, posted in General)

Yeah, no problem. I can upload it somewhere on google sites, and also the .cbp project files for Code::Blocks IDE, so you can compile it yourself (and maybe anael wants to copy them into the official source too).

16

(15 replies, posted in General)

I've tried many engines, and Maratis has all the specs I didn't find in other engines:
1) Written in C++
2) Usable with C++
3) OGG support
4) PNG support
5) TTF support
6) OpenGL support
7) OpenCL support
8) Bullet
9) Scriptable with LuaJIT
10) Usable with Code::Blocks and MinGW (because it makes around 8% faster code than VS, and compiles 30 times faster, and has better ANSI C++ support, and more C++1x features, and makes 64-bit code, and has native Linux support too)
11) Expandable Game and Editor with C++ plugin DLLs
12) Free
13) Source code
14) Active development and support
15) 32-bit and 64-bit Windows and Linux support
16) Android support (hopefully soon, or I could try to make it myself after testing the Linux version)
17) Support for own shaders
18) Fixed pipeline renderer support
19) Blender 2.5x exporter
20) Extremely fast (especially if you have seen the MinGW version)

17

(4 replies, posted in General)

Bullet 2.80 is deterministic, so it will give the same results on all computers. However, I noticed that Maratis does not work directly with Bullet 2.80 yet, but I hope it will be fixed soon, because Bullet 2.80 has now also OpenCL GPU acceleration on all GPUs, which is very important when you want to make your game logic based on physics for the most part.

Now I got everything compiled with Code::Blocks and MinGW: Core, Engine, Player, Editor.
Looks like the easiest way to start writing a game in C++ is to use MaratisPlayer source and add there all game related stuff.
This is a great engine, and source code is incredibly clean and well written, thanks anael!

Ah, I found in some other post that Maratis uses a custom TinyXML version, now I got it to compile TinyXML without errors, using this version:
http://code.google.com/p/maratis/source … y/tinyxml/

I'm trying to compile Maratis (Core, Engine, Player) with MinGW, but it seems the latest TinyXML is different than the version used in MaratisPlayer:

C:\lib\Maratis-3.02-sources\Maratis\Common\MFileManager\MLevelLoad.cpp||In function 'void readLightProperties(TiXmlElement*, MOLight*)':|
C:\lib\Maratis-3.02-sources\Maratis\Common\MFileManager\MLevelLoad.cpp|341|error: 'class TiXmlElement' has no member named 'QueryUIntAttribute'|
C:\lib\Maratis-3.02-sources\Maratis\Common\MFileManager\MLevelLoad.cpp||In function 'bool M_loadLevel(const char*, void*, bool)':|
C:\lib\Maratis-3.02-sources\Maratis\Common\MFileManager\MLevelLoad.cpp|529|error: 'class TiXmlElement' has no member named 'QueryUIntAttribute'|
C:\lib\Maratis-3.02-sources\Maratis\Common\MFileManager\MLevelLoad.cpp|704|error: 'class TiXmlElement' has no member named 'QueryUIntAttribute'|
||=== Build finished: 3 errors, 0 warnings ===|