gly-engine / gly-engine/core-native-gba
line clipping to avoid screen overflow
- Dominant language
- C
- Stars
- 13
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
**loops and float points are expensive**, and I don't have enough geometry knowledge to do this without copying and pasting something ready, it would be interesting to have a method that wasn't so precise but was as fast as possible for the GBA's CPU.
* function `geoclip_line` in `src/geoclip.c`
https://github.com/gamelly/core-native-gba/blob/026a74e0c6efa5e6c231d1dbf7e3c0d96be5a236/src/geoclip.c#L42-L54
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with geoclip_line in src/geoclip.c and inspect the linked implementation. Determine an approximate clipping approach that avoids loops and floating-point work while keeping lines within the GBA screen bounds. Done means the function clips overflowing lines and is suitable for the GBA CPU.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- game-dev, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100