Skip to content

Conversation

@pceDev16
Copy link

This adds a new SGX Example to the HuCC repository that shows users how to use the 2 VDC's on the SGX to do subpixel scrolling.

This adds a new Example to the HuCC repository that shows users how to use the 2 VDC's on the SGX to do subpixel scrolling.
@pceDev16 pceDev16 requested a review from jbrandwood April 27, 2025 17:36
@Ryusennin
Copy link

Ryusennin commented Aug 3, 2025

Thank you for this example; subpixels are very useful for smooth coordinate and jump/gravity computation. Maybe this tutorial could be extended to explain how to use subpixels for the decimal part only (and keep full pixels for the integer part). It seems many platform games like Sonic work that way.

[Edit]

Come to think of it, real fixed point math would require a proper library, which is probably way outside the scope of this tutorial. Some references:

https://github.com/ElectricRCAircraftGuy/fixed_point_math
https://github.com/PetteriAimonen/libfixmath

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants