Possible to make things based on time and not fps?

Get help using Construct 2

Post » Thu Jan 24, 2013 8:23 pm

Hi,

I'm working in a game which will run at drastically diferent frame rates depending on which browser the player uses and how good their computer is.

I noticed even events set to run every X seconds are actually based on Frame Rate. Is ther eany way to overcome this situation and make things happen at specific intervals instead of being frame-rate dependant?

thanks
B
45
S
8
G
4
Posts: 414
Reputation: 6,805

Post » Thu Jan 24, 2013 8:58 pm

I looked at some options and see there's a function to compare the "time". I assume this would be the ideal way to regulate events to make them happen at very percise intervals. this right?

That still leaves the issue of animation speeds and movement speeds...is there a simple way to insure they don't vary greatly depending on browser and computer speed (FPS)?

Thanks
B
45
S
8
G
4
Posts: 414
Reputation: 6,805

Post » Thu Jan 24, 2013 9:12 pm

Hello there, while I am still coming to grips with C2 myself, the best options I have seen so far are basing things on dt (delta time) which by default most platform behaviors should be. You can use dt to calculate the amount of time that has passed and base things off of it instead.

Maybe some of the others here will be able to offer some better explanation on it.

On a side note, I love spriter, great work! And just for my curiosity, is the game you're working on Nnar?
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418

Post » Thu Jan 24, 2013 9:43 pm

perhaps this will help?

http://www.scirra.com/tutorials/67/delta-time-and-framerate-independence
B
14
S
6
G
2
Posts: 136
Reputation: 3,210

Post » Thu Jan 24, 2013 9:54 pm

@ BluePlaze,
Thanks for hte kinds words on Spriter. Right now the work being done on Nnar is all concept and game art.. but not the engine as of yet... The game in question is for a client of mine. (dayjob) Thats all I can say about it until the game is released. ;)

Thanks for mentioning dt.

@ wretchedshark

Thans very much for the useful link.

cheers,
Mike
B
45
S
8
G
4
Posts: 414
Reputation: 6,805

Post » Fri Jan 25, 2013 3:06 am

[QUOTE=Brashmonkey] Hi,

I'm working in a game which will run at drastically diferent frame rates depending on which browser the player uses and how good their computer is.

I noticed even events set to run every X seconds are actually based on Frame Rate. Is ther eany way to overcome this situation and make things happen at specific intervals instead of being frame-rate dependant?

thanks [/QUOTE]

Actually your right. Last week another person was testing out a platformer and found that FPS determined jump height. However, that's not how it should be working. The entire point of the dt was to avoid pixel stepping from fps. Unfortunatly that doesn't seem to be the case. I'm hoping with enough topics like this being kept active that the situation will be looked into :)

Anyways love Spriter and now that your here. Will a new C2 plugin be coming out with the next beta release? C2 could seriously use one.
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Fri Jan 25, 2013 5:18 am

[QUOTE=jayderyu] Anyways love Spriter and now that your here. Will a new C2 plugin be coming out with the next beta release? C2 could seriously use one.[/QUOTE]


+100 on this one!
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418

Post » Fri Jan 25, 2013 12:52 pm

Thanks again guys,

The C2 plug wont be ready at the same time as the next build is released, but its one of our highest priorities once the build is out. In fact, one of the important features we added to this build (a small part of what was taking so long;) ) is the feature to auto-name all objects within Spriter so that importing Spriter projects into C2 will be much faster and easier.. it will even auto-name objects in currently existing projects which include objects that were not named.
Construct2, Construct Classic, and the Scirra community have been a big part of Spriter's birth and will definitely be a big part of Spriter's future.
B
45
S
8
G
4
Posts: 414
Reputation: 6,805

Post » Fri Jan 25, 2013 5:38 pm

That is awesome to hear! I can't wait to show you what my team comes up with using Spriter and C2. It's a large part of my strategy for making my workflow smoother and allowing my artist to focus on pieces at a time instead of entire poses.
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418

Post » Fri Jan 25, 2013 9:35 pm

I can't wait to see, BluePhaze. As a C2 user myself, I'm just as excited at the prospects of a finished Spriter and C2 plug!

cheers,
Mike at BrashMonkey
B
45
S
8
G
4
Posts: 414
Reputation: 6,805

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 32 guests