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.
Ratings (show detail)
A debug render to see what is going on visually
pw35 - a week of struggling
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:
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.
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.
Struggling all day to implement the the sweep algorithm.
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.
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.
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.