RyanC
Member
Hi All,
I have been trying to make a ghost on my platform game which basically records the users game play and plays it back again.
The issue I'm facing is that on different scales the ghost does not perform correctly.
About the game mechanics.
player x position is generally fixed, with the floor objects moving instead.
game x and y speed is based on the game scale which varies on devices.
player x and y positions can sometimes move if pushed by another object, after which everything lerps a little to re-position the player in the room.
player y position also has a typical gravity and move_contact_solid() system.
The game has no views and all scale is done manually when zooming out. for example:
scale*=0.99
x*=0.99
y*=0.99 etc
game_speed then adjusts according to scale. Zooming can only be done before starting the level or recording.
I have managed to get a fairly reliable ghost recording but it occasionally has issues where the player is not at the same place at a certain step in the recording sequence when on a different scale.
My thoughts:
Should the gravity amount be based on game scale?
Are the lerps messing up the synchronicity on various scales? (The lerp speed is not based on scale, as I think this is a percentage of distance already which would take scale into account?)
What is the default math_set_epsilon() and can this be used to address the speed vs scale issue.
Is there a way to make all x and y values integers while still using gravity and lerp functions?
Any help greatly appreciated.
I have been trying to make a ghost on my platform game which basically records the users game play and plays it back again.
The issue I'm facing is that on different scales the ghost does not perform correctly.
About the game mechanics.
player x position is generally fixed, with the floor objects moving instead.
game x and y speed is based on the game scale which varies on devices.
player x and y positions can sometimes move if pushed by another object, after which everything lerps a little to re-position the player in the room.
player y position also has a typical gravity and move_contact_solid() system.
The game has no views and all scale is done manually when zooming out. for example:
scale*=0.99
x*=0.99
y*=0.99 etc
game_speed then adjusts according to scale. Zooming can only be done before starting the level or recording.
I have managed to get a fairly reliable ghost recording but it occasionally has issues where the player is not at the same place at a certain step in the recording sequence when on a different scale.
My thoughts:
Should the gravity amount be based on game scale?
Are the lerps messing up the synchronicity on various scales? (The lerp speed is not based on scale, as I think this is a percentage of distance already which would take scale into account?)
What is the default math_set_epsilon() and can this be used to address the speed vs scale issue.
Is there a way to make all x and y values integers while still using gravity and lerp functions?
Any help greatly appreciated.