Page 5 of 22

Posted: Sat Jan 28, 2006 9:06 pm
by area51
Hi,

Not been able to get IrrSed to generate any code using the version on the site, probably me doing stuff wrong though.

I recon it should be pretty easy as both use Irrlicht's SceneManager. At worst you might have to change a couple of variable names to get it working.
________
JAILBROKEN

Posted: Sun Jan 29, 2006 9:08 pm
by jclins
Say, area51, have you consider inlining the really simple accessor and mutators functions?

Instead of doing this in the .cpp:
//! Returns a pointer to the Irrlicht Device subsystem
IrrlichtDevice* CGameManager::getDevice()
{
return m_pDevice;
}
Do this in the .h:
//! Returns a pointer to the Irrlicht Device subsystem
inline IrrlichtDevice* CGameManager::getDevice()
{
return m_pDevice;
}
Well, after writing the above, I found that inlining may or may not improve performance:

http://www.parashift.com/c++-faq-lite/i ... ml#faq-9.3

Posted: Mon Jan 30, 2006 1:03 am
by area51
Hi jclins,

I have tried inline functions but they seemed to made no difference at all.

I think if the function was called may thousands of time per game loop, then it might.

As a general rule, I think performance tuning early on is a bad thing anyway. It usually ends up compromising the design and integrity of the code.

When I was doing the AI, I kept a close eye on what I was going where, but apart from that, unless it's obvious, then I dont usually worry too much about performance.
________
MFLB VAPORIZER

Posted: Mon Jan 30, 2006 11:15 am
by Guest
This would be very nice.
Irrwizzard with Leveldesign and Scripting Tool Support.
An Realy easy to use tool the Gamedesigners they dont want to write code.

Uhh, sorry for my gramma. I Hope you understand.

Posted: Mon Jan 30, 2006 1:31 pm
by area51
Yes possibly, there are a few usefull projects that could be combined/used in conjunction with good effect.

I think a good idea on a similar line would be to create a generic or common IEntity class. Each project could then code against a common/basic interface, making them in turn more useful.

It would probably need to be a seperate project, everyone could submit what info they need/use/want, then a common subset could then be boiled down and used.

Just a thought :idea:
________
Fake weed

Posted: Tue Jan 31, 2006 11:47 am
by Guest
A Irrlicht Scripting interface like the UEBERTOOLS from Ritual would be nice.

Hmm, whats with this :
very easy integration of every game Object per .txt files.
In The .txt file you can define all Atributes of an Entity, Model, Trigger and and and

Posted: Tue Jan 31, 2006 12:26 pm
by area51
That will be next after I finish the WeaponManager.
________
ZX14 VS HAYABUSA

Posted: Wed Feb 01, 2006 2:08 pm
by Guest
nice :D

Posted: Thu Feb 02, 2006 11:25 am
by Guest
das is so tight das es burnt

Loadmap

Posted: Wed Feb 15, 2006 10:21 pm
by Guest
Is there any possibility to load a other map in the LOADMAP function?

Code: Select all

CGamePlayState::LoadMap(pManager, "20kdm2.bsp", core::vector3df(-1300,-144,-1249));
Cause making a *.bsp is difficult. I use Milkshape 3D.

Kind regards.

Posted: Wed Feb 15, 2006 11:18 pm
by SenVa
I haven't tested this but if you edit the
void CGamePlayState::loadMap(CGameManager* pManager, const c8 *map)
function in GamePlayState.cpp file you should be able to load any model type.

The original function looks like this.

Code: Select all

