Game uploaded

The Tide Summoner

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

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.

I get a syntax error in ptextgl (python 3.7.0)


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

Oh, great. Looks like that'll be a problem for anyone running with Python 3.7+.

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",
    )

Game also requires numpy
Oops. That shouldn't be necessary. I've updated the repository to not require numpy, if you don't want to have to install it. Thanks for catching that!
Hi Cosmo. Obscure compatibility bug in ptextgl.py. This bit me in Python 3.7.


 _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

Ah, you might like to have the stack trace.


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
Oof. I was going to report a crash, but in trying to reproduce it I noticed I hit the "q" key when trying to steer. In other games this is "strafe left", and I guess I've picked up the habit. So I went into settings.keys and removed pygame.K_q. Personal problem solved. XD Thought you'd appreciate this little feedback. "q" + Gumm == accidents. :D
Thanks, gumm. I think that's the same error as Starbuck5 reported upthread. If that's the case then the repository version should be fixed, but if anyone still runs into an error on the repository version, let me know!


Thanks for the tip about the Q key. I'll keep that in mind for next time.