Skip to content

Add new camera FixedView2dTopLeft and add a 2D ray casting example using it.#354

Merged
sebcrozet merged 6 commits intodimforge:masterfrom
CM-IV:master
Apr 2, 2026
Merged

Add new camera FixedView2dTopLeft and add a 2D ray casting example using it.#354
sebcrozet merged 6 commits intodimforge:masterfrom
CM-IV:master

Conversation

@CM-IV
Copy link
Copy Markdown
Contributor

@CM-IV CM-IV commented Jan 11, 2026

This PR adds a new 2D camera FixedView2dTopLeft that implements the Camera2d trait. It makes some assumptions though, see the docs in the code for that.

This PR also adds a 2D Ray Casting demo ported over from C Raylib using the DDA Algorithm. You can use it to implement rendering systems like the old Wolfenstein games.

Screencast_20260111_123523.webm

@sebcrozet
Copy link
Copy Markdown
Member

That looks good, thank you! I modified the approach to make the FixedView2d camera configurable instead of needing a separate FixedView2dTopLeft struct.

@sebcrozet sebcrozet merged commit 11da935 into dimforge:master Apr 2, 2026
5 checks passed
@sebcrozet sebcrozet mentioned this pull request Apr 2, 2026
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.

2 participants