376

(150 replies, posted in Engine)

I'm at work now, so I can't do much until lunch (I have to do programming that will earn me pennies for food tongue) but last night I wrote the publish event system and tested it. I'm going to have to put the MPublishEvent interface somewhere that plugins could potentially inherit from, but for now it's in Maratis/Editor/MPublish.

I also sorted the 2 functions that you suggested, so now I can add shaders to the list of things which should "just work" from the package tongue

377

(150 replies, posted in Engine)

If we're not changing the extension then things get quite simple to load. That's good smile

I haven't considered shaders, what will need to be done with them to load from the wrapper?

You _should_ be able to get around converting the xml files without temporary files. If we make it part of the publishing process, then the MBinariseMeshEvent can do something like:
- set package manager to writable (otherwise will write to OS files)
- loop through meshes
    - create/load file
    - write data
    - close file
- set package manager to non-writable
That way we don't have to deal with cleaning up after each step.

With regards to the final step of the publishing process, that shouldn't be too difficult to add as a late publish step smile

I've just looked up those 2 functions, changing them will be no problem, I'll do that now. I also see that readTextFile is how you load shaders. Nice. Another job done tongue

378

(150 replies, posted in Engine)

I've started the publishing work, For now I'm just hard coding a publish event in, but the idea is to be able to specify multiple events, possibly allow events to be added from plugins later (although I don't think I'll be writing this yet). I need to decide how to order the queue, for example if someone writes an nsis installer plugin which automagically creates the installer, we don't want that running before we've packaged the data, moved everything to it's proper location etc. Maybe a list of lists. Each event can specify a priority (say, 1..10) and it sits in it's own list, if we get multiple with the same priority, it _shouldn't_ matter for the majority, if it does, people just need to change the priority. Possibly with an in-engine menu at some point. Sorry. Getting too carried away.

I'm also still not entirely sure what you would want with the file extension.

379

(150 replies, posted in Engine)

Yes, I think that makes sense. Will you write the binarised file loading code then or should I try and add it myself?

I have managed to split up the package reading and writing code and it's now in Maratis/Common/MFileManager/MPackageManagerNPK.{cpp,h} whereas the interface (now called MPackageManagerContext) has remained in MEngine.

I am using a define which I can specify at compile time as to whether to add the writing code or not (M_PACKAGE_WRITABLE) and leaving empty functions for those which would require write access.

I'm just looking at how to publish the project. Do you want me to add an option into the File Menu, or maybe create a new menu, Project for example?

EDIT: I just had a thought, if all files to be added to the package had a .bin extension added, then it would make packaging files easy, just search for all files with .bin and add them tongue For some file types, lua scripts for example, it would probably just mean renaming the file someScript.lua.bin

380

(150 replies, posted in Engine)

I don't know. I don't think that opening a writable file should be too much of a problem. I'm having a look at the npk API right now and I _should_ be able to just write a new entity from a buffer on closing the file. Can we do the same with the fonts?

Although, that raises another question about file extensions. Inside the package, I've been giving them the same entity name as the local file name from the project. If we then put a .font file in to replace the .ttf, we will need to either call it .ttf anyway (and thus maybe confuse people who might want to unpack the data...) or allow the font loader (and possibly the mesh loader) to change the extension to check for binary versions before the raw versions.

381

(150 replies, posted in Engine)

That's fine smile I enjoy doing this, so I'm not hurrying, I'm just excited wink

I'm glad the wrappers work fine tongue Are you expecting to write directly into the package on publishing, or will you be writing the binary files out first, then package afterwards?

382

(150 replies, posted in Engine)

Your work on the mesh binaries was one reason why I wanted to show something, so it can be tested with the package wrappers. The file I/O stuff shouldn't change at all now.

I will sort the zlib stuff, I didn't really think to look whether it was duplicated, sorry.

383

(150 replies, posted in Engine)

I have no idea why, but it happens quite often where the forum doesn't post my whole message. I usually catch it and edit but I was on the way out this morning too, so I didn't notice.

