1,226

(3 replies, posted in Engine)

The code of the lib should be send to svn/3rdparty/npk

Actually the 3rdparty libs should be all built by scons at least, it is not completely clean yet on svn, there is still some pre-compiled libs because of the visual studio project and the xcode project.

It is hard to support fully the visual proj and the xcode proj, so the priority is to have the scons build compiling.
I never put any hand to scons, Davide Bacchet did all the work, so I'm not sure right now how to add a new lib. But I'll have a look tomorrow and I'll tell you, or I will try to contact Davide.

For libnpk, best would be to build 2 libs, but it looks light, so if it's complicated to do that's not a big deal.

1,227

(1 replies, posted in General)

Hi,

iOS yes, see the topic here (there is a xcode project on svn) : http://forum.maratis3d.com/viewtopic.php?id=66

Android not ready-to-do, but the engine should run with NDK, you just have to handle the system creation and the inputs yourself and link MCore+MEngine. It should be very similar to the iOS publishing, with ES context.

1,228

(150 replies, posted in Engine)

the chdir method was something I was doing in the past, and it occurs to create some problems in some specific cases, for example on iOS and with the editor. But to be honest I don't remember clearly what was the problem.

For now lets not break too much things at the same time, it can create some problems with the editor and with the data system,
I need to think about it, if it's not a problem, I'll do the change later, but I don't want to block you, so the best is to convert to relative path for now.

For the font, if you want to test, load a TTF using Maratis editor, you will see that a .font is created, it is the bin file.
The .font can be load from editor also yes.

1,229

(150 replies, posted in Engine)

For the bin font, it is converted by MFontBin,
actually it runs when a font is loaded from editor (for testing), it was not used a lot yet,
we should run it when pressing the publish button, at the same time as converting the xml,
I can take care of that with the button.

[EDIT]
I forget to respond to your first post, the design seems good to me,
for packaging, maybe we can only pack the content/sub-path of the predefined directories ?
- maps/
- meshs/
- fonts/
- levels/
- scripts/
- shaders/
- sounds/

If there is too much chance that users don't use these directories, we can consider copying the files loaded by the editor into them. I was hesitating to do it before to not have double files, but it can be an option, or the user can be alerted.

1,230

(150 replies, posted in Engine)

Hi,

