Bug Issue: Moving paused actors doesn't move their sprite


Pages: 1

Luyren

  • Master Stencyler
  • *
September 07, 2018, 06:20:03 pm
b9982, on Windows. Posting here because I'm unsure if it is really a bug or by design.

If you change the X/Y position of an actor when the game is paused, the actor goes to the new position (or at least its collision goes), but its sprite remains in place until the game is unpaused.  It's not related to Image API or the "draw image for actor" block, it's the actual actor's image that is not moving. If the actor is drawing something with the drawing blocks, they remain with the sprite as well until the game is unpaused. Using the blocks to hide/show sprite work as normal.

Edit: in the Pause Game Test2 attached, I added another issue that seems related. If you kill a paused actor, and create the same type in a different position, its collision will be in the proper place, but its sprite will be in the position of the actor that was killed.

Sample game: press enter to pause, click the mouse to spawn an actor, press up or down to move the last created actor to two preset positions. With debug drawing on, you will see the collision box changing position, and the sprite still in place when the game is paused. Press right to kill the last created actor.
« Last Edit: September 07, 2018, 06:37:02 pm by Luyren »


New attachment added by Luyren - September 07, 2018, 06:20:32 pm


New attachment added by Luyren - September 07, 2018, 06:35:05 pm


rob1221

  • Master Stencyler
  • *
September 09, 2018, 08:01:27 am
In b9983, creating an actor will now draw that actor in the correct place even when paused.

Since actors stay in the same place when paused while moving with velocity or tweening, it makes sense for the actors to also stay when setting the x and y directly.  The collision shape moves because setting the x/y is something that happens immediately rather than over time like velocity and tweening.  However, preventing the actor from moving at all would be inconsistent with the other methods of moving, and rewriting the engine to delay the movement of the collision shape would likely not be worth the effort and is likely to cause more problems.  If you require setting the x/y while paused and also not moving the collision shape, you could try tweening with a very short timer.
  • Status changed from New to Resolved
  • Issue Assigned from (none) to rob1221


Luyren

  • Master Stencyler
  • *
September 09, 2018, 09:02:30 am
b9983

For the most part they are created in the proper position. There is one case in which it still creates at the previous position.

If you kill an actor and then create that type again, it's drawing will still be in the old actor's position. Creating more actors later on are drawn in the proper position.


rob1221

  • Master Stencyler
  • *
September 09, 2018, 11:19:40 am
I'm unable to reproduce that.  Could you be more specific?
  • Status changed from Resolved to Need Info


New attachment added by Luyren - September 09, 2018, 01:25:07 pm


Luyren

  • Master Stencyler
  • *
September 09, 2018, 01:28:29 pm
Attached pause game test 3, to isolate this issue.

Press "enter" to pause the game, and click anywhere to create an actor at that position. Press "right" to kill that actor, then click again in a different position to create a new actor. This newly created actor is created at the right position (that can be seen with debug drawing), but its sprite is at the last actor's position. If you click again without killing the actor, it will create the actor at this new position, with its sprite also in the correct position.


rob1221

  • Master Stencyler
  • *
September 09, 2018, 02:13:55 pm
Looks like the build server is broken so you aren't getting the latest build even though it says so on the download page.
  • Status changed from Need Info to Resolved


Luyren

  • Master Stencyler
  • *
September 09, 2018, 03:57:58 pm
Deja vu. I'll redownload at a later date and confirm the fix.


rob1221

  • Master Stencyler
  • *
September 10, 2018, 04:26:01 am
It's updated now.


Luyren

  • Master Stencyler
  • *
September 11, 2018, 12:31:53 pm
b9983, fix confirmed.


Pages: 1

Details

  • Reported
    September 07, 2018, 06:20:03 pm
  • Updated
    September 11, 2018, 12:31:53 pm

  • View Status
    Public
  • Type
    Bug
  • Status
    Resolved
  • Priority
    Normal
  • Version
    3.5.0 beta 1
  • Fixed in
    (none)
  • Assigned to
    rob1221
  • Category
    Engine

Tags


Attachments

* Pause Game Test.stencyl (775.3 kB - downloaded 25 times.)
* Pause Game Test2.stencyl (775.39 kB - downloaded 14 times.)
* Pause Game Test3.stencyl (773.95 kB - downloaded 13 times.)