I was just saying that I'm starting with the publishing stuff now anyway, which involves adding the dev stuff to libnpk. While I'm doing that, I will move the package manager implementation to Maratis/MaratisPlayer and remove the dependancy for libnpk in MEngine. That will also allow for linking to different libraries for each executable.

I also want to try and work out what I can do about not keeping the packages in memory until the end of execution. I think simply loadPackage() loadLevel() unloadPackage() should work fine, especially for simple, trivial cases. However, if there are larger games made, it doesn't make sense at all to keep a whole package loaded the whole time. I think maybe, instead of calling unloadPackage, maybe have an offlinePackage which will read the file list, close the package, and just use the file list later, if more files are requested.

With regards to the code I wrote. I tried to make it as clear as possible, but it just meant to be a first pass, to get a feel for what people thought of the system. Now I know, I can continue smile

384

(150 replies, posted in Engine)

I am going to start working on the package creation/publishing. For that, I realised that I need to have access to the

385

(6 replies, posted in Gossip)

Thanks! Any welcome is better than none wink

The game design started off life about 3 years ago with my friend and I talking about point and click adventure games. So it's heritage will be there. However it's... evolved a bit since then.

It will be a 3rd person murder mystery set in a semi-fantasy pseudo Noir world with a dash of dark humour. I believe I was playing Discworld Noir at the time. However, rather than a point-click interaction, the player will control with a more normal, direct, control method. Much as I don't like the comparison, Heavy Rain is maybe a reasonable example.

The game design itself is probably far too big to undertake with a scattering of people during what little free time we have available, but the plan is to make a polished demo with one location, then try and use that to get interest in the project and build up the team.

As I think I said, the plan is to aim for desktop OSs. One reason behind that is that I can't do anything which comes into competition with my work. So no iOS, probably no Android. For now at least. Also, I don't have an iOS device and I can't afford to set up dev stuff for one. (I also don't want to give Apple any more money than they already have...) On the other hand, through work, I have contacts in Sony, and I've been told that, if I can get a demo made, they will make sure I can get a devkit, probably a Vita. So I think I might try and make Maratis work using the Homebrew PSP devkit to begin with, so I can send them a demo they can see on device.

I have a couple of pieces of concept art, but I don't really feel like sharing them yet tongue I want to keep the suspense a little longer wink When I have the beginnings of the first location modelled, I think I might show the concept art, and maybe a glimpse of the location tongue I have a very rough block out I made, but I'm the world's worst 3D artist, I'm waiting for my colleague to replace it with prettiness tongue

386

(150 replies, posted in Engine)

I just realised, I didn't update the VS2005 solution, and I even hunted down a copy of VC++2005 Express especially for that purpose!
I updated the solution and, instead of uploading so much again, I've just packaged the solution up, I had to include a load of libs that weren't included, which was strange :S maybe it's just my PC playing silly buggers with having 2 versions of VS installed

Visual Studio 2005 Project

387

(37 replies, posted in Engine)

Ahh, so it's iOS which is the main issue again tongue

Is it possible to use static factories for plugins?

#define MPLUGIN_CREATE(type) \
class MPluginConstructor##type \
{ \
MPluginConstructor##type() \
{ \
MEngine* engine = MEngine::getInstance(); \
engine->getPluginManager()->registerPlugin(new type) \
} \
}

I can see why plugins for a beta engine might be a problem, but then again, I think you might be surprised that people will maintain their own plugins and share them. Also, can build in a check when loading it, put a version number in Maratis through a #define and then compare to the one that the plugin is built with, before doing anything else, if it doesn't match, in the editor or somewhere, give a warning saying that it's potentially a problem.

Looking at the example, it looks like you can inherit from MGame if you want (although it does nothing with it) however I think it's probably fairly unwise to replace MEngine as it's a singleton.

389

(150 replies, posted in Engine)

Uploading as I type this. [Done]
Maratis + libnpk 59.9MB