yes it's true, I forget to tell that filenames was converted to global when send to data loader,
the gui is an exception and is editor-relative (don't take it in account).

If there is a package detected you can get the local filename :

MEngine * engine = MEngine::getInstance();
MSystemContext * system = engine->getSystemContext();

char localFilename[256];
getLocalFilename(localFilename, system->getWorkingDirectory(), filename);

If the loader received a project-local filename,
the conversion to global would be needed when loading using fopen, so it doesn't change much to modify the path system.

1,231

(150 replies, posted in Engine)

Wonderful smile

For the levels and meshs xml, don't modify tinyXml, I'll try to start the bin saturday,
but you can try to add the wrapper to MBinFontLoader if you have time ?

Thank you !

1,232

(150 replies, posted in Engine)

Hi,
nice smile
it's a really big work, thank you for your commitment !

About writing, I don't think we need to be able to write inside the pak ?
At least, the current writing (convert xml, save font as bin) can be done before the packing.

For the publishing, I prefer it's in code as the users normally don't need to have python installed.

Thanks !
Anaël.

1,233

(7 replies, posted in General)

Are you using the StandardRenderer or the FixedRenderer ? (fixed renderer doesn't support shaders and shadows)

About the textures, did you follow this tutorial ? : http://www.maratis3d.org/?p=277
You maps are in the project/maps directory, that's good, and in Blender did you load the textures also from this directory ?
If you have a doubt for the path, open the mesh using a text editor to check it.

For the model smooth, in Blender push the "smooth" button to have the same preview than maratis, and then apply the "edge split" modifier to make the edges you want visible.

1,234

(6 replies, posted in Engine)

I only have vc 2005, and Microsoft has the good idea to change the structure of the project files each time they release a new version... There is maybe some conversion problems, I never tried vc 2010...

Davide, who made the scons build system, told me it was possible to use scons to build but to run it using visual and be able to debug. I can try to contact him if you want ?

1,235

(150 replies, posted in Engine)

Hi,

I'm not against the option of it of course, but you don't want to wait to see if you are going to have the problem ? You can always add it the day you want to link a new lib that don't support buffer or doesn't provide source code. I think the good libs are now aware of it, at least for game related things.

Protobuf looks interesting, there is maybe a way to convert xml to it then to binary automatically, it looks to have lot of users.
After, I already have done some time ago the main part of the mesh binarization + reading, it's not yet complete but don't need so much work to be.

1,236

(150 replies, posted in Engine)

Mh, I feel it will be too much risk for the non-desktop system and I'm a bit afraid of the testing/debugging when I see all the problems we already have when running Maratis on untested hardware.

I understand it will create more work because of the external libs, but if you want to focus on adding npk and creating a layer for fopen/fread I can take care of the DevIL and libsnd loaders as I'm familiar with the libs.

We don't need to modify tinyXML as we should really convert the xml into binary (levels and meshs).

Then there is MBinFontLoader where to replace fread by the layer,
we also don't need to adapt the Freetype loader (it is only needed in the editor, the font is already converted in binary).

I need to check how the script is loaded.
EDIT > we can use "luaL_dostring" or "luaL_dofile"

1,237

(150 replies, posted in Engine)

Also, just a taught, what if npk itself uses fread ?

1,238

(150 replies, posted in Engine)

Ok, thank you, I was not knowing anything about function patching, interesting. I'm maybe a bit afraid by the cross-platform compatibility, but it's mainly because it's the first time I'm hearing about this. I would have picked the first option (the only one I was knowing) but if the function patching is simpler why not.

Is it possible to check that the same thing exist for unix, as it is a more secured OS ?
It might be forbidden on iOS and Android, even if the ARM support it.

It's good to hear about new things, don't worry, Maratis is starting evolving by itself, and there is a lot of better programmer than me smile

1,239

(150 replies, posted in Engine)

What do you mean by "patching a function" ?
(I'm not really a hardcore programmer)

About the package structure, it seems good to keep the directory structure as pak-entity name, so when a file is loaded in lua or in c++, we can find the file in the pak or as a file with the same filename :

In Maratis, a level or a mesh can be loaded using the project-local filename for ex : "mesh/box.mesh"
So, in this case the pak-entity could be named "mesh/box.mesh"

About having one pak or multiple pak, one is the most simple, but is it possible that the loading can be too slow if the pak is too big ? (I don't have any previous experience on packing).

For the encryption, let's think about it, we can always add it later, it can stay an option that developers have to control manually
(for example by setting the password of the pak in c++).

1,240

(150 replies, posted in Engine)

Take your time, you don't need to do it in just 2 hours smile

I will send you a mail about creating you an account on google code for svn so you can commit,
if it's ok with you I prefer we don't have multiple public repository.

1,241

(1 replies, posted in Engine)

yes, perfect,
we can also mention the enums, all maj and starting with "M_" like :

enum M_MATRIX_MODES
{
        M_MATRIX_MODELVIEW = 0,
        M_MATRIX_PROJECTION,
        M_MATRIX_TEXTURE,
};

1,242

(150 replies, posted in Engine)

Is it working when you use a compiled version from the website or is it writing the same error ?
download : http://www.maratis3d.org/?page_id=57

Also, we should make it more clear, but the build is copied with all the needed files and dynamic lib in trunk/dev/prod/
Don't try to run the one in trunk/dev/build/

1,243

(150 replies, posted in Engine)

Nisturb > good to hear about DevIL and libsnd buffer loading smile

MarKill > PVRTC is not complex to use, I tried it for a production on iOS one time, the small irritating thing is that the texture has to be a square and a pow2 size, but it saves a lot of power and memory. It is maybe not a priority, but once the package system is done, we could add this to the publishing process just before the packing.

I know a bit the PowerVR POD format, it is not really compatible with Maratis and got a bit too much limitation, as it is optimized for openglES and phones. But Maratis meshs are quite fast on iOS, the indices are coded using shorts when the vertices are under the maximum size and every mesh is instanced.

1,244

(150 replies, posted in Engine)

When I see the npk sample code, I really like how it looks, clear and simple :
http://code.google.com/p/npk/wiki/SampleCode

1,245

(150 replies, posted in Engine)

Yes, I think npk is what we need, it look clean and simple to use, and we should be able to add it to the current file system. For the files we read manually it will be easy, like you said by adding it to the fread.

The only thing I'm not sure is how to do it for the image and sound library (DevIL and libsnd),
I'm sure they can read a buffer instead of a file, but I never did it before.

You was talking about how to package the data, my idea was to stay on the current file system while making the game, it's easy to access/delete the files, and if necessary to open the xml manually (to correct levels manually or with a batch).

We can just add a button "Publish" in Maratis editor that will just pack all the data of the opened project in another directory, if necessary convert the meshs in binary, copy the MaratisPlayer etc.

In the future it will be also good to add some automation for the iOS and phone publishing :
    - reduce the textures size, compress in jpg
    - generate a xcode project etc

1,246

(6 replies, posted in Gossip)

Hi Philipp,
welcome to the forum and thank you for your message, it is very worm and interesting,
I think it is very valuable to the community to read from a professional, I hope some people will respond and keep the topic alive smile

I'd love to see more about your project when it's started.

1,247

(7 replies, posted in General)

Cool smile
yes please, show us !

1,248

(7 replies, posted in General)

Hi,

the best is to do extensive and repetitive code in c++,
you can make a light flick in lua (using a cos and the time value for example),
but it will be a pain and it will be slow to do AI in lua (except if it is very basic).

To add behaviors in the behavior-tab of Maratis, you have to use c++ and make a dll plugin.
You can find a tutorial with a simple example to download here : http://www.maratis3d.org/?p=500

And you can find an example called "WaterGameDemo" in the Maratis package you can download on the website, it is c++ code for fish AI, it is compiled as a "Game.dll" plugin (Game.dylib on mac).

Basically, a game plugin permit to extend Maratis, you compile a dll that is loaded by Maratis :
   - by coding behaviors (MBehavior class) that will appear in the interface, which you can use like you use the "LookAt" behavior.
   - optionally by customizing the Game class (MGame class), to change the pipeline of the game, do special effect...

When you want a better flexibly for the game design and level design, the best is to create a bank of Behaviors specific to your game, for example a "Player" behavior, a "Alien" behavior, a "Door" behavior... You code how they are interacting, so when it's done, you just have to create your level, say that one mesh is the Player, the other is an Allen etc

In the WaterGameDemo, if you load a fish mesh, you just have to select the "RedFish" behavior or the "BlueFish" behavior, set the speed they are moving, and the fishs are interacting immediately. It's done with a c++ game plugin.

Hope it helped,
Anaël.

1,249

(10 replies, posted in Editor)

Ok, so in fact we should just modify the scons script and add the pandora as a special target with replacing the GLRenderer by the GLES2Renderer and removing the glee dependency.

1,250

(10 replies, posted in Editor)

is it possible to run scons on pandora ?