NGF - nikki's Game Framework (new: serialisation, python)

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Re: NGF - nikki's Game Framework (9.2.9) (now on git!)

Post by nikki »

altren wrote:
nikki wrote:Update (9.2.15): I've created a git repository for NGF, hosted at github, which you can find here. I haven't yet updated the archive download though, I couldn't find any reliable free file host yet. :( If you can suggest something, do tell me.
Why not sourceforge? It have git, file host and many, many, many more things...
Hmm, I thought of that, but SourceForge seems to be for 'big' projects really. I just wanted something simple, I'm a very irresponsible person. :oops: I'll sure try it though.
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Re: NGF - nikki's Game Framework (9.2.9) (now on git!)

Post by nikki »

Ok, just made a git update. I also added an (embarassing) experiments directory by mistake at first, and removed it now (I guess that's what I get for being a git-noob). Update or you'll see some ugly code! :roll: The download size is also much smaller now because the experimental directory had lots of intermediate files and stuff.

Also, github allows you to get a tarball/zip of the latest, which might be helpful if you're too lazy to do git-stuff. :wink:

From now on, I don't think I'll be making zip/tarball releases. You can always grab the latest as an archive from github. I might do it for 'milestone' releases though.
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Re: NGF - nikki's Game Framework (15 Mar 2009) (now on git!)

Post by nikki »

Sorry for yet another post, but now NGF has it's own Wiki! Just one article there for now, but it's interesting. :)
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Re: NGF - nikki's Game Framework (15 Mar 2009) (now on git!)

Post by nikki »

I added a simple Python interface allowing Python scripting (you can easily expose your own methods and properties from within the GameObject too), and a simple GameObject serialisation and deserialisation mechanism (for saving/loading games). These are still in their early stages and need more documentation, but they're there and are pretty cool nonetheless. :)
nihilocrat
Gnoblar
Posts: 20
Joined: Thu May 11, 2006 8:18 pm
Location: Greensboro, NC, USA

Re: NGF - nikki's Game Framework (new: serialisation, python)

Post by nihilocrat »

Good to see you're wrapping some stuff in Python! I'll have to check this out when I have the time. I might write a space invaders clone or something else that's really simple, but more complicated than the example app.
User avatar
XeneX
Gnoblar
Posts: 2
Joined: Fri Aug 29, 2008 4:40 pm
Location: I'm out there.... Somewhere.
Contact:

Re: NGF - nikki's Game Framework (new: serialisation, python)

Post by XeneX »

Hi i tried to download NGF on Git but the download button refuses to work for me, is there a mirror or alternative i can use to download this? it looks like something worth checking out :P

If i can download it I'll leave some comments and feedback.
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Re: NGF - nikki's Game Framework (new: serialisation, python)

Post by nikki »

I seperated the Bullet integration into a seperate 'plugin' so it's a lot neater and easier to manage now. The serialisation mechanism has also been improved and support for more complex structures have been added in their respective 'plugins'. All that you need to do to be able to save the Player now, is inherit from NGF::Serialisation::SerialisableGameObject, and do this:-

Code: Select all

NGF_SERIALISE_BEGIN(Player)
{
    //Position, rotation.
    NGF_SERIALISE_POSITION(mNode->getPosition());
    NGF_SERIALISE_ROTATION(mNode->getOrientation());

    //Complex members.
    NGF_SERIALISE_BULLET_BODY(mBody); //Save physics body.
    NGF_SERIALISE_PYTHON_LOCALS(); //Save our Python script's 'local' variables. Based on 'pickle'.

    //Simple members.
    NGF_SERIALISE_OGRE(Real, mHealth);
}
NGF_SERIALISE_END
There's a small explanation of the Python integration here.
Last edited by nikki on Tue Mar 31, 2009 2:21 pm, edited 5 times in total.
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Re: NGF - nikki's Game Framework (new: serialisation, python)

Post by nikki »

XeneX wrote:Hi i tried to download NGF on Git but the download button refuses to work for me, is there a mirror or alternative i can use to download this? it looks like something worth checking out :P
Sorry for the very late reply, I seem to have missed your post.

Are you sure you're using the right download link? I just tried the download link, and it's working fine for me. The download link at the GitHub page leads here.

On a side note, the documentation is pretty outdated now because of the recent few overhauls (GameObject factory, Bullet-integration being seperated), but it's quite simple, and one can learn quite a bit by just reading the source (it's well commented). If anyone needs any help before I get the documentation fixed, do ask.
User avatar
XeneX
Gnoblar
Posts: 2
Joined: Fri Aug 29, 2008 4:40 pm
Location: I'm out there.... Somewhere.
Contact:

Re: NGF - nikki's Game Framework (new: serialisation, python)

Post by XeneX »

nikki wrote: Sorry for the very late reply, I seem to have missed your post.

