IrrWizard?

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

I started my engine from studying IrrWizard :wink: .

P.S
I might not have many tutorials (mini games of different genres) but I have two cool docs that you can use to study my structure and maybe make something of your own.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
pera
Posts: 460
Joined: Wed May 14, 2008 1:05 pm
Location: Novi Sad, Serbia
Contact:

Post by pera »

are you still working on your engine? It would be nice to see some scripting added, and other stuff from your todo list.
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

I'm in the army now (getting pro in programming) so I'm taking a break from it now but when I finish my course I'll have time to work on it again.

P.S
MasterGod wrote:...Currently (since last week) I'm serving in IDF (Israel Defense Forces) and I'm going through a very intensive programming course (6 days a week, 5 of them from 7:30 AM to 10:00 PM), which will last for 3 months. After that I'm going to serve for another 5.5 years doing programming stuff for my country. I love what I'm doing and it makes me feel good....
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
Pie21
Posts: 13
Joined: Mon Oct 06, 2008 11:21 am
Location: Melbourne, Australia
Contact:

Post by Pie21 »

Wow, quite a bump, but it's not as if this doesn't deserve a little more spotlight. I have a question that should be easy to solve, but hard to pose.

I quickly discovered that defining classes in one file and everything else in main() created some serious restrictions. A bit of searching brought me to IrrWizard, and it has got to be the most beautiful example of program structure I've seen (not that I've seen too many ;)). So I went about deconstructing the structure and building it up from scratch to understand it. I hit some serious walls, but using the output of IrrWizard as something of a cheat sheet, I've got it pretty much straightened out.

It's an incredibly bare-bones version, and probably won't even display anything when it runs, but I'm just trying to get all my files in order and compiling first. The thing is they compile happily (a minor miracle in itself) , but I hit just a couple of linker errors. They're your basic 2019s and 2001s, but I'm pretty sure I've included everything I can and have a suspicion it's something specifically to do with all the #including and calling between sources that's giving me trouble.

So here's my linker output:

Code: Select all

1>Linking...
1>CGame.obj : error LNK2019: unresolved external symbol "public: class irr::IrrlichtDevice * __thiscall CGameManager::getDevice(void)" (?getDevice@CGameManager@@QAEPAVIrrlichtDevice@irr@@XZ) referenced in function "public: bool __thiscall CGame::Run(void)" (?Run@CGame@@QAE_NXZ)
1>CGamePlayStateDefault.obj : error LNK2001: unresolved external symbol "public: class irr::IrrlichtDevice * __thiscall CGameManager::getDevice(void)" (?getDevice@CGameManager@@QAEPAVIrrlichtDevice@irr@@XZ)
1>CGamePlayStateDefault.obj : error LNK2019: unresolved external symbol "public: class irr::video::IVideoDriver * __thiscall CGameManager::getDriver(void)" (?getDriver@CGameManager@@QAEPAVIVideoDriver@video@irr@@XZ) referenced in function "public: virtual void __thiscall CGamePlayState::Init(class CGameManager *)" (?Init@CGamePlayState@@UAEXPAVCGameManager@@@Z)
1>C:\Users\Oliver\Documents\Visual Studio 2008\Projects\Tango3D\Debug\Tango3D.exe : fatal error LNK1120: 2 unresolved externals
They're all problems with methods of CGameManager, but I've gone through many times and my version is basically identical to area51's, minus a bunch of features like gui, input, sound, enemies, items, fx... y'know, the minor things :P

The files I've got are the .h's and .cpp's of CGame, CGameManager, CGameState, CGamePlayState, and CGamePlayStateDefault (the equivalent of Level01), and a main.cpp. Basically everything relevant that appears in their IrrWizard equivalents (no C in filenames) is present, with everything referring to other files removed.

