megamanw Posted April 17, 2014 Share Posted April 17, 2014 So I'm working on a endless running type game and was wandering whether there a way to increase the game speed as the game proceed?? Is increase the character speed a good way or increase the game fps itself??? And how to perform those Quote Link to comment Share on other sites More sharing options...
alex_h Posted April 17, 2014 Share Posted April 17, 2014 I think I can safely say that increasing the fps is definitely NOT a good way to try to achieve this. FPS is likely to vary a great deal according to the capabilities of the hardware your game runs on, so is not by any means something you should expect to remain consistent, or indeed should expect to necessarily have anything like the value you request it to have. I can make a game and tell it to run at 60FPS, but if I then burden it with lots of expensive tasks to run each frame and then test it on a low-end device you can be pretty sure that 60FPS is not what I will end up with!You can increase the playback rate of the running animation though, and the speed at which the background moves past. Dread Knight 1 Quote Link to comment Share on other sites More sharing options...
megamanw Posted April 22, 2014 Author Share Posted April 22, 2014 I think I can safely say that increasing the fps is definitely NOT a good way to try to achieve this. FPS is likely to vary a great deal according to the capabilities of the hardware your game runs on, so is not by any means something you should expect to remain consistent, or indeed should expect to necessarily have anything like the value you request it to have. I can make a game and tell it to run at 60FPS, but if I then burden it with lots of expensive tasks to run each frame and then test it on a low-end device you can be pretty sure that 60FPS is not what I will end up with!You can increase the playback rate of the running animation though, and the speed at which the background moves past.How can I do increase the playback rate??? Quote Link to comment Share on other sites More sharing options...
alex_h Posted April 22, 2014 Share Posted April 22, 2014 This will depend on what mechanism you are using to perform the animation and what framework it is built with. You might use a spritesheet based animation and a MovieClip class. My own movieclip class has a 'fps' variable that s used to determine the number of milliseconds that each frame is displayed for. If I increase the fps value this will reduce the number of milliseconds each frame is shown and therefore reduce the overall duration of the animation. Presumably frameworks like Phaser also have an equivalent MovieClip class with an equivalent fps variable. Quote Link to comment Share on other sites More sharing options...
Luis Felipe Posted April 23, 2014 Share Posted April 23, 2014 In addition to what @alex_h said, you could also have a timer that triggers an event such as adding '+1' to the speed you set for the moving objects (the floor/obstacles for example) at a set interval (1 second for example) So if the initial speed is, say 200, then after 12 seconds it would be 212 and so on.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.