Search found 17 matches

by specialtactics
Thu Oct 13, 2005 9:27 am
Forum: Beginners Help
Topic: setting the FPS
Replies: 5
Views: 320

Hi,

i don't think there's direct support for this in irrlicht. Under Windows you can use Sleep(time), under Linux usleep(time) to suspend the program for time in ms. You will have to calculate for how long you have to suspend the program each frame to achieve the wanted framerate.
by specialtactics
Tue Oct 11, 2005 10:42 pm
Forum: Beginners Help
Topic: function (irr::IrrlitchDevice *device);
Replies: 5
Views: 213

Hi,
you probably forgot to include irrlicht.h there - the compiler tells you it doesn't know what a IrrlichtDevice is.
Actually all SceneNodes and GUIElements in irrlicht draw themselves. The object-oriented way to go would be to derive from IGUIElement or one of its subclasses.
by specialtactics
Tue Oct 11, 2005 10:34 pm
Forum: FAQs, Tutorials, Howtos, and external tool lists
Topic: Smoother stretching of 2D images in OpenGL
Replies: 2
Views: 1246

ok, a small update. I wanted to fill the entire window with a bitmap using CGUIImage as described above, but there was a one pixel wide border on the left and bottom, when creating the image like this: g_gui->addImage(rect<s32>(0, 0, resolutionX-1, resolutionY-1)); after some playing around with min...
by specialtactics
Tue Oct 11, 2005 9:56 pm
Forum: FAQs, Tutorials, Howtos, and external tool lists
Topic: Smoother stretching of 2D images in OpenGL
Replies: 2
Views: 1246

Smoother stretching of 2D images in OpenGL

Hi, today i started looking closer at the GUI of my game. IGUIImage is nice, but simply lacks scaling the image - I don't want a different image file for every resolution. Since there already is a overloaded version of draw2DImage in the VideoDriver, that can scale the image, changing GUIImage is si...
by specialtactics
Tue Oct 11, 2005 4:23 pm
Forum: Advanced Help
Topic: Relative-, AbsoluteTransformation: being off-by-1-frame
Replies: 1
Views: 702

Relative-, AbsoluteTransformation: being off-by-1-frame

Hi, I again have an issue with irrlicht not updating the AbsoluteTransformation of scenenodes for the rendering of the current frame. The core problem is basically the same I had with the updating of my camera, see: http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=9175&highlight= . I just ...
by specialtactics
Tue Oct 11, 2005 9:23 am
Forum: Beginners Help
Topic: camera is shaking, or maybe the world is?
Replies: 6
Views: 1001

Good point, Guest. You're right, that it should behave exactly the same, no matter if you put it in your code after you setPosition(), setTarget() and setUpVector() or if you put it in the engine where I suggested. But since this is neither documented anywhere (or maybe I just didn't find the doc), ...
by specialtactics
Tue Oct 11, 2005 12:46 am
Forum: Beginners Help
Topic: camera is shaking, or maybe the world is?
Replies: 6
Views: 1001

That's just in my testing code to make the effect as visible as possible and not to use any of my game variables.. What the sine does is make the camera move along the y axis back and forth. The constant numbers set the speed and the amplitude of the bouncing.
by specialtactics
Mon Oct 10, 2005 3:37 pm
Forum: Beginners Help
Topic: camera is shaking, or maybe the world is?
Replies: 6
Views: 1001

OK, source found, too: insert updateAbsolutePosition(); in CCameraSceneNode.cpp at line 218. The problem is that the call (a few lines lower) View.buildCameraLookAtMatrixLH(pos, Target, up); used last frame's position. Because a call to CameraSceneNode->setPosition() updates the RelativePosition but...
by specialtactics
Mon Oct 10, 2005 12:01 pm
Forum: Beginners Help
Topic: camera is shaking, or maybe the world is?
Replies: 6
Views: 1001

camera is shaking, or maybe the world is?

Hi, i am writing a game where the camera (instance of ICameraSceneNode*) is looking down on the game board. I attached the camera movement to the mouse but instead of the camera's view angle being constant (the camera's direction is!) it shakes and jitters. The effect is more noticable when the came...
by specialtactics
Mon Oct 10, 2005 8:19 am
Forum: Beginners Help
Topic: Simple event receiver questions
Replies: 1
Views: 206

Hi, v.Y += event.KeyInput.Key == KEY_KEY_W ? 2.0f : -2.0f (you missed a minus in your text, whereas you have it in the code snippet) is essentially the same as if (event.KeyInput.Key == KEY_KEY_W) { v.Y += 2.0; } else { v.Y += -2.0; } since this gets executed when KeyInput.Key is either KEY_KEY_W or...
by specialtactics
Wed Oct 05, 2005 11:19 pm
Forum: Beginners Help
Topic: Optimizing Irrlicht
Replies: 2
Views: 209

if your system overheats when running at 100% you should recheck your configuration!

but acki is right, limiting a game to a specific fps, by delaying it with someting like sleep might be a good idea too. games running at 1000+ fps is just overkill...
by specialtactics
Wed Oct 05, 2005 11:12 pm
Forum: Advanced Help
Topic: still stick at chess game
Replies: 7
Views: 600

I haven't looked at how getSceneNodeFromScreenCoordinatesBB() works but i reckon it must be checking if the ray intersects with any of the bounding boxes of all nodes in the scene and returns the one which is closest. So it's definetely doing more computations than my code. Using getSceneNodeFromScr...
by specialtactics
Mon Oct 03, 2005 7:32 pm
Forum: Advanced Help
Topic: still stick at chess game
Replies: 7
Views: 600

Hi, i'm doing a game in which i have a map made out of squares (so pretty close to a chess board) and i also have to check at which square the mouse is pointing. so here is how i did it: my map is a plane at z=0 (makes the calculations simpler), i then create a ray from the eye through the screen at...
by specialtactics
Fri Sep 30, 2005 5:20 pm
Forum: Beginners Help
Topic: multiple fonts using the gui
Replies: 1
Views: 201

:)
just 5 minutes later i found the function that i overlooked:

Code: Select all

void IGUIStaticText::setOverrideFont(IGUIFont* font=0);
which does exactly what i was looking for. problem solved.
by specialtactics
Fri Sep 30, 2005 5:08 pm
Forum: Beginners Help
Topic: multiple fonts using the gui
Replies: 1
Views: 201

multiple fonts using the gui

Hi, i want to use different Fonts in my game. One way I could do that is load font1, font2, etc. and use font1->draw(...). But is there a way to use the IGUI... stuff with multiple fonts? That's much nicer because irrlicht manages its rendering and the available controlelements are quite convenient....