Animation Speed

For questions about using Classic.

Post » Sat Aug 16, 2008 12:52 pm

Can you set an animation speed to something like "3.7" ? not just whole numbers, and will it make a difference?
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Sat Aug 16, 2008 1:17 pm

[quote="Jayjay":8o2ov6mv]Is it possible for a TimeDelta Framerate Mode? What I mean is that you set the Framerate mode to "Time Delta" and it will automatically apply the TimeDelta multiplication to any actions that don't already involve it at runtime? That would be even easier and would allow the numbers to stay the same inside the program while the objects are moved and etc at Time Delta.[/quote:8o2ov6mv]

how would it tell the difference between something like:
on button clicked -> set x to x+10
always -> set x to x+10

the always one you want timedelta with, the button one you dont :(

if you know about timedeltas from the start (fallen into that trap aswell) its really not that hard to implement them
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Post » Sat Aug 16, 2008 2:09 pm

[quote="faggatron":2pz24hfq]if you know about timedeltas from the start (fallen into that trap aswell) its really not that hard to implement them[/quote:2pz24hfq]
The problem is that if this is a problem for someone like Kayin who made IWBTG, how hard would it get for people who have never made games before? People who Construct is aimed at. Sure, there are workarounds, but most people will lose hope before they have the effort to try them.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Sat Aug 16, 2008 5:16 pm

[quote="Jayjay":1nfzu996]The problem is that if this is a problem for someone like Kayin who made IWBTG, how hard would it get for people who have never made games before? People who Construct is aimed at. Sure, there are workarounds, but most people will lose hope before they have the effort to try them.[/quote:1nfzu996]
All the built-in behaviors do this automatically for you. So it's only a problem if you go making custom movements as kayin is doing here - and if you make custom movements, you need to know about TimeDelta. Also, there's no band-aid fix for this - as faggatron said, you can't just automatically apply fixes - if you move objects by yourself, the runtime can't tell if it's a constant speed or a simple change of position.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sat Aug 16, 2008 5:18 pm

I admit I didnt understand timedelta at first, but after reading the wiki page on it a couple of times it's easily doable for anyone capable of using construct at all. Once you know roughly where you should be adding it, there usually isn't that much thought required.

When I didn't know timedelta existed, started making a game, then tried to add it afterwards I did end up just breaking the game, so its not really ideal, as it is pretty much vital - I just can't see a better alternative to it.
One tip for doing this I think is to remember that timedelta is roughly 1/fps, so if the rate it would usually be fixed at is 60, then instead of: set x to x+5, you can do set x to x+5*60*timdelta, then when the FPS is about 60 the timedelta and the 60 cancel eachother out and you've got what you wanted. Probably just stated the obvious heh.

Also, maybe construct is aimed at people who've never made games before, but I don't think thats who it should be aimed at - what it should be is anyone who wants to make a game, but doesnt want to learn a programming language. Just as much aimed at people who want to make complicated games as people who have never made a game at all.
This is probably actually who it's aimed at but it sometimes seems people who have never made a game are the priority right now.
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Post » Sat Aug 16, 2008 7:35 pm

Oh, I understand what you both mean now, I think I need to reread the wiki on TimeDelta a few hundred more times :? Sorry for hijacking your thread Kayin :oops:
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Sat Aug 16, 2008 10:14 pm

I don't think time delta is a 'problem'. Most people who are going to move to a custom path should be able to grasp time delta. I do and for a basic platformer engine or something like IWBTG, I would be able to handle it. The problem arises now because I'm doing something and demanding a lot of precision from it. The more I think about it the more I think I can convert it to work. Anyways, a few things.

First, I'd suggest a command along the lines of 'move object by time", which will move an object to whatever coordinates over a length of time. This doesn't accomplish anything that can't be handled now, but would address the needs of many people working on the behavioral level and would simpify some stuff for advanced users. Doesn't help me with what I'm doing, but I think it'd a good 'accessibility' thing. (also have a tick version plz :D)

Secondly, shouldn't there be a way to the game adjust automatically? I'm used to hearing good technical reasons for why things can't happen around here (so I'm expecting a 'no'), but I still have to bring it up just in case. I didn't have to do anything like this in Multimedia fusion 2, I could simply set the game to skip frames instead of slow down. I'm going to imagine that most of the FPS problems for most games are on the rendering end -- isn't it possible to still run logic for 60 frames while only updating things visually at a more sustainable frame rate? Or if not, some other solution? I mean, it certainly has been done before, but I can't be sure the limitations presented by the way Construct is designed that would allow/disallow certain solutions.

