Please test my app!

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

whoa puh!!! that did it! you are the man!! thnx for the comments and the help. The map runs smoothly now!!

@mm765: thnx! I lost the link to the irc channe. could someone please post it to be used with chatzilla?


ps. has anyone tried the other features? (changing cameras, wireframe rendering , etc). I'm sure my errors are very basic things, like the one Puh detected in y particles.

thanks guys!

I appreciate it! :D
Image
erSitzt
Posts: 52
Joined: Sun May 09, 2004 11:59 am

Post by erSitzt »

...i like that signature :)
Hardwarespecs in signatures suck !
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

lol!!! :D

I thought you would....
Image
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

hehe, I like it too. Didn't notice it until now... :)

@afecelis:
Server: irc.freenode.net
Channel: #Irrlicht

Link: irc://irc.freenode.net/#irrlicht
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Thnx Jox. Jox, can u give me a hand with my event receivers? :D
Image
Sinclair fan

Post by Sinclair fan »

My ZXSpectrum +2A has a 64k RAM-disc. Cool eh? :D
Im going to have to dig out "Dizzy" and waste more years of my life re-figuring all the little puzzles out again. lol
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

Hm, you're having this in your while loop:

Code: Select all

	if (Maya) {
	//maya cam
	camera[3] = smgr->addCameraSceneNodeMaya(); <---------------------
	//Draw scene
	smgr->drawAll();
	} 
//-----------------------------------------------------------------------------------------------//	
	//If Normalcam is used
	if (Normalcam) {
	//Normalcam
	camera[3] = smgr->addCameraSceneNodeFPS(); <---------------------
	camera[3]->setPosition(core::vector3df(-2000,200,0));
	camera[3]->setRotation(core::vector3df(0,90,0));
	camera[3]->setFarValue (50000.0f) ;
	camera[3]->setFOV(1.1);
	camera[3]->setTarget(core::vector3df(-2000,200,0));
	//Draw scene
	smgr->drawAll();
	} 
seems you're addin one camera each frame... thats no good.

Add 2 cameras before the while(device->run())

MayaCam = smgr->addCamerraSceneNodeMaya(...)
NormalCam = smgr->addCamerraSceneNode(...)

these need to be global like the camera array

// before main()
ICameraSceneNode *MayaCam, *NormalCam;

you could also expand your camera array: camera[6] and use camera[4] and camera[5] instead...


then initialize

camera[3] = NormalCam;


in the eventReceiver say:

Code: Select all

	//Key M enables Maya camera
	if (event.KeyInput.Key == KEY_KEY_M && event.KeyInput.PressedDown)
	 {
	   camera[3] = MayaCam;
	   return true;
	    }
	//Key N enables fps cam
	if (event.KeyInput.Key == KEY_KEY_N && event.KeyInput.PressedDown)
	 {
	   camera[3] = NormalCam;
	   return true;
	    }
just quickly made this up, might contain error or two. But you get the idea...

Btw, would help a lot making your code more readably if you'd use some identation:

Code: Select all

main() {
    while(true) {
        if (false) {
        }
    }
}
instead of:

Code: Select all

main() {
 while(true) {
if (false) {
}
}
  }
:wink:
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

ooooooooopsss!!! :oops:

you're right!!

thanks for all the comments and tips!!! Gonna try that immediately and clean up my code a bit.

I also gotta learn some "codetiquette" so any advice is valuable.

Shall I do the same for the wireframe rendering as well? i mean, declaring everything at the beginning?
Image
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

mh, the wireframe thing is not that critical. But you could do this:

Code: Select all

meshnode->setMaterialFlag(video::EMF_WIREFRAME,WireFrame);
sydneynode->setMaterialFlag(video::EMF_WIREFRAME,WireFrame);
instead of this:

Code: Select all

if (WireFrame) {
    //render in wireframe
    meshnode->setMaterialFlag(video::EMF_WIREFRAME,true);
    sydneynode->setMaterialFlag(video::EMF_WIREFRAME,true);
}
to be able to switch back! ;)

Also you could kick out some of your smgr->drawAll() calls...
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

great Jox! It seems like someone will be having fun this afternoon!!! :D

BTW, what ever happened with the DX mipmapping bug we were tracking? did it get solved? If you compile my test app with DX8-9 you'll se some weird things (jaggies) occur in the shadows. I guess it has to do with the same thing.

many many many thnx!
Image
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

I had forgotten! MM765, thnx for the invitation, I'll drop by the channel tonight!!

thnx!
Image
Yan
Posts: 1
Joined: Sun Oct 03, 2004 2:58 pm
Contact:

Post by Yan »

I'd really like to test your app, but there's always a "404 error" message. Is there a new link?

Thx,
Yan
blackbirdXXX
Posts: 20
Joined: Tue Sep 21, 2004 9:08 pm

Post by blackbirdXXX »

jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Of course! It's got your help in it!!!! :D :D :D :D


unfortunately it's only the bin version. That's the source I lost!!!!!
:cry: :cry: :cry:
Image
Post Reply