Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valkyrie hangs at "EndRound" #846

Closed
scrubbless opened this issue Jun 27, 2018 · 8 comments
Closed

Valkyrie hangs at "EndRound" #846

scrubbless opened this issue Jun 27, 2018 · 8 comments
Milestone

Comments

@scrubbless
Copy link
Collaborator

scrubbless commented Jun 27, 2018

Description of Problem or Question

My scenario has a lot of components and overlapping events.
It also makes quite extensive use of end/start rounds and Mythos triggers.

When play testing ending the round can be very slow, sometimes it can take up to 5 seconds to load and start the next phase.

While this isn't a problem when there are no monsters on the board, as the freeze happens after the Mythos event. However when you end the Horror step when monsters are present and it hangs, it's easy to think you have miss clicked the end turn and when Valkyrie catches up it will then remember your second press and end the next investor phase.

I suspect that it's due to the number of events using the 'End Round's trigger.
I've tried to name all of these events as A_EndR_*.

My other scenario Stress and Strain does it to a smaller extent, as it has fewer end round events.

Valkyrie Version

2.01

Attach Save, Quest or Scenario

https://github.com/scrubbless/ScenariosInProgress

Scenario is called 'A Strain on Reality'

@LordPyrex
Copy link
Collaborator

Sounds more like a strain on Valkyrie! Is it possible to nest some of your events? Or is it possible that they could all take place at the end of the round? I guess what I'm imagining is something like an index pointer that runs at the end of the round and can have branches out after doing some test checks. Then if it runs an event, that event can change the variable and feed it back to the tree making an in-cursive loop to run multiple events.

@scrubbless
Copy link
Collaborator Author

scrubbless commented Jul 3, 2018

Haha yeah I have been flogging poor Valkyrie with this one.

I did think of that, I use incursive loops alot throughout the scenario. Check the journal/rb_item QItems if you want to see how mad I went. Some of the EndRound events are loops within themselves. I'll have a think of the best way to do it, but I think you're right.

Cheers for the assist. For now I've put a UI elements splash screen at the start of the round, this stops the double end turn press for now.

@scrubbless
Copy link
Collaborator Author

scrubbless commented Jul 4, 2018

I've consolidated those events into one end round event, but it hasn't really helped.
I guess I can test the theory by turning off my end round event and see if it all speeds up :)

EDIT:

I suspect there is a rogue EndRound event that I've miss labelled and forgotten about. Is there an easy way to find events with EndRound in the ini files? I assume it'll be in events.ini, would it be as simple as searching for "EndRound"?

Got to a PC and worked it out - "trigger=End Round" in the events.ini. Turns out there is only one other EndRound Event.

Edit2:
Added some text on the end of the EndRound "loop" and consolidated a rogue EndRound event into the single one (there are no others) and it still hangs. But now it hangs when I hit continue to the endround triggered event loop, (it cleans up the variables used to track which events ran). So that would suggest the problem is not with EndRound and suggests it's StartRound (or something Valkyrie does between EndRound and StartRound)... I shall keep puzzling.

I now think it could be a rogue startround event, but I thought I only had two of those! I suspect that I have a broken evebt loop somewhere and Valkyrie is running it till timeout. If I can't find it I'll turn of all Start/End/Mythos triggers, that might identify the rogue process! If not, I may have just pushed Valkyrie past its limits! Haha

@scrubbless
Copy link
Collaborator Author

scrubbless commented Jul 4, 2018

Ok I am officially at a loss. I completely disabled my massive EndRound event, thinking it might be that. But no luck.

I turned off all of my StartRound, EndRound and Mythos triggered events, searched the .ini for all "Triggers" and all that are there are "Eliminated" and some "DefeatXXX".

Now when I End Turn, the normal Mythos Event pops up and then it takes 5-10 seconds to proceed to the Investigator phase.

Is my scenario just too big for Valkyrie?
I think its ~67mb at present with all the music sound and image files.
The localisation file is nearly 5000 lines and the events.ini is 13600 lines of code.

Any help on this would be greatly appriciated. I am Stumped.

Is there any way to get a realtime log of what Valkyrie is doing so I can work out whats causing this issue?

@NPBruce
Copy link
Owner

NPBruce commented Jul 4, 2018

Not likely to be based on file size. More likely to do with the number of elements that are displayed (tiles, tokens, UI). Hopefully some of the speed improvements will fix this. Sorry I haven't had much time lately, I will investigate when I can.

@scrubbless
Copy link
Collaborator Author

scrubbless commented Jul 5, 2018

No need to apologise @NPBruce.

EDIT:

I've added a loading screen that runs as the final event in the 'EndRound' chain. That is then removed in the first event of the StartRound. This way the UI element should block the player from clicking the end round arrow and gives them some information on whats going on.

Edit2:
When testing this, it's pretty clear that the delay is not due to events and something Valkyrie is doing.

I added that loading screen to lay down at the end of the mythosround, the. Remove at the start of the EndRound, then add again at the end of the EndRound events and be removed at the end of the start round. The idea being a loading screen should appear during the 'slowness' between events.

The UI elements never appears.

Is there a cleanup process or something Valkyrie is doing during this time?

@BenRQ
Copy link
Collaborator

BenRQ commented Sep 2, 2018

To be tested with the changes I did on #842.
Automatic savegames do not save the full archive, so if it was the issue, it should be MUCH faster.

@scrubbless
Copy link
Collaborator Author

It's rapid! Well done

@redwolf2 redwolf2 added this to the 2.1 milestone Oct 5, 2018
@redwolf2 redwolf2 closed this as completed Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants