Game uploaded
This is a PyOpenGL game so there's bound to be some cross-platform bugs. Please let me know here if you find any, thank you!(log in to comment)
Comments
Traceback (most recent call last):
File "run_game.py", line 1, in <module>
from src import maff, main
File "/Users/charliehayden/Downloads/tide-summoner/src/main.py", line 6, in <module>
from . import view, ptextgl, control, graphics, pview, world, state, thing, hud, quest, sound
File "/Users/charliehayden/Downloads/tide-summoner/src/view.py", line 4, in <module>
from . import settings, pview, world, state, quest
File "/Users/charliehayden/Downloads/tide-summoner/src/quest.py", line 4, in <module>
from . import state, world, view, enco, sound, graphics, thing, settings, ptextgl
File "/Users/charliehayden/Downloads/tide-summoner/src/ptextgl.py", line 19
_fields = tuple(field for field in ptext._DrawOptions._fields if field not in
^
SyntaxError: Generator expression must be parenthesized
To fix it, I think you need to add parentheses around the argument to tuple in src/ptextgl.py, lines 19-23, and remove the comma at the end of line 20. I've updated the code in the repository if you want to get it from there.
Before:
_fields = tuple(field for field in ptext._DrawOptions._fields if field not in ("surf", "cache"), ) + ( "prep", )
After:
_fields = tuple((field for field in ptext._DrawOptions._fields if field not in ("surf", "cache") )) + ( "prep", )
_fields = tuple(field for field in ptext._DrawOptions._fields if field not in ("surf", "cache"), ) + ( "prep", )Work around by removing the first comma or wrapping the generator in parens:
_fields = tuple(field for field in ptext._DrawOptions._fields if field not in ("surf", "cache")) + ("prep",)
_fields = tuple((field for field in ptext._DrawOptions._fields if field not in ("surf", "cache")),) + ("prep",)
Here is a discussion: https://stackoverflow.com/questions/33137503/generator-expression-must-be-parenthesized-if-not-sole-argument
Traceback (most recent call last): File "run_game.py", line 1, in from src import maff, main File "\tide-summoner\src\main.py", line 6, in from . import view, ptextgl, control, graphics, pview, world, state, thing, hud, quest, sound File "\tide-summoner\src\view.py", line 4, in from . import settings, pview, world, state, quest File "\pyweek30\tide-summoner\src\quest.py", line 4, in from . import state, world, view, enco, sound, graphics, thing, settings, ptextgl File "\tide-summoner\src\ptextgl.py", line 19 _fields = tuple(field for field in ptext._DrawOptions._fields if field not in ^ SyntaxError: Generator expression must be parenthesized
Thanks for the tip about the Q key. I'll keep that in mind for next time.
Cosmologicon on 2020/09/27 17:17:
I've uploaded a version 2 with a fixed save feature. It autosaves every 5 seconds. The game is short enough that you probably won't use it, but if the game crashes for you, it's nice to not have to start over. The gameplay is identical between versions, though.The pickling error I ran into with the save feature was pretty confusing. For anyone curious, here's an example script showing the issue.