Skip to content

Add karl2d support#2

Open
uvd540 wants to merge 5 commits intoatomicptr:masterfrom
uvd540:karl2d_support
Open

Add karl2d support#2
uvd540 wants to merge 5 commits intoatomicptr:masterfrom
uvd540:karl2d_support

Conversation

@uvd540
Copy link
Copy Markdown

@uvd540 uvd540 commented Apr 16, 2026

Add support for the karl2d library

Copy link
Copy Markdown
Owner

@atomicptr atomicptr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the text supposed to look like this?

Image

We should probably also note the karl2d support in the README

Comment thread anima/anima_karl2d/karl2d.odin Outdated
@@ -0,0 +1,41 @@
package anima_raylib
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be anima_karl2d right? :)

package anima_raylib

import ".."
import k2 "../../../karl2d"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gives me a bit of head scratching because this forces us to have karl2d beside anima in the file tree but I'm also not sure if there even is a better solution 🤔

A super random idea would be:

import k2 "karl2d:."

and then when building you can pick the path yourself using

$ odin run . -collection:karl2d="../../../karl2d"

Do you have another idea? I'm not yet sure if this is a good idea, but I'd prefer if we don't have to hardcode the path (even though this seems like a very sensible standard)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, unfortunately I can't think of a clean way to do this for a non-vendored library. I like your idea as well instead of needing karl2d in the parent directory. Either way will require some explanation in the README. I will defer to your preference.

@atomicptr
Copy link
Copy Markdown
Owner

Thanks for the pull request, looks very good overall :)!

@uvd540
Copy link
Copy Markdown
Author

uvd540 commented Apr 17, 2026

Is the text supposed to look like this?

Yes, karl2d currently has a bug that causes blurry text with a zoomed camera. I had tried to keep the commands mapped 1:1 with the raylib example, but I think I agree that it's better to render a cleaner example. I can make the change to not include text in the camera view, along with the package deceleration correction.

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