Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Had to run the game in python to find out what was happening, but I occasionally get an error that crashes the game.

Traceback (most recent call last):   File "/home/zachary/Downloads/Holding-Out-main/main.py", line 76, in <module>     Game()   File "/home/zachary/Downloads/Holding-Out-main/main.py", line 21, in __init__     asyncio.run(self.main())   File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run     return runner.run(main)            ^^^^^^^^^^^^^^^^   File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run     return self._loop.run_until_complete(task)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete     return future.result()            ^^^^^^^^^^^^^^^   File "/home/zachary/Downloads/Holding-Out-main/main.py", line 41, in main     current_frame.update(dt, events)   File "/home/zachary/Downloads/Holding-Out-main/frame.py", line 171, in update     agent.update(dt, events)   File "/home/zachary/Downloads/Holding-Out-main/enemy.py", line 267, in update     fact = 1/(dist - self.radius - item.radius)            ~^^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ZeroDivisionError: float division by zero </module>

Looks like that happens when you win the floating point math lottery by having the enemies bump the player or the phone table in exactly the wrong way.

The correct way to code it would be to check for zero here… but not doing that is faster which was important when I was making this game for a 48-hour jam.

Not planning on making any updates to the game at this point, but good catch, and I appreciate reporting the stack trace!

Thanks, I understand.