I figure, as with seemingly all linker errors, the first reaction would be to include missing .lib's, but I've got a #pragma comment(lib, "Irrlicht.lib") in main.cpp (as per IW), and the full path to Irrlicht.lib in my linker's additional dependencies, as well as the Irrlicht include directory as an include dependency. Something else to note is that the getDevice() and getDriver() methods that seem to be sources of problems when called from elsewhere are marked as inline, which I have only a passing understanding of and have read has to do with linkers in some situations.

EDIT: Basically, the getDevice() and getDriver() methods of CGameManager are throwing linking errors 2001 or 2019 when called from other classes, HOWEVER this can be resolved by merging the definition and declaration into the header, rather than defining said accessors in the .cpp. However the getSceneManager method works fine, and it's basically identical to getDriver, in that it does the same thing and the scene manager pointer was created the same way as the driver pointer.
[/EDIT]

SO! Long-winded introduction to a (hopefully) pretty simple error. Linkers always confuse the hell out of me, possibly in part because simply factoring code in C++ forces me to think pretty hard :P. Any idea what to include? Or fix? Need more information?

As a last word, I gotta say again this a beautiful framework, and its taught me more about game structure programming than whatever Google turned up. I can't wait to pick learn JP's IrrPhysx and try and plug that in as a physics manager! :D
veegun
Posts: 59
Joined: Mon May 29, 2006 1:58 am

Post by veegun »

Pie21 wrote:Wow, quite a bump, but it's not as if this doesn't deserve a little more spotlight. I have a question that should be easy to solve, but hard to pose.

...

As a last word, I gotta say again this a beautiful framework, and its taught me more about game structure programming than whatever Google turned up. I can't wait to pick learn JP's IrrPhysx and try and plug that in as a physics manager! :D
Yes, it is without a doubt one of the best framework to mess around with. I've been tinkering with it a bit myself. If you do make a physics manager, please share with other irrWizard users. :P It's too bad area never got around to putting in the scripting manager. That would be sweat. I'm working on an FMOD sound manager. I'll share it when I'm done but it's pretty simple.
stash
Posts: 47
Joined: Wed Dec 12, 2007 11:28 am
Location: Brasil, SC

Release the project to use Irrlicht 1.5 ?

Post by stash »

Hey guys... you want to generate a release of the project to use Irrlicht 1.5 ?
outkast
Posts: 3
Joined: Sat Dec 13, 2008 2:29 am

Re: Release the project to use Irrlicht 1.5 ?

Post by outkast »

stash wrote:Hey guys... you want to generate a release of the project to use Irrlicht 1.5 ?
i agree with this man.
ulao
Posts: 274
Joined: Fri Mar 28, 2008 2:13 am

Re: Release the project to use Irrlicht 1.5 ?

Post by ulao »

outkast wrote:
stash wrote:Hey guys... you want to generate a release of the project to use Irrlicht 1.5 ?
i agree with this man.
- I agree too, I'm working on it, will post any progress I make.
Daggio
Posts: 9
Joined: Mon Oct 20, 2008 7:04 am
Location: Surabaya, Indonesia

Post by Daggio »

I've just downloaded irrWizard 1.2 and when I want to debug it I have this output:
------ Build started: Project: Testing, Configuration: Debug Win32 ------
Compiling...
GameStateLevel01.cpp
GameState.cpp
c:\irrwizard\myproject\game.h(25) : error C2259: 'CGameManager' : cannot instantiate abstract class
due to following members:
'bool irr::IEventReceiver::OnEvent(const irr::SEvent &)' : is abstract
c:\documents and settings\aryo pandu subagio\my documents\irrlicht-1.5\include\ieventreceiver.h(351) : see declaration of 'irr::IEventReceiver::OnEvent'
GamePlayState.cpp
GameManager.cpp
GameIntroState.cpp
GameCreditsState.cpp
Game.cpp
c:\irrwizard\myproject\game.h(25) : error C2259: 'CGameManager' : cannot instantiate abstract class
due to following members:
'bool irr::IEventReceiver::OnEvent(const irr::SEvent &)' : is abstract
c:\documents and settings\aryo pandu subagio\my documents\irrlicht-1.5\include\ieventreceiver.h(351) : see declaration of 'irr::IEventReceiver::OnEvent'
Generating Code...
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 9.00.30729
Copyright (C) Microsoft Corporation. All rights reserved.
BSCMAKE: error BK1506 : cannot open file '.\Debug\main.sbr': No such file or directory
Build log was saved at "file://c:\IrrWizard\myProject\Debug\BuildLog.htm"
Testing - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I don't know what's wrong here
I'm using visual C++ 2008 and irrlicht 1.5,if that could help :D
shadow2kx
Posts: 3
Joined: Mon Apr 21, 2008 12:34 am

