NGF - nikki's Game Framework (new: serialisation, python)
- nikki
- Old One
- Posts: 2730
- Joined: Sat Sep 17, 2005 10:08 am
- Location: San Francisco
- x 13
- Contact:
NGF - nikki's Game Framework (new: serialisation, python)
What is it?
NGF (nikki's Game Framework) is a set of framework classes in C++ that help write software, especially games, using Ogre. It helps you manage your GameObjects (Players, Monsters etc.), and Worlds (Menu Screens, Levels etc.), and provides a format to hold GameObjects' positions, orientations and properties. It also includes an exporter for Blender to the '.ngf' format, and means to connect to OgreODE or OgreBullet to allow GameObjects to receive collision events. You can easly write exporters for other applications, or code connecting NGF to other physics engines.
What does it require?
It requires Ogre and boost. Optionally, you may also need OgreODE or OgreBullet for the respective physics features, and Blender to use the Blender to '.ngf' exporter.
Is it big and complicated?
No, it isn't. The core is just 2 files: A .h and .cpp file. The 'plugins' (Python scripting, serialisation, state machine, Bullet events etc.) are more '.h'/'.cpp' pairs. You also get a manual, a tutorial, and a demo application (the result of the tutorial) to get you started off using it quick. I can't handle big and complicated projects.
The demo application uses premake for its build mechanism, so you can easily make project files for whichever IDE you use, or makefiles for gcc. You simply have to edit the premake.lua file to suit your system (if you're on Linux, pkg-config helps).
Why would I use it?
Sure you don't have to use it, but I've seen a lot of questions about GameObject-management frameworks on the forums and I thought it would help. I also made it because I myself need something like this. GraLL uses an older version of NGF.
What does it look like?
Its a framework, so there's nothing much to see besides a bunch of code. However, you can drop your jaw in awe at the sheer beauty of the demo application :-
(I used 'scrot' for the above screenshot, and it seems to have messed up the Overlays)
Where can I get it?
The NGF github repository is here. It also provides an option to download an archive as a zip or a tarball.
ps. Thanks to betajaen for the 'Q&A post-layout idea'.
Last edited by nikki on Fri Dec 11, 2009 10:16 pm, edited 20 times in total.
-
- Gnoblar
- Posts: 14
- Joined: Tue Feb 12, 2008 12:45 pm
Any chance for making solution under VSE9?
EDIT:
After my lonely shot to compile it under VSE 9 I've hit a wall:
Any help?
EDIT:
After my lonely shot to compile it under VSE 9 I've hit a wall:
Code: Select all
main.obj : error LNK2019: unresolved external symbol "public: void __thiscall NGF::GameObjectManager::tick(bool,struct Ogre::FrameEvent const &)" (?tick@GameObjectManager@NGF@@QAEX_NABUFrameEvent@Ogre@@@Z) referenced in function "public: virtual bool __thiscall NGFExampleFrameListener::frameStarted(struct Ogre::FrameEvent const &)" (?frameStarted@NGFExampleFrameListener@@UAE_NABUFrameEvent@Ogre@@@Z)
main.obj : error LNK2019: unresolved external symbol "public: __thiscall NGF::Loading::Loader::Loader(class fastdelegate::FastDelegate5<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class Ogre::Vector3,class Ogre::Quaternion,class NGF::PropertyList,void>)" (??0Loader@Loading@NGF@@QAE@V?$FastDelegate5@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@VVector3@Ogre@@VQuaternion@4@VPropertyList@NGF@@X@fastdelegate@@@Z) referenced in function "protected: virtual void __thiscall NGFExampleApplication::setupResources(void)" (?setupResources@NGFExampleApplication@@MAEXXZ)
main.obj : error LNK2019: unresolved external symbol "public: __thiscall NGF::WorldManager::WorldManager(void)" (??0WorldManager@NGF@@QAE@XZ) referenced in function "protected: virtual void __thiscall NGFExampleApplication::setupResources(void)" (?setupResources@NGFExampleApplication@@MAEXXZ)
main.obj : error LNK2019: unresolved external symbol "public: __thiscall NGF::GameObjectManager::GameObjectManager(void)" (??0GameObjectManager@NGF@@QAE@XZ) referenced in function "protected: virtual void __thiscall NGFExampleApplication::setupResources(void)" (?setupResources@NGFExampleApplication@@MAEXXZ)
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
- Nauk
- Gnoll
- Posts: 653
- Joined: Thu May 11, 2006 9:12 pm
- Location: Bavaria
- x 36
- Contact:
Looks very useful, definately will have a closer look, thanks for sharing
ARTIFEX TERRA 3D - Artist-friendly, free and easy WYSIWYG realtime outdoor scene Editor & Painter
New loader now with Ogre::Terrain support: Addons for Artifex on SourceForge
MOC - Minimal Ogre Collision & Mousepicking
Simple TerrainMaterialGenerator for the use of standard Ogre material with Ogre::Terrain
Support me on Patreon
-
- Gnoblar
- Posts: 14
- Joined: Tue Feb 12, 2008 12:45 pm
Now it gives me:nikki wrote:You have to also compile and link 'Ngf.cpp' and 'ConfigScript.cpp', both found in the root Ngf directory.
Code: Select all
d:\ngf\ngf.cpp(100) : error C2888: 'NGF::GameObjectManager *Ogre::Singleton<T>::ms_Singleton' : symbol cannot be defined within namespace 'NGF'
with
[
T=NGF::GameObjectManager
]
- nikki
- Old One
- Posts: 2730
- Joined: Sat Sep 17, 2005 10:08 am
- Location: San Francisco
- x 13
- Contact:
Hmm... It seems that's a problem only with the Microsoft compiler. Even Ogre::Root has its ms_Singleton defined within the 'Ogre' namespace though. Probably, defining it outside with additional 'NGF::'s should do the trick.Kaldrick wrote:Now it gives me:nikki wrote:You have to also compile and link 'Ngf.cpp' and 'ConfigScript.cpp', both found in the root Ngf directory.Code: Select all
d:\ngf\ngf.cpp(100) : error C2888: 'NGF::GameObjectManager *Ogre::Singleton<T>::ms_Singleton' : symbol cannot be defined within namespace 'NGF' with [ T=NGF::GameObjectManager ]
I've uploaded a new version, try it (look back at first post).
-
- Gnoblar
- Posts: 14
- Joined: Tue Feb 12, 2008 12:45 pm
This time it's:nikki wrote:I've uploaded a new version, try it (look back at first post).
Code: Select all
d:\ngf\ngf.cpp(72) : error C4716: 'NGF::GameObject::addFlag' : must return a value
- nikki
- Old One
- Posts: 2730
- Joined: Sat Sep 17, 2005 10:08 am
- Location: San Francisco
- x 13
- Contact:
Hehe... That's a stupid mistake on my part. And gcc didn't tell me about it. I'm uploading the new version now, just hold on.Kaldrick wrote:This time it's:nikki wrote:I've uploaded a new version, try it (look back at first post).Code: Select all
d:\ngf\ngf.cpp(72) : error C4716: 'NGF::GameObject::addFlag' : must return a value
EDIT: Ok, its updated (same version number though, this ain't a 'new version deserving' change). I also tried building it on Windows (albeit with Visual C++ Express 2005), and it works.
-
- Gnoblar
- Posts: 14
- Joined: Tue Feb 12, 2008 12:45 pm
Code: Select all
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
- nikki
- Old One
- Posts: 2730
- Joined: Sat Sep 17, 2005 10:08 am
- Location: San Francisco
- x 13
- Contact:
You seem to have made a 'Subsystem:Windows' solution. Change it to 'Subsystem:Console'. Its somewhere in the properties.Kaldrick wrote:Code: Select all
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
After checking out the premake site, I found that they also have an experimental 'Visual C++ 2009' solution feature. You could use that to make your projects (with the given premake.lua). I chose to use premake because it allows people to easily make projects for whichever way they want to compile it (make-g++, Code::Blocks, Visual C++ etc.)
Just run 'premake.exe --target vs2008' from the 'ngftutorial/ngftutorialbase' or 'ngftutorial/ngftutorialfinal' directory.
Do check out the tutorial and readmes.
- nikki
- Old One
- Posts: 2730
- Joined: Sat Sep 17, 2005 10:08 am
- Location: San Francisco
- x 13
- Contact:
- nikki
- Old One
- Posts: 2730
- Joined: Sat Sep 17, 2005 10:08 am
- Location: San Francisco
- x 13
- Contact:
@hangchon18: Heh, thanks.
I found a small error in the documentation. It says you only need to compile and link 'Ngf.cpp'. This is wrong, you have to compile and link 'ConfigScript.cpp' too. I'll fix it soon, there's a problem with my 'development computer's monitor and I'll have to fix that first, because though I can do stuff on the computer, I can't see what I'm doing.
I found a small error in the documentation. It says you only need to compile and link 'Ngf.cpp'. This is wrong, you have to compile and link 'ConfigScript.cpp' too. I'll fix it soon, there's a problem with my 'development computer's monitor and I'll have to fix that first, because though I can do stuff on the computer, I can't see what I'm doing.
- nikki
- Old One
- Posts: 2730
- Joined: Sat Sep 17, 2005 10:08 am
- Location: San Francisco
- x 13
- Contact:
- Spoonfork
- Gnoblar
- Posts: 6
- Joined: Sun Jan 18, 2009 6:27 pm
Re: NGF - nikki's Game Framework (Latest: 09.01.01)
Hey there Nikki. Just wanted to say thanks for making this awesome framework, it's a really good design and it gave me a lot of good snippets to implement in my own "project". However, the site you uploaded the framework to seems to have deleted the file, so is there any chance you could upload it again?
- 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 (Latest: 09.01.01)
Yeah, seems it happened to BtOgre too. I have to sleep right now, it's very late right now. I'll sure reupload somewhere else first thing in the morning.Spoonfork wrote:Hey there Nikki. Just wanted to say thanks for making this awesome framework, it's a really good design and it gave me a lot of good snippets to implement in my own "project". However, the site you uploaded the framework to seems to have deleted the file, so is there any chance you could upload it again?
Thanks for the compliments!
- nikki
- Old One
- Posts: 2730
- Joined: Sat Sep 17, 2005 10:08 am
- Location: San Francisco
- x 13
- Contact:
-
- Gnoblar
- Posts: 1
- Joined: Tue Feb 10, 2009 5:23 am
- Location: Beverly, MA
- Contact:
Re: NGF - nikki's Game Framework (9.2.9)
Well, this looked interesting enough for me to register to comment
Nice work. The implementation looks very effective, and I definitely like the ties to blender.
Up until now I've been to lazy to do much with Ogre short of tinkering with the engine, perhaps this will encourage me to get off my ass
Cheers,
Daniel
Nice work. The implementation looks very effective, and I definitely like the ties to blender.
Up until now I've been to lazy to do much with Ogre short of tinkering with the engine, perhaps this will encourage me to get off my ass
Cheers,
Daniel
- nikki
- Old One
- Posts: 2730
- Joined: Sat Sep 17, 2005 10:08 am
- Location: San Francisco
- x 13
- Contact:
- 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!)
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.
To the core NGF, I've added a 'GameObjectFactory', removing the need for a LevelLoaderCallback. You can now just do NGF_REGISTER_OBJECT_TYPE(MyClass), and any entry in a level of type "MyClass" will automatically be loaded. You still have the callback mechanism for total control though. You can also create objects with a string as a type now.
And apart from the core, you can see some stuff in include/ngfplugins/ and plugins/ that might interest you.
To the core NGF, I've added a 'GameObjectFactory', removing the need for a LevelLoaderCallback. You can now just do NGF_REGISTER_OBJECT_TYPE(MyClass), and any entry in a level of type "MyClass" will automatically be loaded. You still have the callback mechanism for total control though. You can also create objects with a string as a type now.
And apart from the core, you can see some stuff in include/ngfplugins/ and plugins/ that might interest you.
- altren
- Gnome
- Posts: 329
- Joined: Tue Oct 24, 2006 9:02 am
- Location: Moscow, Russa
- x 24
- Contact:
Re: NGF - nikki's Game Framework (9.2.9) (now on git!)
Why not sourceforge? It have git, file host and many, many, many more things...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.