Final Split-screen Behavior - testing phases (No longer called spit-screen)

DELETED_117713

  • Posts: 771
I was looking at some sort of work-around to stop the screen flickers and choppy frame-rate, and I finally found one.

Stencyl has a variable step rate that you can set to make the game run faster or slower. My findings shown that setting the step rate to 5 instead of 10 made everything run twice as fast.

Doing it with the split screen code made everything far less choppy. It also appears that due to running more frames than Stencyl can render (60), most frames that flicker are not rendered, making them impossible to see.

This did come with one major flaw, the doubled step size made everything move twice as fast. So I made a game attribute you can name that either has a value of 0.5, or 1. This sets anything using that variable, when multiplied, is halved or set to normal speed to make up for the faster movement.

If you were to set any movement related code related to X and Y speeds in half, it counteracts the faster movement for them.

Snapping to pixel grid is suggested, too. You should also design a game optimized so that it never has slow down, and or it must be optimized to run at 120 "FPS" with a frame buffer running with the main game. Below, I have made an example, Pressing Page Down will show the hitboxes, movement step size, and refresh rate that has been altered from said step size.

http://www.stencyl.com/game/play/34188

Please test the attached file if you want to. (Use import resource then select the PNG, it should become a behavior). If any flaws are found aside from not setting the doubled game speed issue, I will fix them. (This also means your computer must be able to run the game without issues like that!!)


« Last Edit: May 14, 2016, 02:14:46 pm by fillergames »

ichimitch

  • Posts: 73
Noice! Thanks for making this available.  I know by commenting I've bumped a very old thread, but I'm making use of this code now, so thanks

« Last Edit: February 15, 2020, 10:36:39 pm by ichimitch »

NerdinaNutshell

  • Posts: 251
Noice! Thanks for making this available.  I know by commenting I've bumped a very old thread, but I'm making use of this code now, so thanks
This code no longer works with newer versions of  Stencyl
*Puff*