IrrWizard?
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
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
Last edited by area51 on Thu Feb 24, 2011 11:55 pm, edited 1 time in total.
Say, area51, have you consider inlining the really simple accessor and mutators functions?
Instead of doing this in the .cpp:
http://www.parashift.com/c++-faq-lite/i ... ml#faq-9.3
Instead of doing this in the .cpp:
Do this in the .h://! Returns a pointer to the Irrlicht Device subsystem
IrrlichtDevice* CGameManager::getDevice()
{
return m_pDevice;
}
Well, after writing the above, I found that inlining may or may not improve performance://! Returns a pointer to the Irrlicht Device subsystem
inline IrrlichtDevice* CGameManager::getDevice()
{
return m_pDevice;
}
http://www.parashift.com/c++-faq-lite/i ... ml#faq-9.3
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
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
Last edited by area51 on Thu Feb 24, 2011 11:55 pm, edited 1 time in total.
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
________
Fake weed
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
________
Fake weed
Last edited by area51 on Thu Feb 24, 2011 11:56 pm, edited 1 time in total.
Last edited by area51 on Thu Feb 24, 2011 11:56 pm, edited 1 time in total.
Loadmap
Is there any possibility to load a other map in the LOADMAP function?
Cause making a *.bsp is difficult. I use Milkshape 3D.
Kind regards.
Code: Select all
CGamePlayState::LoadMap(pManager, "20kdm2.bsp", core::vector3df(-1300,-144,-1249));
Kind regards.
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.
You would just need to add the texture code in there...
Something like this would do
I hope this helps you.
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);
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);
thank you.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.
You would just need to add the texture code in there...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);
Something like this would do
I hope this helps you.Code: Select all
node = pManager->addAnimatedMeshSceneNode(mesh); node->setMaterialTexture(0, driver->getTexture("texture source")); node->getMaterial(0).EmissiveColor.set(0,0,0,0);
I would try it when i'm not @ school.
I tried your solution SenVa.
The driver is now called: m_pDriver.
i used
and
else i got an error.
but when i press play a get an error on the texture.
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.
The driver is now called: m_pDriver.
i used
Code: Select all
node = pManager->m_pSceneManager->addAnimatedMeshSceneNode(mesh);
Code: Select all
CGamePlayState::LoadMap(pManager, "media/Bal.ms3d", core::vector3df(-1300,-144,-1249));
but when i press play a get an error on the texture.
Code: Select all
node->setMaterialTexture(0,m_pDriver->getTexture("media/Bal1.jpg"));
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.
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.
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.