That's up

That reminds me. Want me to do the loading callback stuff? The way I was going to do it was... either a function pointer or a callback interface, then within M_fread and M_fwrite, run the callback based on the amount read/written (so the faster it loads, the more animation frames or whatever...)

152

(4 replies, posted in Engine)

I'm just trying to get some trigger stuff firing off, is there a way to get back a list of the currently collided objects?

I don't think there is, all I can see is isObjectInCollision, I think I need to loop through every object in the seen and then test collision... is this right? :S

Right, I spent a while looking at the script calling stuff to try and figure out what's going on, because I couldn't quite tell why it wasn't working.

Then I went away from the computer and it became obvious.

I was wondering if we could have an incredibly minor update to MScript tongue I can submit it if you want, but I want to change:

void MScript::callFunction(const char* name)
{
//...
    if(lua_pcall(m_state, 0, 0, 0)  !=0)
//...
}

to

void MScript::callFunction(const char* name, int numArgs = 0)
{
//...
    if(lua_pcall(m_state, numArgs, 0, 0)  !=0)
//...
}

So yeah, it was calling the function... but the lua state didn't realise there were any arguments to get from the stack...

The development of AquaGate is now officially underway.

I don't know how much we will manage to get done in this session, but I hope to be able to have something by the end of the day.

Just so people can see, I've started up a couple of google docs. I've made them publicly viewable, so people can see what is going on, if you want write access, just send me a message and I'll add you.

Note: These are not complete. Nor are they intended to be viewed as such. They're just some structured places for notes and design to be put. Hopefully they will be bulked out and grow as the project continues

Task List
Design Document
Technical Design Document

And, the GitHub repository

155

(6 replies, posted in General)

I believe this is because the pivot (?) Of the object has to be at the origin when you export it in order for the bounds calculations to work properly.

156

(0 replies, posted in Engine)

I was just thinking, would it be possible to provide, either a separate build, or just the DLLs and executables with debug symbols (normal behaviour is to have a _d suffix I believe). I think VS needs .pdb too?

It's definitely not something that is high priority, but it would be nice to have.

From what I remember about lua, you just need to push values onto the state to use them as arguments. I've got this implemented now, I just have to test it later.

Ok, I'll get it working and submit the fix.
EDIT: was just #include <algorithm>

I guess that's probably an easy way to do it. I guess I can push the object ID (just looking where I can get that from right now) so the lua functions would be:

function fishAI(obj)
end

I'm trying to make an MBehavior which can have a separate script associated with it. I realise that it's possible to do everything with one big script (or several linked with doFile) but I figured it would be a bit nicer to be able to assign a script to an entity. The lua API can be exactly the same, just have one extra function, getParent, which returns (the id of) the entity it's attached to.

I've almost got this working how I want it, I have just hit a little bump, in that int MScript::function(lua_State * L) is a static function, which just looks up MEngine::getInstance()->getScriptContext(), which wouldn't allow for multiple scripts. I guess it would need a static std::map<lua_State*, MScript*> to do a lookup...

Also, I've tried on both Windows and Linux now, and I get an error when compiling in MFileTools.cpp:285:35: error: 'sort'' was not declared in this scope
Would you like me to sort the fix for this?

160

(1 replies, posted in Gossip)

Hi there! I hope you enjoy your time with Maratis smile Looking forward to seeing what you do with it

@Anael, I was having yet another fiddle during my commute, and I figured I would try and add support for something I've seen asked about before that I also thought would be useful for AquaGame... MScriptBehavior

I haven't got the actual behaviour quite working, but I was wondering if this patch could make it in for the build so I can create multiple MScriptContexts.

EDIT: it's just occured to me that I'd have to change the prototype of the functions passed to addFunction to: int(*function)(MScriptContext*) to allow for pushing stuff back to the script... I can do these modifications and send you a patch tomorrow with that, if you want

EDIT EDIT: Forget about that patch, when I woke up, I had a better idea. As MScript is in Common, can just add a behaviour directly into Common which can access it. Working on a script behaviour right now. Would still need the ability to get the current script context from a function call though.

I will have to check, I should have time either tonight or tomorrow to have a fiddle smile