Are you sure you're using the right download link? I just tried the download link, and it's working fine for me. The download link at the GitHub page leads here.

On a side note, the documentation is pretty outdated now because of the recent few overhauls (GameObject factory, Bullet-integration being seperated), but it's quite simple, and one can learn quite a bit by just reading the source (it's well commented). If anyone needs any help before I get the documentation fixed, do ask.
Thanks for the reply Nikki i've just downloaded from your link, i'll check it out when i have the free time.

cheers.
To be or not to be..... err what was the question?
Blazeix
Gnoblar
Posts: 5
Joined: Thu Apr 02, 2009 2:56 pm

Re: NGF - nikki's Game Framework (new: serialisation, python)

Post by Blazeix »

This is really cool, thanks for releasing this.

I have a problem when I try to build the ngftutorialfinal application. I filled in the includepaths, libpaths and links fields in the premake file, and then I execute "premake --file premake.lua --target gnu". When I run 'make' I get the following error:

Code: Select all

==== Building NGFExample ====
main.cpp
In file included from main.cpp:14:
include/Player.h:62: error: conflicting return type specified for ‘virtual void Player::receiveMessage(NGF::Message)’
../../include/Ngf.h:170: error:   overriding ‘virtual NGF::MessageReply NGF::GameObject::receiveMessage(NGF::Message)’
In file included from main.cpp:15:
include/LevelGeometry.h:41: error: conflicting return type specified for ‘virtual void LevelGeometry::receiveMessage(NGF::Message)’
../../include/Ngf.h:170: error:   overriding ‘virtual NGF::MessageReply NGF::GameObject::receiveMessage(NGF::Message)’
make[1]: *** [obj/debug/main.o] Error 1
make: *** [NGFExample] Error 2
Thanks for any help!
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Re: NGF - nikki's Game Framework (new: serialisation, python)

Post by nikki »

Blazeix wrote:This is really cool, thanks for releasing this.

I have a problem when I try to build the ngftutorialfinal application. I filled in the includepaths, libpaths and links fields in the premake file, and then I execute "premake --file premake.lua --target gnu". When I run 'make' I get the following error:

Code: Select all

==== Building NGFExample ====
main.cpp
In file included from main.cpp:14:
include/Player.h:62: error: conflicting return type specified for ‘virtual void Player::receiveMessage(NGF::Message)’
../../include/Ngf.h:170: error:   overriding ‘virtual NGF::MessageReply NGF::GameObject::receiveMessage(NGF::Message)’
In file included from main.cpp:15:
include/LevelGeometry.h:41: error: conflicting return type specified for ‘virtual void LevelGeometry::receiveMessage(NGF::Message)’
../../include/Ngf.h:170: error:   overriding ‘virtual NGF::MessageReply NGF::GameObject::receiveMessage(NGF::Message)’
make[1]: *** [obj/debug/main.o] Error 1
make: *** [NGFExample] Error 2
Thanks for any help!
Ahh, yes. I made some little changes to the messaging system recently, the tutorial is a bit outdated. You'll have to just change the return type to 'NGF::MessageReply' instead of 'void'. Hopefully this is the only change. I'll update soon on GitHub. Thanks for reporting!

EDIT: Yup, this is the only change needed, I just tried building. Now for a GitHub update...

EDIT 2: GitHub update, yay! :) Be aware that the documentation is still a little incomplete and outdated because of radical changes in recent updates, don't be discouraged, if you need any help just ask. I have another little demo application (with embarrasing code) which I'm using to test the new features, I can upload parts of it for help.

I'm getting a new computer soon (at last), and I hope to document the features once I do.
Blazeix
Gnoblar
Posts: 5
Joined: Thu Apr 02, 2009 2:56 pm

Re: NGF - nikki's Game Framework (new: serialisation, python)

Post by Blazeix »

thanks, that fixed it. I saw on a forum post that you had some demo code integrating NGF with btOgre. Is that available somewhere? I'm currently using your NgfBullet plugin, but it'd be interesting to see how to use it with btOgre, if you happen to have the code around. Thanks!
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Re: NGF - nikki's Game Framework (new: serialisation, python)

Post by nikki »

Blazeix wrote:thanks, that fixed it. I saw on a forum post that you had some demo code integrating NGF with btOgre. Is that available somewhere? I'm currently using your NgfBullet plugin, but it'd be interesting to see how to use it with btOgre, if you happen to have the code around. Thanks!
Sure. It's a really easy way to get Bullet working with Ogre and also get collision events right in your NGF GameObject.

There's a tutorial on the NGF wiki on GitHub, but that's outdated, I'm gonna fix it soon.

EDIT: Tadaa! NGF Wiki: Using NGF With Bullet. It assumes basic knowledge of NGF and BtOgre though. You can check out the BtOgre demo for the BtOgre basics, it's really simple, nothing much other than pure Bullet stuff.
Blazeix
Gnoblar
Posts: 5
Joined: Thu Apr 02, 2009 2:56 pm

