Search found 6 matches

by DimonSE
Wed Jul 11, 2012 8:30 am
Forum: Beginners Help
Topic: IrrNewton: movement of physical objects
Replies: 2
Views: 370

IrrNewton: movement of physical objects

Hi all! I need help with IrrNewton (it's irrlicht wrapper for newton dynamic). So, I write air-hockey game and use newton physic (just for get skills). In my code I have a plane, two mallets and air-hockey puck, and I need move mallet in some point on plane. I've tried use newton::IBody->setPosition...
by DimonSE
Thu Jun 07, 2012 11:19 pm
Forum: Project Announcements
Topic: IrrNewt irrlicht\newton framework >> SVN access
Replies: 432
Views: 132499

Re: IrrNewt irrlicht\newton framework >> SVN access

I compile irrNewt with Irrlicht 1.7.3 in Visual studio 2008 ---> http://irrlicht-newton-wrapper.googlecode.com/files/IrrNewt_SDK_0_4.zip First, I change some parts of .cpp to get compatibility with Irrlicht 1.7.3 (just very small blocks of code) I've change: 1. bool OnEvent(Event event) change to bo...
by DimonSE
Sun Dec 11, 2011 5:39 pm
Forum: Beginners Help
Topic: 2D game - FPS to fast
Replies: 8
Views: 1238

Re: 2D game - FPS to fast

Ok, I used both ways. First, I set this code   u32 prevTime = device->getTimer()->getTime(); while(device->run())         {              u32 curTime = device->getTimer()->getTime();                 if (device->isWindowActive() && (curTime - prevTime) > 16) //arbitrary value, to give you an i...
by DimonSE
Sat Dec 10, 2011 4:58 pm
Forum: Beginners Help
Topic: 2D game - FPS to fast
Replies: 8
Views: 1238

Re: 2D game - FPS to fast

Sorry :D First in main() i do this:   while(device->run())         {                 if (device->isWindowActive())                 {                         u32 curTime = device->getTimer()->getTime();                         world.deltaTime =curTime-world.time;                         world.time = ...
by DimonSE
Sat Dec 10, 2011 2:34 pm
Forum: Beginners Help
Topic: 2D game - FPS to fast
Replies: 8
Views: 1238

Re: 2D game - FPS to fast

I tried do this, and i have another problem. I save the deltaTime to log file every frame and get this result (time in millisecond):

Code: Select all

16
17
16
17
16
17
16
....
16
68
1
2
1
11
17
16
17
17
16
 
So, when I have deltaTime = 2 or =68 I have twitch of sprites.
Why I have uncorrect deltaTime sometimes?
by DimonSE
Sat Dec 10, 2011 1:19 pm
Forum: Beginners Help
Topic: 2D game - FPS to fast
Replies: 8
Views: 1238

2D game - FPS to fast

Hi all. I create simple 2d game where 2 airplanes shot each other. Now it's look like this http://irrlicht-2d-airplanes.googlecode.com/files/alpha_vers.jpg So in my computer I have FPS=58-61, but in computer of my friend FPS=250 and game is very fast How I can correct this? I tried do device->sleep:...