Construct can certainly live with timedelta,that's for sure, but automating things like other game makers have would certainly go a long way on helping along more advanced construct functions while not confusing lower level developers.

Anyways, I'm going to go play with converting my engine to see if it'll work. Either way I'll live, but I hope my suggestions are both workable and desirable.

Edit: Oh and don't worry Jayjay, I already hijacked my own thread.
B
12
S
4
G
4
Posts: 238
Reputation: 2,426

Post » Sat Aug 16, 2008 11:44 pm

Okay, I've made a deal of progress, and it seems most stuf is up to par. But since I don't have a good way to drop or boost my frame rate, I can't test a few things so I want to as another timing issue (someone should just rename this thread to something more accurate XD).

Anyways, my question is whats the best way to keep a decreasing value in sync witht he actions on screen? Especially since the (every X) action doesn't have the resolution to try and match 1 tick in 60 frames. I can do it for 20 milliseconds which might be close enough, but not as smooth. Is there a better way? I can use delta time of course, but I fear dealing with these values as decimals. Thoughts?
B
12
S
4
G
4
Posts: 238
Reputation: 2,426

Post » Sun Aug 17, 2008 2:02 am

[quote="kayin":w83q4efj] I don't have a good way to drop or boost my frame rate, [/quote:w83q4efj]
Set framerate mode to unlimited to boost and fix it on like 20 to drop.

[quote="kayin":w83q4efj] Anyways, my question is whats the best way to keep a decreasing value in sync witht he actions on screen? Especially since the (every X) action doesn't have the resolution to try and match 1 tick in 60 frames. I can do it for 20 milliseconds which might be close enough, but not as smooth. Is there a better way? I can use delta time of course, but I fear dealing with these values as decimals. Thoughts?[/quote:w83q4efj]
cant you just use timedelta then use int(x) where you need it? (Construct's never really given my any problems with using floats for anything apart from using the % function)

I was playing IWTBTG because someone mentioned it. (you're a bastard :cry: ) It did make me laugh when I saw there were 2 versions, one that skips frames and one that slows down, since timedelta is pretty much the cure for both of those problems 8)
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Post » Sun Aug 17, 2008 2:29 am

[quote="kayin":1vt6qqk9]Secondly, shouldn't there be a way to the game adjust automatically? I'm used to hearing good technical reasons for why things can't happen around here (so I'm expecting a 'no'), but I still have to bring it up just in case. I didn't have to do anything like this in Multimedia fusion 2, I could simply set the game to skip frames instead of slow down. I'm going to imagine that most of the FPS problems for most games are on the rendering end -- isn't it possible to still run logic for 60 frames while only updating things visually at a more sustainable frame rate? Or if not, some other solution?[/quote:1vt6qqk9]
I can't think of a way to automate the timedelta adjustments. The built in behaviors ideally would do everything you wanted, and with a timedelta based engine, but I guess we're not there yet. And as faggatron said, the engine can't tell the difference between continuous and one-off movement, so it isn't really possible to add it. I don't think it is a complicated thing for users to code, even if it is frustrating to retro-fit it on to a tick based engine - I think TimeDelta is an appropriate and good solution to the problem. For example, running events at 60FPS and displaying at 75FPS means at some point you display the same frame twice without running any events, so you're not actually genuinely achieving 75FPS. It would be pointless.

I can't think of any reason you wouldn't want to use a V-synced display for games (other than complaining about TimeDelta!) and I can't think of any legitimate uses for anything to be tick-based in Construct. It should all be based off real seconds. That's technically the best solution, which results in best quality games. If MMF2 doesn't implement it, it doesn't mean it works fine, it still suffers from all the problems of tick-based engines. I say this a lot, and I'll say it again: use V-sync, and use timedelta based engines! It's the only way to design a game that isn't going to tear the display, and isn't going to run at different speeds for different people. If you have a fixed framerate, your games will look ugly because they can't V-sync. And if your game slows down due to poor hardware, it will start crawling along reaaallly slow. Timedelta engines keep the gameplay going at the intended speed even if the system can't hit V-sync framerates.

The whole premise of a fixed framerate is flawed because if a user's system can't achieve that framerate, nothing you've coded runs at the intended speed. You can fix your framerate at 60fps if you want, but someone's old PC might end up running it at 20fps anyway! Do you want the game to run three times slower than it should for them?

I'm not out to shout you down here or anything - I just think there's a clear case for never using fixed framerate and always using V-sync. I might even add a warning dialog if you choose a fixed framerate. It's not suitable for games. TimeDelta is not a difficult concept and game designers should go to the trouble of learning just a little about it, in order to design games which are fairer, better quality, and more professional.

Convinced? ;)
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

PreviousNext

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest