A debug render to see what is going on visually

The Cove

The Cove


python 3.11
pygame -or- pygame-ce

Run using: python -OO run_game.py  or py -3.11 -OO run_game.py

More of a tech demo than a game due to some struggles and time constraints.


Give this entry an award


Ratings (show detail)

Overall: 2.9
Fun: 1.9
Production: 3.6
Innovation: 3.1

18% respondents marked the game as not working.
Respondents: 9


File Uploader Date
A debug render to see what is going on visually
DR0ID 2023/04/02 10:24
DR0ID 2023/04/02 10:00

Diary Entries

pw35 - a week of struggling

Day 1
Theme was announced, but had no idea what to make. I remembered to have read something about sweep algorithm to generate shadows.
Here some links:

Day 2
Starting to implement some infrastructure like scene management.
Found some resource about how the shadows can be generated. Made an implementation that worked fine with single segments.

Day 3
Found out that the implementation I had to generate the shadows had a n**2 runtime complexity and could not handle segment points on the same coordinates (which one typically has if describing a polygon by single segments). So back to field one.

Day 4
Struggling all day to implement the the sweep algorithm.

Day 5
Finally found out that I could sweep twice to setup the initial conditions. After that I had to capture all the special cases that could occur too. Took me all the time I had this day. But finally I had an implementation that was fast and could handle double points correctly.

Day 6
Implement the light effect, player steering. Also a view bounding box for the sweep algorithm. To remove visual glitches I had to split all segments that intersect the view bounding box and the box edges as well.

Day 7
Struggling to design the cove and with collision detection once again. Its not perfect but works most of the time. At the end I implemented a simple point and click capturing to generate the segments data. Polishing a bit.

Its not quite a game because there is no win nor a loose condition. So at the end its more like tech demo about lighting/shadows. After all I had fun and learned about all the details of the sweep algorithm.

Add a comment