Also supplied with npk files for SponzaFPS and YoFrankie (script and image only)

EDIT: UPLOADED!

390

(4 replies, posted in Tutorials/Examples)

As I'm about to submit the package file code, I think it might be best to explain how to use it. After all, I need testers to tell me that it's working, right?

So, unfortunately, at time of writing, there's no automagic way of doing this, although I'm planning on adding a publish button which will do just that, still, you might want to create automated build scripts to deploy or some such nonsense. But you're going to have to use the npk command line executable. There's a gui version, but it required wxwidgets, which I didn't have installed. Sorry. I've added the executables to the 3rdparty/npk/bin/{win32/linux} folder in svn (assuming Anael has submitted it there) and I will upload it somewhere and link it at the bottom of the post, if you don't fancy checking out the whole svn repository.

So, fire up your favourite command line and head to wherever your project is. It's also easiest if you add npk somewhere in your PATH where your OS can find it. Then repeat after me.

Doing Linux example first, I'll write a Windows one later
First add npk to the path

Nistur@DRAKE ~/maratis/3rdparty/npk/bin/linux $ ls
npk

Nistur@DRAKE ~/maratis/3rdparty/npk/bin/linux $ export PATH=`pwd`:$PATH

Then in your project directory, first create the package file

Nistur@DRAKE ~/maratis/trunk/dev/Examples/YoFrankie $ ls
Credits.txt  YoFrankie.mproj  levels  maps  meshs  scripts

Nistur@DRAKE ~/maratis/trunk/dev/Examples/YoFrankie $ npk YoFrankie.npk -create

Nistur@DRAKE ~/maratis/trunk/dev/Examples/YoFrankie $ ls
Credits.txt  YoFrankie.mproj  YoFrankie.npk  levels  maps  meshs  scripts

Then, let's add some files. For now only images, scripts and sounds will work from the package

Nistur@DRAKE ~/maratis/trunk/dev/Examples/YoFrankie $ npk YoFrankie.npk -add maps/char_ram_col.jpg@maps/char_ram_col.jpg

Nistur@DRAKE ~/maratis/trunk/dev/Examples/YoFrankie $ npk YoFrankie.npk -list
Package      : YoFrankie.npk
Version      : 27
Total entity : 1
Timestamp    : 2012-01-14 21:50:24
-------------------------------------------------------------------------------
       size    original flag    date      time   name
-------------------------------------------------------------------------------
    539,749     539,749      2012-01-14 21:21:38 maps/char_ram_col.jpg
-------------------------------------------------------------------------------

Note: you need to add the files with the same entity name, including the full path, otherwise Maratis might not find it.

You can always just add all the files together:

