Player: HOME (OFF fangame) Hang when entering level 'SH1'

Created on 14 Dec 2016  路  6Comments  路  Source: EasyRPG/Player

Name of the game: HOME

Player platform: Arch Linux

Attach files

save.zip
easyrpg_log.txt

Describe the issue in detail and how to reproduce it:

Entering the room to the upper left causes Player to hang and take up all of one CPU. Tested with the continuous build.

Hang Patch available Performance

Most helpful comment

I'm still breaking things with that MakeWay commit - -;;;;;

The frame_count_at_last_update_parallel field is supposed to prevent this: it lets us know if we already tried to update on the current frame so we only visit every character once in a frame. That's what this block does. I just failed to also place this block in Game_Event::UpdateParallel (which is rather embarrassing since I named the field after it and all :p).

If you add it there, the Player won't lock up.

All 6 comments

This somehow happens when too many events are pushing each other (MakeWay) and the event in front can't move.
HOME has 15 events that push each other. In my debug build it starts to lag with 4 events.
So it's not getting stuck, just running too slow.

And every of these 15 events has 15 Move right events with attribute "skip if not possible". So this accumulates to tons of "makeway" calls when cascaded from the leftmost to the rightmost :/

I'm still breaking things with that MakeWay commit - -;;;;;

The frame_count_at_last_update_parallel field is supposed to prevent this: it lets us know if we already tried to update on the current frame so we only visit every character once in a frame. That's what this block does. I just failed to also place this block in Game_Event::UpdateParallel (which is rather embarrassing since I named the field after it and all :p).

If you add it there, the Player won't lock up.

Great, because I had no idea how to fix it :)

I fixed this in the development branch and added some comments to make the purpose more clear.

I retested this with #1687

Everything works and there is no noticeable change in CPU usage (Ubuntu linux).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ghabry picture Ghabry  路  13Comments

BlisterB picture BlisterB  路  66Comments

carstene1ns picture carstene1ns  路  18Comments

vicusdanielson picture vicusdanielson  路  19Comments

hellow554 picture hellow554  路  14Comments