GraLL - Take The Test (Update: 18th August 2007)

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
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

Cool! Can you give us more details about what NGF does?
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

Its basically a framework layer upon which you can build your application (mostly for games). There is a class called 'GameObject' from which all the game's logic objects (such as 'Player', 'Bomb') derive. These are created and managed by another class called 'GameObjectManager'. There is another class called 'World' which represents the different 'parts' in the game (such as the menu screen, each level etc.). These are, again, played through by 'WorldManager'.

The main thing is, that these classes are very flexible. For example, a GameObject need not really create any graphical objects. It might just be an object that plays a sound. Also, the Worlds do not necessarily have to create or destroy objects at their beginning or end. Objects can create other objects, destroy objects, destroy themselves, send messages between each other etc. The GameObjectManager also provides a convenient interface to handle collision events through OgreOde. Although, this doesn't mean that you have to use OgreOde. You can use any physics library.

Also, NGF is very simple and easy to use, and takes just a few minutes to get running. Its just a single header file you need to include in the project. No compilation or anything. The only dependencies it has are Ogre, Boost and FastDelegate (FastDelegate is just a single header file included with NGF itself, so don't bother). Also, it needs Boost only for the boost::any class, and I've been thinking of switching it over to Ogre::Any to reduce the dependencies even further.

There is also a plugin for exporting levels from Blender. These levels are loaded by a 'Loader' class. The Loader class doesn't really create the objects. It just calls a callback function defined by the user, and the user can do anything he wants. You can see a video of the level exporting here.

I've also written a little about NGF in my post here.

Everything will be explained when I release it. I still have to write some documentation. I'm also thinking about releasing GraLL's source code. That'd be a good example of how to use NGF.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

It sounds interesting. What's the logic behind having it all in one header file? Just simplicity? Seems to me it must be pretty big and this could affect compile time. Might it not benefit from being refactored into a normal .dll?

Anyway, I'll definitely be keen to see it. I doubt if I'll use it any time soon but designing a good structure for a game engine is hard - so it'll be very useful to see what approaches you've used. My programming ability is considerably better than my designing ability, I think you can only improve this through experience...
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

PolyVox wrote:It sounds interesting. What's the logic behind having it all in one header file? Just simplicity? Seems to me it must be pretty big and this could affect compile time. Might it not benefit from being refactored into a normal .dll?
Hehe... That was mainly due to laziness. But, it is infact quite small. When I wrote it, I inlined all the code directly into the class definitions, and couldn't find the time to split it up. I might do it if I find time.

BTW, which level are you on?
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

nikki wrote:BTW, which level are you on?
Well I was going to tell you I hadn't played it in a while and was stuck on Level 23. But then I thought 'I'll give it a quick go'. And now I'm on Level 24 :D
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

PolyVox wrote:
nikki wrote:BTW, which level are you on?
Well I was going to tell you I hadn't played it in a while and was stuck on Level 23. But then I thought 'I'll give it a quick go'. And now I'm on Level 24 :D
Cool.
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Post by KungFooMasta »

Sorry if this is too off topic, I had a question for somebody with your experience. :wink:

You said Game Object can Create Game Objects. Can something like a Torch Create a Light, or Particle effect? I'm curious about the design regarding the use of the Ogre::SceneManager. Does the SceneManager get passed around to all GameObjects, so that they can all create Objects when they want, or do they have to request the Light be made, and then attach it to itself? Basically, who makes the call to create Ogre Scene related objects, the GameObjects, or other?
Creator of QuickGUI!
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

KungFooMasta wrote:Sorry if this is too off topic, I had a question for somebody with your experience. :wink:
My experience? Hehe... I'm not a very experienced guy. I'm just a little school kid who's been messing around with programming for the past one and a half years. And also, most of my programming is very hacky and dirty. :)
KungFooMasta wrote:You said Game Object can Create Game Objects. Can something like a Torch Create a Light, or Particle effect? I'm curious about the design regarding the use of the Ogre::SceneManager. Does the SceneManager get passed around to all GameObjects, so that they can all create Objects when they want, or do they have to request the Light be made, and then attach it to itself? Basically, who makes the call to create Ogre Scene related objects, the GameObjects, or other?
That is totally up to the user. One way would be to send a message to the object after creating it. For example:-

Code: Select all

NGF::GameObject *obj = GlbVar.goMgr->createObject<Bomb>(pos, rot);
NGF::MessageParams params;
params.push_back(sceneMgr);
GlbVar.goMgr->sendMessage(obj, NGF::Message("SceneMgr", "", params));

...
...
...

Bomb::receiveMessage(NGF::Message msg)
{
    mSceneMgr = msg.getParam<Ogre::SceneManager*>(0);
}
Or you could also do it this way:-

Code: Select all

NGF::GameObject *obj = GlbVar.goMgr->createObject<Bomb>(pos, rot);
Bomb* bmb = dynamic_cast<Bomb*>(obj);
bmb->setSceneMgr(sceneMgr);

...
...
...

Bomb::setSceneMgr(Ogre::SceneManager *mgr)
{
    mSceneMgr = mgr;
}
But, in GraLL, I did it by defining a 'Globals' class that acted like a global variable holder. It keeps variables that many classes keep asking for all the time. You can check it out here.

I'm sure you'll come up with better ways of doing it though. :)
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