void CGamePlayState::loadMap(CGameManager* pManager, const c8 *map)
{		
	// Load in MD3 Level from resources
	m_Selector = 0;
	scene::IAnimatedMesh* mesh = pManager->getSceneManager()->getMesh(map);scene::ISceneNode* node = 0;
	if (mesh)
		node = pManager->getSceneManager()->addOctTreeSceneNode(mesh->getMesh(0));
	if (node) 
	{
		node->setPosition(core::vector3df(-1300,-144,-1249));
        m_Selector = pManager->getSceneManager()->createOctTreeTriangleSelector(
            mesh->getMesh(0), node, 128);
		node->setTriangleSelector(m_Selector);
		m_Selector->drop();
	}
	m_pMetaSelector = pManager->getSceneManager()->createMetaTriangleSelector(); 
    m_pMetaSelector->addTriangleSelector(m_Selector);
You would just need to add the texture code in there...

Something like this would do

Code: Select all

node = pManager->addAnimatedMeshSceneNode(mesh);
	node->setMaterialTexture(0,	driver->getTexture("texture source"));
	node->getMaterial(0).EmissiveColor.set(0,0,0,0);
I hope this helps you.

Posted: Wed Feb 15, 2006 11:36 pm
by titere
very good !!!

can you put a picture with the UML diagram ???

Posted: Thu Feb 16, 2006 8:50 am
by Quack
SenVa wrote:I haven't tested this but if you edit the
void CGamePlayState::loadMap(CGameManager* pManager, const c8 *map)
function in GamePlayState.cpp file you should be able to load any model type.

The original function looks like this.

Code: Select all

void CGamePlayState::loadMap(CGameManager* pManager, const c8 *map)
{		
	// Load in MD3 Level from resources
	m_Selector = 0;
	scene::IAnimatedMesh* mesh = pManager->getSceneManager()->getMesh(map);scene::ISceneNode* node = 0;
	if (mesh)
		node = pManager->getSceneManager()->addOctTreeSceneNode(mesh->getMesh(0));
	if (node) 
	{
		node->setPosition(core::vector3df(-1300,-144,-1249));
        m_Selector = pManager->getSceneManager()->createOctTreeTriangleSelector(
            mesh->getMesh(0), node, 128);
		node->setTriangleSelector(m_Selector);
		m_Selector->drop();
	}
	m_pMetaSelector = pManager->getSceneManager()->createMetaTriangleSelector(); 
    m_pMetaSelector->addTriangleSelector(m_Selector);
You would just need to add the texture code in there...

Something like this would do

Code: Select all

node = pManager->addAnimatedMeshSceneNode(mesh);
	node->setMaterialTexture(0,	driver->getTexture("texture source"));
	node->getMaterial(0).EmissiveColor.set(0,0,0,0);
I hope this helps you.
thank you.

I would try it when i'm not @ school. 8)

Posted: Thu Feb 16, 2006 1:57 pm
by Quack
I tried your solution SenVa.
The driver is now called: m_pDriver.

i used

Code: Select all

node = pManager->m_pSceneManager->addAnimatedMeshSceneNode(mesh);
and

Code: Select all

CGamePlayState::LoadMap(pManager, "media/Bal.ms3d", core::vector3df(-1300,-144,-1249));		
else i got an error.

but when i press play a get an error on the texture.

Code: Select all

node->setMaterialTexture(0,m_pDriver->getTexture("media/Bal1.jpg"));
I get an unhandeld exception.

When i export a ms3d to Q3Radiant *.MAP. And put it in place of the *.bps file. And i don't use the texture source like SenVa told. I get a gray screen. But no error.

I'm still a n00b with Irrlicht.

Posted: Fri Feb 17, 2006 2:26 am
by Anteater
Great program! I have two questions.
1. I think I found a bug. It is possible to shoot through walls in Irrlicht ver. 0.12.0 and the latest IrrWizard version. While visibly it looks correct (the white smoke appears) it is still possible to kill the zombie/shotgun man without seeing him and vica versa. How could I fix this? The shooting code itself looks pretty darn simple, so it couldn't be too hard.

2. May I distribute the source of my programs made with IrrWizard?

Oh, and by the way, the new version of Eric 3 is what I'm making with it.