Post by shadow2kx »

error C2259: 'CGameManager' : cannot instantiate abstract class

-> Means that the CGameManager is abstract (there is AT LEAST one pure virtual methode). You can't instantiate an object wich isn't completly defined.

'bool irr::IEventReceiver::OnEvent(const irr::SEvent &)' : is abstract

-> Here is the function wich cause the trouble. Go to see the definition of the CGameManager and you'll probably see an OnEvent(irr::SEvent) methode. Just look at the prototype... Something is wrong. Just add 'const' and the reference '&' in both .h and .cpp and it will be running.

When you have this kind of trouble don't forget to compare the prototype of the implemented interfaces.
Bodzio
Posts: 15
Joined: Mon Nov 10, 2008 8:53 am

Post by Bodzio »

It's only theory. I have the same error as Daggio but i have Code::Blocks so my error log looks that:

Code: Select all

||=== IrrWizard, default ===|
D:\Maciek\Prace\Programowanie\C++\myProject\source\game\Game.h|25|error: cannot declare field 'CGame::m_GameManager' to be of abstract type 'CGameManager'|
D:\Maciek\Prace\Programowanie\C++\myProject\source\game\..\core\GameManager.h|49|note:   because the following virtual functions are pure within 'CGameManager':|
D:\Maciek\Prace\Programowanie\C++\Irrlicht\include\IEventReceiver.h|351|note: 	virtual bool irr::IEventReceiver::OnEvent(const irr::SEvent&)|
||=== Build finished: 1 errors, 0 warnings ===|
Can anybody solve this error
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Just *read the FAQ* or ask google. With this error message and Irrlicht in topic it's easily possible to find the solutions.
Bodzio
Posts: 15
Joined: Mon Nov 10, 2008 8:53 am

Post by Bodzio »

hmm, I was trying to solve this error by editing

Game.h

Code: Select all

CGameManager* m_GameManager;
Game.cpp

Code: Select all

	while(m_GameManager->getDevice()->run())
		{


		if (m_GameManager->getDevice()->isWindowActive())
			{
				m_GameManager->getConsole()->Draw();
			  	m_GameManager->Update();
			}


	}


	m_GameManager->getDevice()->drop();
...but...
Image

I'm sorry that it's in Polish but it means that it isn't working ;) (app crash)

Maybe it's fault of something else (for example Vista) so I uploaded my full project: http://files.filefront.com/irrWizard15+ ... einfo.html
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

Just *read the FAQ* or ask google. With this error message and Irrlicht in topic it's easily possible to find the solutions.
If you ask questions, at least bother to read the replies ;)
Nikko_Bertoa
Posts: 42
Joined: Wed Feb 18, 2009 5:26 am

Post by Nikko_Bertoa »

Hi irrlicht community.
Recently I used Irrwizard framework to make a basic FPS and I discovered some bugs and I implemented some functions that doesn't exist.

(1) Bug:
Free resources and memory problem.

(2)Implementation:
CGameWeaponManager::getTargetsPosition(CGameManager* pManager).

(3) Bug:
When I change weapon and the animation isn't finished if I press ESC I go to menu screen, If I enter again in the level the weapon can't move.

(4) Some others things that I don't remember now.

How can I contribute to IrrWizard??? Is an active community??

Thanks!
Post Reply