Re: NGF - nikki's Game Framework (new: serialisation, python)

Post by Blazeix »

cool, I didn't realize this had a wiki, great work! I unfortunately don't have my code in front of me at the moment, but I noticed in the NGF With Bullet tutorial that you never register the ground mesh with bullet. It'd be the same as what you did with the player, you'd just use the "createTrimesh()" call instead of "createSphere()", right?
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Re: NGF - nikki's Game Framework (new: serialisation, python)

Post by nikki »

Blazeix wrote:cool, I didn't realize this had a wiki, great work! I unfortunately don't have my code in front of me at the moment, but I noticed in the NGF With Bullet tutorial that you never register the ground mesh with bullet. It'd be the same as what you did with the player, you'd just use the "createTrimesh()" call instead of "createSphere()", right?
Aha, I knew I was forgetting something... :x Gotta fix this soon.

But yes, it's the same thing, and if you want it to be a trimesh, you use 'createTrimesh()'.

EDIT: Ok, wiki page fixed. The LevelGeometry part is mostly left to the reader, with a few hints.
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Re: NGF - nikki's Game Framework (new: serialisation, python)

Post by nikki »

For you guys using NGF, you might be interested in this. Yup, I've started work on GraLL 2! :D
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Re: NGF - nikki's Game Framework (new: serialisation, python)

Post by KungFooMasta »

What new features do you plan to add?
Creator of QuickGUI!
User avatar
Brocan
Orc
Posts: 441
Joined: Tue Aug 01, 2006 1:43 am
Location: Spain!!
x 8

Re: NGF - nikki's Game Framework (new: serialisation, python)

Post by Brocan »

Interesting, tell us :D
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Re: NGF - nikki's Game Framework (new: serialisation, python)

Post by nikki »

Mostly, it's a continuation of the old story. Some things I've already thought of are:-
  • Dimension system (parallel worlds, slightly different, make use of the differences. Kinda like the game 'Dim' from this site)
  • GraLL can roll in all directions now, not just constrainted around local X axis. Will make movement easier and smoother.
  • Python scripting (this allows loads of stuff: User-side modification, set pieces)
  • AI enemies
  • 'Proper' save/load system using serialisation (previously your progress was only saved to the beginning of a level. GraLL 2 might have a 'checkpoint' system)
These are just features I thought of now. I haven't begun thinking of the obstacle ideas yet. This time, due to Python scriptability, each instance of an object can be radically different, and I can have special 'set-piece' obstacles too, which would make the game more interesting.

The story I'm not willing to tell yet, it'll give away the end of the original GraLL. Of course, if you really want it, I'll put it up here in small text and you can copy-paste into some plaintext editor or something. :P
User avatar
voyvf
Kobold
Posts: 28
Joined: Sat Jul 04, 2009 4:01 am
Location: United States
x 2
Contact:

Re: NGF - nikki's Game Framework (new: serialisation, python

Post by voyvf »

First of all, you are awesome. :D I've been using btOgre to learn the ins and outs of Bullet, and it's great.

That said, I have a (hopefully) quick question about NGF: What version of Ogre is the framework targeting?

As when I go to compile the tutorial using 1.7.0rc1, I get this error:

Code: Select all

(~/repos/git/ngf/ngftutorial/ngftutorialbase)$ make
==== Building NGFExample ====
main.cpp
In file included from main.cpp:7:
../../include/Ngf.h:26:35: error: OgreUserDefinedObject.h: No such file or directory
In file included from main.cpp:7:
../../include/Ngf.h:132: error: expected class-name before ‘{’ token
make[1]: *** [obj/debug/main.o] Error 1
make: *** [NGFExample] Error 2
Thanks in advance!
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Re: NGF - nikki's Game Framework (new: serialisation, python

Post by nikki »

Hmm it seems there's been a few changes in the Ogre sinc the last time I've checked out the code. It's been a long time since I've worked on this stuff though - I've been tampering with electronics and the hardware side of things lately. :P

Anyway, I think the new 'UserObjectBindings' class is the one NGF should use instead of 'UserDefinedObject'. Try changing the code to work with it and send me a patch - or even maybe fork the code on GitHub and try fixing it for the new Ogre version and sending me a pull request. I myself will have a little bit of rebuilding and catching up to do before I can work on this issue - I'll do it maybe some time this weekend. ;)
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Re: NGF - nikki's Game Framework (new: serialisation, python

Post by nikki »

Well I forgot to post here, but since your post I've updated the code, there was actually no need for it to inherit from UserDefinedObject, that was just something left-over from an earlier OgreBullet binding. It works fine with Ogre version 1.7.1 now.
Post Reply