Nistur@DRAKE ~/maratis/trunk/dev/Examples/YoFrankie $ for dir in scripts maps ; do for file in $dir/* ; do npk YoFrankie.npk -add $file@$file; done; done

Hope that helps at least somebody

DOWNLOADS:
Windows
Linux

http://www.maratis3d.org/?p=500 <-- have you tried that example?

392

(150 replies, posted in Engine)

I totally forgot that scons doesn't work with my visual studio on my home machine. I can only really test it on Linux. Speaking of which, I can't figure out how on earth to get MEngine to link to libnpk. I've added what I think should be correct to the correct SConscript.

Can anyone give a quick list of things I need to do to build a third party lib with Maratis?

EDIT: Never mind. I'm just being an idiot. libnpk was empty because I forgot to add the source files to my repository when switching from Windows.

393

(9 replies, posted in Gossip)

Good job.
I like the layout a lot. It's very clear and well thought out. If people contribute more examples the menu might get a bit unwieldy, so might be worth breaking it down. I assume this is entirely hand coded. Would it be simpler to have a wiki/blog engine and use that with a custom theme? Not wanting to knock your hard work. It is great, just might be easier to update, especially if you want to have more contributors wink

Also, I have to say I agree with zester, the background is a little distracting. It might be ok if it was toned down a bit and desaturated?

394

(150 replies, posted in Engine)

Tadaa. Ok. MaratisPlayer now loads from an npk if one exists and the file is in a package. Now to move onto scons, then switching to Linux and testing there. Then it's done for now. I'll write a readme/tutorial on how to use the cli tool to make packages. Tomorrow I'll have a quick look at making a new package and populating it. With the system in place, it _should_ be fairly quick to do.
When I'm done with the scons setup, I'll upload a package for people to test and then someone (Anael? me?) to commit to svn smile

395

(18 replies, posted in Engine)

I am usually a Linux user too, which is one of the main reasons why I found and like Maratis so much. However, being a professional game developer, the one thing which I have come to love that Microsoft made is the debugger. I can, and have, used GDB. It just doesn't compare though. So for now I'm sticking with Windows for most of my coding (although only on my PC, when I'm away from home I use my laptop which only has Archlinux on it)

But yes, I like the look of premake4

396

(150 replies, posted in Engine)

I added the libnpk files into the Visual Studio solution for the MEngine project and it not only just compiled, but it also just worked. No idea what was wrong with the libs I built. But the package is loading now. I've got to do some minor fixes to the package file wrapper, then a couple more tests, sort scons building........... yeah... almost done tongue

I also realised that I can't really add libnpk-dev to Maratis and libnpk into MaratisPlayer yet as, at the moment, npk is used in MEngine. I think I'll probably submit it as such, it's not a huge amount bigger. What I would like to do is leave just the package manager interface in MEngine and implement them in Maratis/MaratisPlayer.

I guess, when I'm done, I will merge my changes back into the svn tree, then package the whole thing up and email it to you, Anael, if that's ok? Just to be sure that I don't break iOS/OSX builds. It shouldn't do though.

397

(7 replies, posted in Bug report)

I'll try and fix the SConscript and update the svn in a bit then smile

398

(37 replies, posted in Engine)

On poking around with Maratis, one thing I realised that is missing, in my opinion, is a plugin system. It's not something that is a neccessity, just something which is nice to have.

At the moment, the functionality is focused on the engine itself. There is a lot of good work done in it. If you want to extend it, there's only one dynamic library you can load (Game.{so,dll,dylib}) which means that realistically, that should only be game specific code.

What I would suggest is to also search for libraries in a specific folder (maybe plugins/) and load them in a similar way to the game library. They could then contain wrappers around 3rd party libraries, networking support, maybe AI behaviours. Allowing adding lua hooks would mean that, potentially, you could allow more people to use more of the engine without compiling a single line of code themselves.

iOS support would need compiling I guess, or at the very least, linking the libraries on publishing.

Anyway, just an idea smile

399

(18 replies, posted in Engine)

If you can get this working, I think it would be an ideal method myself as it would mean only maintaining one build system/project format and yet having support for everything. Scons does that to a degree and is quite good at it, but unfortunately doesn't create things like VS project files, so using an IDE requires maintaining the project separately.

400

(11 replies, posted in Gossip)

I don't know whether anything's happening with this at the moment, but I would like to offer too.

I am (finally) starting working on a game I've been designing with friends for over a year. Unfortunately crunch time at work and other problems got in the way. Anyway, it's starting rolling now.

As Anael mentioned, we all gotta eat. So the plan for the game isn't to release it open source. Yet. I do intend to release it as a free download and put a big donate button on the website once it's up, then ransoming the source code for a set amount of donations.

However, I am intending to write about the game a lot during development, mostly in the hope that if we get some attention it will provide motivation. Anyway. I can definitely do some tutorials about doing various bits, either generic game development stuff and/or Maratis specific work. Obviously it's not exactly fun to watch someone code for hours while droning on about the feature they're working on, but I can try and do what I can. Mostly I think I'd be doing written work and tutorials, but if I can think of something quite visual where I can keep running the game to test it, I might consider doing a video for that too. The one that springs to mind is a particle system.

Anyway, I'm sure that when I get around to it, I'll put information up smile Just thought I'd resurrect an old thread tongue