Continued Delta Issues.

  • sathono
    Likes 0

    Problem Description

    Hello, I have recently been having some big issues with actions. Cocos2d Move Actions seem to account for delta, so the move time is definite, regardless of the frames per second. The main problem here is I am not looking to make my game account for delta at all as it causes some serious potential glitches with collision. For example if the game is really lagging, accounting for delta could cause the player to skip over a entire block he should have collided with. I am looking to make my game run at 60 frames per second, and anything below that results in the game running slower as opposed to making bigger steps to account for the lag. Since my main code does not account for delta and the cocos2d functions do, this causes the game to run differently on certain platforms as some of them preform better then others.

    Is there a way to remove delta calculations from the core cocos2d actions? Thanks

  • Sonar Systems admin
    Likes 0

    Not unless you modify the core Cocos2d-x engine which I would not recommend, just use your own methods.

  • sathono
    Likes 0

    I have tried my own methods to account for delta and they get very buggy and unpredictable below 30 or so frames. If I use my own moveTo methods I will be loosing out on the action effects like bounce and ease.

    Lets just say I deside to try to modify the core engine functions in the filepath root/frameworks/cocos2d-html5/cocos2d.. Do you know if these changes would take effect on every platform? Or are these files just for the web version?

  • Sonar Systems admin
    Likes 0

    They should persist unless you modify files inside the platform folder which are obviuously specific to each platform.

     

    I would recommend forking the Github repo so other developers can contribute and aid you in this.

  • sathono
    Likes 0

    Cool, thats good to know. Thanks again for the help :)

Login to reply