EDIT: It seems I have mesa, libgl and intel-dri installed, but I can't find anywhere that I've set which dri to use, so I have the sneaky suspicion that it's using the software dri from libgl... I'll try and get that fixed, but I guess it's likely to be the problem

The file loading does seem to be an issue because I don't get any updates called until the scene is loaded, which takes a couple of minutes.

You're probably right about the 3D drivers though, my netbook has intel graphics (boo). Maratis comes up with saying that GL 1.4 is supported. Not sure if I can do any better than this with intel graphics then. Ah well, I guess I can code, compile and maybe even write unit tests on the tube, then make sure it works when I get home onto my PC tongue

(This is basically my netbook setup)

@Anael, I was just doing some quick work and it actually took me a while to realise that Maratis hadn't actually frozen/crashed, but it was just loading for a REALLY long time.

This is due to the fact that it seems to be incredibly slow on Linux for me. I have no idea why this is, I'm getting 2fps on my netbook on an entirely empty scene running one core to the max. My initial thoughts were that as it was using the whole core, it was spinning crazily and locking up, but that wouldn't explain the 2fps... no idea why that is, but even on my PC I'm getting terrible performance. I think I'm going to try and get that profiler stuff working properly (it was outputting valid data before, it was just that I had to paste scope markers at the beginning of every single function that got tedious tongue) Any idea  what might be causing this performance? Both my machines are running Archlinux and I can get package versions if you think they might be relevant...
EDIT: I tried again on my PC and I'm getting a much more reasonable framerate, I don't think I changed anything... weird :S Still using all of one core though, but I guess that's just the idle spinning

Also, you mentioned at some point that you would put a callback for data loading... would it be possible to squeeze this into the build? As we have MFile wrappers, I think I could probably implement loading callbacks fairly quickish if you want...?

I've also just set up a google doc to split up the tasks. Should I add you to that with the same email address? (We haven't split anything yet, but it's there in order to do the task delegation)

http://webchat.freenode.net/ wink

Not saying you have to join us, but you can smile

GameMaker, I'll allow you to answer about what Arclord can help with

Dropbox has the problem that you can't easily work on the same things, merging things isn't realistic, which is why I'd prefer to use svn, git, even cvs to dropbox tongue But for initial brain dumps and sharing, it's definitely useful.

Thanks for the link, I've done a little GLSL on a previous project (doing water on the Call of Duty Black Ops Zombies iOS, as it happens... although it was removed as it was a little too slow for what we got...:( ) but as I'm more than a little rusty, any tutorials are helpful, in any language tongue Thankfully I can just about understand enough French to mean that I can roughly work out what google translate fails at tongue I've already got some very very basic fog, but it's definitely something that will be in the final shader. I want to add things like rippling water, maybe god rays... and a couple other things, depending on how adventurous I get tongue We'll see smile

I'll add you to the shared folder after lunch
Edit: You should be added now

That's great! smile

GameMaker (neighborlee on IRC) is busy doing some of the modeling preparation, so I think it would be best if you discussed with him about what would you can take care of.

If you can make it on IRC, there's quite often someone online now smile

I've shared set up a dropbox folder for preliminary work, so if anyone needs access to see and/or dump stuff in there, give me a shout and I can set you up. For the actual game development, I'm thinking that we can put it on either google code, or github or something. I'm currently working on a couple of framework things (extending what I did in the tutorial series for a little more flexibility) and that's in a personal git repository, so for me, github would be easiest, but if people have a preference, I can put it anywhere.

