Blank window after restarting a game in the testing build of the desktop player #1411
Replies: 14 comments
-
UPDATE Something in the update to 5.8 broke this. It works properly in 5.7.2. |
Beta Was this translation helpful? Give feedback.
-
We added a restart command to 5.8. Code added - CoreCommands.aslx - Lines 1008-1019 <command name="restart" pattern="^restart$">
<script>
Ask (Template("WantRestartGame")){
if (result){
JS.eval("if(webPlayer){window.location.reload();}else if (typeof(RestartGame) != 'undefined'){RestartGame();}else{addTextAndScroll('Try pressing CTRL+R.')};")
}
else {
game.suppressturnscripts = true
}
}
</script>
</command> Code added - PlayerHTML.vb - Lines 170-172 Private Sub RestartGame(data As String)
m_keyHandler_KeyPressed(131154)
End Sub Code added - desktopplayer.js - Lines 30-32 function RestartGame() {
UIEvent("RestartGame", "");
} ... but all that should do is emulate CTRL+R, which is what I'm doing when having this issue playing Legacy games. Also, these aren't changes; they're additions. ...and the only file the legacy game runner should use out of these is desktopplayer.js, if it even uses that. (Probably so; just haven't checked to be sure.) That function being added to the JS file still shouldn't effect anything, though. It's not being called, and I don't think calling So, I'm thinking this probably isn't the issue. |
Beta Was this translation helpful? Give feedback.
-
Well... I have a branch called "Retro" in one of my forks, and the only difference in the code is it doesn't have the 5.8 UI. It's still the 5.7.2 interface. The legacy games restart fine in my Retro build. So, it has to be something in those changes to the 5.8 UI. The issue is not:
|
Beta Was this translation helpful? Give feedback.
-
It didn't fix it when I undid this change, either: |
Beta Was this translation helpful? Give feedback.
-
I forgot I actually installed the current build from the Quest 5.8 works properly, too. Something changed or added recently has to be the culprit. |
Beta Was this translation helpful? Give feedback.
-
Okay... I believe it was something after this commit: 9e37029 The I'm about to make a new branch based off the retro branch, merge all the recent changes, and see what happens. I'm also converting this to a Discussion, and I'll create a new PR without all my "notes". |
Beta Was this translation helpful? Give feedback.
-
Perhaps we need to add these changes to LegacyGame.vb as well? |
Beta Was this translation helpful? Give feedback.
-
Private Sub UIEvent(cmd As String, args As String)
LogASLError("Running UIEvent: " + cmd + " ; " + args + "")
Select Case cmd
Case "ASLEvent"
RunASLEvent(args)
Case "RestartGame"
DoClear()
DoBegin()
End Select
End Sub Probably not very helpful, but adding this to LegacyGame.vb gives me the ability to restart a game from JS Note This is not included in the build I'm using to test things. |
Beta Was this translation helpful? Give feedback.
-
After restarting a LegacyGame, the screen goes blank. If I open the log, it shows the entries from LegacyGame.vb, saying that things loaded. Each time I restart, it updates the time(s) in those log entries, too. Also, if I open the HTML console and run |
Beta Was this translation helpful? Give feedback.
-
I added this code to the testing build, and |
Beta Was this translation helpful? Give feedback.
-
I undid the changes from this commit, and that fixed the issue with restarting legacy games. ...but those changes were made to fix #1274 [INSERT CURSE WORDS HERE] 😁 |
Beta Was this translation helpful? Give feedback.
-
Well... I really wish I would have tried a Quest 5 game when I first noticed this issue. No games work after restarting in the desktop player, regardless of the ASL version. Changes this (to undo the recent changes) fixes the issue when restarting as far as the game loading is concerned: Private Sub OnDocumentLoad()
If m_resetting Then
m_resetting = False
Return
End If
'If Not m_hasRaisedReadyEvent Then
'm_hasRaisedReadyEvent = True
RaiseEvent Ready()
'End If
End Sub |
Beta Was this translation helpful? Give feedback.
-
I'm 99% sure ...but I don't understand why that would be the case if Private m_resetting As Boolean = False
Private m_hasRaisedReadyEvent As Boolean = False |
Beta Was this translation helpful? Give feedback.
-
Aha! I was hoping for a way to do something like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
After clicking Restart (or CTRL+R), the screen goes white ... and that's it.
Quest updates/rewrites the log every time I click Restart, though:
I'll look at the way restarting works when playing Quest 5 games and submit a PR if I find a fix.
Beta Was this translation helpful? Give feedback.
All reactions