Hi,
I'm experiencing lag in my spaceships movement after firing the laser blaster. I have 3 Canvasses. Main Game Canvas for the action and below a thumb stick canvas and buttons canvas. So when the thumb stick is dragged left the player ship moves left and when dragged right it moves right. This is done by enabling a clock which is set a 1 Interval. Nice and clean movement until the laser is fired. Once the laser is fired the movement has lag. If the thumb stick is released then dragged again the movement is clean. Any suggestions? Picture of blocks attached.
Hi
For future reference:
-
Do not remove the component type name, it makes your code difficult to follow and thus more difficult for people to help you.
-
Blocks Image: Right-mouse in the Blocks work area and select "Download Blocks as image"
Your Clock "Player Move" logic fails with the empty 'then'.
try:
A 1 millisecond timer is unnecessary and could not be relied upon anyway because Android timers have a low system priority. Try 10 milliseconds (the human eye cannot register the difference).
'LaserBlast' is that a Sound component or a Player component? If a Player, that might trigger some lag.
Thanks for the advice and the suggestion Chris. I believe I tried without the else if and still had lag. I also tried to change the sprite speed and heading when the thumb stick was dragged and still had the lag. I'm currently working with two sprites with arrow images for left and right.