Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

[Fixed in 1.0.59+] Camera doesn't follow player when updating room.

A topic by Gypsy created May 12, 2022 Views: 600 Replies: 6
Viewing posts 1 to 4
(2 edits)

Hey YAL,

I currently tried to update the room by adding blocks, and when I save and the room restarts, the blocks are added, but the camera no longer follows the player or the object its supposed to follow. 

It starts going towards the player but stops right it gets him inside the view, and when I press the jump button, the camera jumps with the player and prevents the player from entering the view, and it will move horizontally with the player when he reaches the edge and is almost about to exit the view. So basically, the camera doesn't allow the player to be inside the view vertically, and whenever I move left and right, it starts moving just as the player is about to be completely outside the view.

I tried adding the 'if (live_call()) return live_result;' in the create and step events of the camera and the objects its supposed to follow, but it doesn't work still.

The room updates, but the camera is completely busted. Can you please inform me how to fix this issue, I'm at an important stage where tweaking levels has be closing and restarting the build every few seconds and this fix would lower work time on these things significantly.

Cheers YAL.

EDIT: While experimenting, I changed the width and height of the camera from 640 x 360 to 1920 x 1080, and I can say that it definitely doesn't work as expected. Basically, at 1920x1080 the camera starts moving when the player is nearing the middle of the screen, but after reloading the room after editing it, the camera starts moving a good distance before the player reaches the mid point of the view. Any idea why this is happening?

Developer

As you might understand, there is not a lot that I can guess from this description alone - need a snippet of code that fails to work at least and a minimal reproducible project at best.

I sent you an email with a link to the project, let me know what you find out. Cheers, YAL.

I'll send you the project with names for the objects in an email. Looking forward to hearing from you, YAL!

Has this problem been solved? I also encounter the same problem. and after reloading the room, some global variables loaded by other rooms are also lost.

Developer

The update’s not out yet - there’s a bit of a backlog of variously exotic issues (some of which are originate from GameMaker bugs/undocumented behaviour/breaking changes) and I’m also refactoring a handful of code to be a little faster for common use cases.

If you can trim down your project to a minimally reproducible case, send me a copy over email - the known issues are:

  • This issue
  • “ignore” checkboxes on instances are not honored.
  • The new sprite speed values are not honored.
  • Named instances no longer work because self is a struct now (and not a constant)
  • ref types in the beta build cause further oddities because there is no function to check if a value is a ref.
  • Effect layer colors no longer work because you can no longer do real(ptr("hex value here"))
  • Sprite assets are added “as seen in the room editor” while GameMaker adds them in reversed order
  • Updater doesn’t watch room creation code files for changes, only the room.

A workaround I found for now that works well is I make the view far like 1920x1080 when editing the levels, that allows the game to update and the camera to follow the player, but the borders of when the camera starts following the player is not the same afterwards, and that's the issue; when the camera is close enough, the borders work late which keeps the player off screen. Being far away fixes that. I hope this helps until we get an update. Cheers!