Skip to content

Hexagon #2695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: development
Choose a base branch
from
Open

Hexagon #2695

wants to merge 7 commits into from

Conversation

benjamin-kirkbride
Copy link
Collaborator

  _____
 /     \
/       \
\       /
 \_____/

@einarf
Copy link
Member

einarf commented May 20, 2025

Let's not re-format all the test 😄

@DragonMoffon
Copy link
Collaborator

maybe also somewhere in the documentation reference https://www.redblobgames.com/grids/hexagons/? As its a really good primer on a lot of the hex logic that's being used here esp around the coordinate spaces

@DragonMoffon
Copy link
Collaborator

I'm also confused why this PR seems to include a bunch of work on the platformer tutorial. Is it just a merge issue or are there two PRs accidentally stuck together?

@benjamin-kirkbride
Copy link
Collaborator Author

Sorry about the formatting stuff, I was rushing to get this done before leaving PyCon.

I'll remove that stuff

@benjamin-kirkbride
Copy link
Collaborator Author

maybe also somewhere in the documentation reference https://www.redblobgames.com/grids/hexagons/? As its a really good primer on a lot of the hex logic that's being used here esp around the coordinate spaces

All of what I did was based on that, so this is a good idea if someone wants to pick that up and do it

@benjamin-kirkbride
Copy link
Collaborator Author

Okay @einarf @DragonMoffon we should be good now. Sorry about the mess lol

@DragonMoffon
Copy link
Collaborator

Reviewing this again I realized that this isn't really a hexagon shape? I still think the cube coordinate helpers are useful, but we should also make a Hexagon shape that matches with Rect (and maybe other shapes like circle etc). I've talked to Digi and they are working on a Shape protocol so we can leave this PR as just the hex coordinate stuff. We may need to play with naming, but that can be done later imo.

@benjamin-kirkbride
Copy link
Collaborator Author

Yeah this is for supporting hexagon tile maps. Sorry, could have made that clear

@DigiDuncan
Copy link
Collaborator

Yeah this is for supporting hexagon tile maps. Sorry, could have made that clear

I think what I'm building now will support this endeavor, so no harm no foul! Glad you did this work, I think it's good for the library, I'm only worried about naming stuff.

@benjamin-kirkbride
Copy link
Collaborator Author

Maybe my object should be HexTile or something?

@DigiDuncan
Copy link
Collaborator

Maybe my object should be HexTile or something?

If that's a compromise you're willing to make, I like that.

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.

4 participants