nikki wrote:I'm not a very experienced guy. I'm just a little school kid who's been messing around with programming for the past one and a half years. And also, most of my programming is very hacky and dirty. :)
Well your work is extremely impressive for someone whose only been programming one and a half years. I've been doing it for 10 years, have a PhD, and still feel there's a hell of a lot of stuff I don't know!

So you're doing really well :D
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

PolyVox wrote:
nikki wrote:I'm not a very experienced guy. I'm just a little school kid who's been messing around with programming for the past one and a half years. And also, most of my programming is very hacky and dirty. :)
Well your work is extremely impressive for someone whose only been programming one and a half years. I've been doing it for 10 years, have a PhD, and still feel there's a hell of a lot of stuff I don't know!

So you're doing really well :D
Thanks! :)
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Post by KungFooMasta »

Thanks for the link. I don't really see which way is better, just that you chose one and went with it, which works. :)

So many things require the SceneManager to create.. maybe I'll make a thread in the general forum and see what I get out of it.
Creator of QuickGUI!
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

What's a good format for writing documentation? HTML? PDF? TXT? DOC? RTF? What format do you guys think I should use? And what program should I use for writing it?
CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 58
Contact:

Post by CABAListic »

PDF is good for offline printing, but I don't like it for online references and the like. doc and rtf are similar, but definitely fall behind PDF, so I wouldn't consider those ;) TXT is for small readmes. That leaves HTML which I think is the best choice for online references and guides.
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

CABAListic wrote:PDF is good for offline printing, but I don't like it for online references and the like. doc and rtf are similar, but definitely fall behind PDF, so I wouldn't consider those ;) TXT is for small readmes. That leaves HTML which I think is the best choice for online references and guides.
I don't think it'll be online. But, I'll still use HTML anyway. The source, the exporter and the docs will be in a zip file which I'll upload. I'll create an online reference after my exams are over, because I'm quite preoccupied at the moment. I'm writing it in RTF at the moment, I'll convert it into HTML later.
CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 58
Contact:

Post by CABAListic »

I didn't mean "online" as in "placed on the web", just as viewable on your PC. Sorry, that was probably not a very clear choice of words (it's not my invention, though :) )
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

CABAListic wrote:I didn't mean "online" as in "placed on the web", just as viewable on your PC. Sorry, that was probably not a very clear choice of words (it's not my invention, though :) )
Ahh... You meant soft copy and hard copy, eh? Ok, got it. :)
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

nikki wrote:What's a good format for writing documentation? HTML? PDF? TXT? DOC? RTF? What format do you guys think I should use? And what program should I use for writing it?
Maybe you'd be interested in DocBook (http://www.docbook.org/)? It's a XML based format which can be used to generate al the formats you mention above (and more).
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