I have no idea how much more preparation I can do this week, as I think I'm going to be working late... What I already have is a character (penguin "borrowed" from a CC blend on blendswap) which technically moves around, although you can't really tell much as there are no points of reference. I also have a post processor which can be enabled/disabled (and does so automatically if it's not supported) which currently just does fogging to blue. I think that's about it. I've done a little extension to the GameClock, allowing timefactors, and an easier interface for multiple clocks (so you can trigger things off a UI clock which you can keep running constantly, then have a main clock which we can slow down maybe?) and a couple other little tweaks which "might come in handy"

What I still want to do with the stuff for the weekend is make a generic statemachine which we can use for game states (assuming someone fancies making a menu... maybe a 3D menu with penguin going through "gates"?) player state for character etc. I also want to dump a couple of random objects into the world and try and get a very basic swim-control system going.

This weekend, which has been scheduled for the dev jam, what I intend to do is create a shader for the water (ideally above and below, potentially different shaders, not sure yet) and a post processor for the underwater view (maybe a bloom shader which fades for a few seconds after you stick your head above water?) Create more extensive control mechanics. Maybe make an interaction system.

I think with those few things I'll already have my work cut out for me, but it's a decent goal. If we get more people volunteering for code work, we can maybe add some more features smile

That's great. I was talking to GameMaker about this before and I think the best way to demonstrate the engine is just to use the most recent publicly available build. For now, I can't see any real problems with using 3.02. If there are features which make sense to be demonstrated, then maybe a new build might be useful.

I guess it might be a good idea to spec out some design type stuff here, and let anyone contribute smile

The best engine demos focus on making things look pretty, rather than fancy gameplay, so I'm already looking at some post process shaders for over/under water effects.

With regards to the game design, the initial thoughts were Ecco the dolphin (Defender of the Future for 3D-ness) and having a sort of "sandbox" lagoon that you can explore around.

Hey there all. This all looks great! smile

Would be good to get some little demos for Maratis running up and running.

I shall also be on IRC and providing as much code support as I'm able to smile

171

(4 replies, posted in Tutorials/Examples)

Hi,
I have no problem with you translating this. I would suggest that it's a little out of date though, as we've now added the packaging functionality into Maratis Editor and the above usually isn't necessary

172

(10 replies, posted in Engine)

Hmmm, I would say that would cause more problems.

You could potentially get half of the functions implemented and acting as expected, but then the plugin could change it's API and act differently, or some functions might not even link at all. I think, whatever the solution ends up being, adding a plugin version number and allowing version checking from game code.

As I said, I think that distributing one header file is actually quite nice because it gives a beginning to documenting the API of the plugin, plus you can include it into the game project and IDEs like Visual Studio will pick it up and use it for compile time checking, as well as code completion.

173

(10 replies, posted in Engine)

Yes, but I think that's quite normal for a plugin system. I think in general each plugin would only need one interface header. I think it's possibly a little more friendly to do it that way, as it forms a first stage in documenting the functionality of the plugin. I'm not sure there's a nicer way to do this unfortunately

174

(10 replies, posted in Engine)

Personally, the way I would do this is to have a virtual class, call it MPluginImplementation for the sake of explaining here. Then you can have subclasses like MRecastPluginImplementation which, in StartPlugin, get initialised and added into the plugin system.

Obviously, if you're going to be calling C(++) functions from other code, you'll be linking to the headers of the plugin library anyway, so you can add a wrapper macro into it. This is entirely pseudocode and not even compiled, let alone tested, but something like:

#define MPLUGIN_IMPLEMENTATION_DECLARE(name) \
name* MGet##name() { return (name*)MPlugin::staticGetPluginImplementation(#name); } \
bool M##name##Exists() { return MGet##name() != 0; }

Then you can do things like

if(MRecastExists())
    MGetRecast()->findPath(start, end, &path);

Of course, you would have to add some mapping of names to MPluginImplementation classes, I suggested just having them static within MPlugin, but they can really be kept anywhere.

It really depends, I know a lot of code designers don't like the whole "everything is an object" thing and shoehorning things into OO design when they don't need to be, but I think when it comes to plugins, it's quite nice to have one central plugin object that you can interface with. It also makes any mapping much simpler because you only have to do one lookup for all functions, rather than one lookup per function.

175

(10 replies, posted in Engine)

We have used Recast at work. It's pretty good. If anyone wants a list the pros and cons of Recast just give a shout.

I definitely think that this should be a candidate for the plugin system. As gamemaker stated, having Maratis as small and compact as possible is a very nice thing. Not all games need pathfinding at all, having this integrated (even if it's quite light) is a significant amount of extra bulk to the engine. Of course, this isn't my decision to make, but I thought I'd throw out my opinion smile

As for accessing plugins from C++. I was looking at that the other day actually tongue I think the main issue is that there is not a base class for a plugin implementation. I can write up a quick patch (on top of my previous patch) if you want, and you can take a look at what I was thinking.

Disclaimer: I don't claim that this is going to necessarily be a "pretty" way, however, I feel that it's at least a simple and clean way.