arcade icon indicating copy to clipboard operation
arcade copied to clipboard

Hexagon

Open benjamin-kirkbride opened this issue 7 months ago • 11 comments

  _____
 /     \
/       \
\       /
 \_____/

benjamin-kirkbride avatar May 20 '25 20:05 benjamin-kirkbride

Let's not re-format all the test 😄

einarf avatar May 20 '25 22:05 einarf

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 avatar May 24 '25 00:05 DragonMoffon

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?

DragonMoffon avatar May 24 '25 00:05 DragonMoffon

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

I'll remove that stuff

benjamin-kirkbride avatar May 25 '25 17:05 benjamin-kirkbride

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 avatar May 25 '25 17:05 benjamin-kirkbride

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

benjamin-kirkbride avatar May 25 '25 17:05 benjamin-kirkbride

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.

DragonMoffon avatar May 31 '25 02:05 DragonMoffon

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

benjamin-kirkbride avatar May 31 '25 02:05 benjamin-kirkbride

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.

DigiDuncan avatar May 31 '25 03:05 DigiDuncan

Maybe my object should be HexTile or something?

benjamin-kirkbride avatar May 31 '25 15:05 benjamin-kirkbride

Maybe my object should be HexTile or something?

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

DigiDuncan avatar Jun 01 '25 18:06 DigiDuncan