PolyVox wrote:
nikki wrote:What's a good format for writing documentation? HTML? PDF? TXT? DOC? RTF? What format do you guys think I should use? And what program should I use for writing it?
Maybe you'd be interested in DocBook (http://www.docbook.org/)? It's a XML based format which can be used to generate al the formats you mention above (and more).
I think that's a little overkill for my little manual. :) Or maybe not.
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

FileFront (my filehost) periodically does a file cleanup. I usually tell it not to delete the GraLL setup, but it seems that this time it did. I tried uploading it again, but it didn't work.

Does anyone know of a good, reliable file-host which also provides a download counter?

Thanks for the help.

EDIT: Ok, its back up. Thank you guys for not helping. :? ... Hehe... Just joking. :)
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

Sorry for not responding (Windows, anyone?) for the past week or so. That was because of me being preoccupied with the exams, but now they're over. YAY! :)

But, there's still a little test left, which is on Sunday. After that, I can continue working on the NGF documentation project. I also have to clean up the code a bit, and I have plans for releasing GraLL source code (although you won't be able to compile it out of the box, because its gonna lack a few dependencies and some other stuff)

So stay tuned! :)

But don't expect too much though, I might suddenly disappear for short moments without a warning. Because of the higher grade I'm in this year at school, I have lesser time for other things. I'll have more time the year after the next though, which is when we start specializing on specific subjects (and I of course, am going to choose Computers, Maths and Physics :) ).
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

nikki wrote:After that, I can continue working on the NGF documentation project. I also have to clean up the code a bit, and I have plans for releasing GraLL source code (although you won't be able to compile it out of the box, because its gonna lack a few dependencies and some other stuff)
Great, I look forward to seeing it! Doesn't matter to me if it doesn't compile, I'm more interested in havcing a read to see if I can get any ideas for my own framework
nikki wrote:(and I of course, am going to choose Computers, Maths and Physics :) ).
Yep, that's what I chose! It's a good combination. I also threw chemistry into the mix but that one didn't work out so well...
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

Ok, I thought I'd upload an early preliminary version of NGF. The documentation is very much incomplete, and the code needs a little cleaning up, but its good enough to look into. You can get it here:-
Link

Do tell me about any improvements/criticisms in your mind.

I've also made a topic about it in the 'Using Ogre In Practice' forum.
rebol
Kobold
Posts: 34
Joined: Tue Sep 09, 2008 2:28 am

Post by rebol »

nikki wrote:I still don't get how I should popularize the game. What's the use of making a good (well, I'm not praising my self, I'm just saying) game when nobody knows it even exists? I've put it on GameDev, Devmaster, here, emailed everyone I know, and posted on few other forums I know. Is there anything else I can do?

Maybe I should Slashdot it. Or maybe someone else could do it for me, so that the Slashdot guys don't think I'm self-promoting. :twisted:
I think you can post it on your facebook, if you have one.
rebol
Kobold
Posts: 34
Joined: Tue Sep 09, 2008 2:28 am

Post by rebol »

I remembered that you said you want to release a special version with user editing enabled, I'm really looking forward to that version. Take it a step further, make GraLL open source is greatly welcome. I have searched on web for using Blender as an editor, only got three solutions:
1. the Ogre addon dotScene format
http://www.ogre3d.org/wiki/index.php/Tools:_Blender
2. the Echo_plugin for Blender
http://www.blender.org/forum/viewtopic.php?t=9441
3. a game named Mulver whose author said he used a customed plugin for Blender to edit level
http://www.ogre3d.org/phpBB2/viewtopic. ... sc&start=0
For now on, I think your NGF_export for Blender is easy to me rather than the above three as I'm a newbie both to Ogre and Blender. I appreciate your share with the NGF and the export script, but if there is the source code of GraLL I can learn and use, things will be better.

Great work, good luck on GraLL 2.
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

Sure, thanks!

Check out the email I sent you. ;)
Post Reply