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: 463

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 ...
by DimonSE
Thu Jun 07, 2012 11:19 pm
Forum: Project Announcements
Topic: IrrNewt irrlicht\newton framework >> SVN access
Replies: 432
Views: 164707

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 ...
by DimonSE
Sun Dec 11, 2011 5:39 pm
Forum: Beginners Help
Topic: 2D game - FPS to fast
Replies: 8
Views: 1545

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 idea
{

//do stuff
prevTime = curTime ...
by DimonSE
Sat Dec 10, 2011 4:58 pm
Forum: Beginners Help
Topic: 2D game - FPS to fast
Replies: 8
Views: 1545

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 = curTime;

world.ProcessKeyboardEvents(&receiver);

//Airplanes moved, bullet also moved, fires ...
by DimonSE
Sat Dec 10, 2011 2:34 pm
Forum: Beginners Help
Topic: 2D game - FPS to fast
Replies: 8
Views: 1545

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: 1545

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 ...