Hi there!
Im a total beginner at lua, and love2d in general - not that well versed in programming / game creation either.
Im trying to create a text based fortune teller experience that takes the user through various states and guides the player down the one of several endings through dialog.
Im currently using the Dialove Library to show dialog, and the GameStateManager Library to take the game through various states for different dialogs / experiences
Dialove : https://github.com/gustavostuff/dialove ... me-ov-file
GameStateManager : https://github.com/GwyrddGlas/GameStateManager
________________
Ive structured it so that it takes the player from the title screen, down several states, and then to the end screen.
For reasons completely unknown to me, my game would run fine for the first few states ( showing dialog, and options ), but will always freeze at the last dialogue of 03_Esoteric_A
The dialog box would show and go through all the dialogue, however, when i press ' enter ' ( to transition to the next state, Esoteric_B ) , the game would always freeze.
Ive tried to debug it as best as i can ( shifting things around, trying to go through the logic of the various states ) but i cant seem to understand why it always freezes at a certain point ( ive tried linking titlescreen to 04_revelation state , and after about 9 or so dialogs shown, it will always freeze the program )
And im completely lost as to what Im doing incorrectly, or implementing wrongly
Any help / insight would be greatly appreciated.
( i hope ive formatted the post, and the .love file attachment according to what the forum expects. Its my first time so i appreciate the patience )
Thank You!
Unsure why game is freezing at a specific point , using GamestateManager and Dialove Library
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 1
- Joined: Fri Jan 03, 2025 10:51 am
Unsure why game is freezing at a specific point , using GamestateManager and Dialove Library
- Attachments
-
- TROY V0.3.love
- (3.3 MiB) Downloaded 14 times
Re: Unsure why game is freezing at a specific point , using GamestateManager and Dialove Library
Hi, welcome to the forums.
It seems like a bug in dialove. I'm not sure why, but the list of dialogues (activeDialogListMap) gets an element zero, and when that happens there's a loop in pop() that never ends. The culprit is the `repeat`...`until` loop at lines 311-316 of libraries/Dialove/dialove.lua. If I add a line like this, it works:
It seems like a bug in dialove. I'm not sure why, but the list of dialogues (activeDialogListMap) gets an element zero, and when that happens there's a loop in pop() that never ends. The culprit is the `repeat`...`until` loop at lines 311-316 of libraries/Dialove/dialove.lua. If I add a line like this, it works:
Code: Select all
repeat
if self.activeDialogListIndex >= 1 then
self.activeDialogListIndex = self.activeDialogListIndex - 1
table.remove(self.activeDialogListMap)
else break -- <<<<<<< add this line
end
until not self:getActiveDialogList() or #self:getActiveDialogList() > 0
Who is online
Users browsing this forum: Google [Bot] and 15 guests