Jump to content



Recommended Posts

HexPixiJs is a very simple library (if you can even call it that) for hex grid based games. As the name suggests it is written on top of PixiJs. I'm not sure what my future plans are for this code are yet. If you are a game developer that is trying to make a hex grid based game this this code may be useful to you.







Link to comment
Share on other sites


Awesome! This can save others a lot of time on hex grid.


Have you considered using the hexagon tileset from Kenney (http://opengameart.o...tiles-buildings) for a little bit more visually appealing?


Thanks! Hexpixi would need some modifications to show a stack-able tileset correctly. After I'm finished  with the map editor demo I'll see if I can get that tileset working. No promises. :)

Link to comment
Share on other sites

Updated github repo and demo site with new code that makes it possible to create hexagons with a custom width and height. The old code would force a uniform sized hexagon based on a perfect circle. The new code calculates cell position and the hexagon's poly shape from an ellipse.


This update also includes some refactoring and simplification, hopefully making it easier to understand and use. As the library develops I will continue to whittle away at bad patterns and redundancy.



Link to comment
Share on other sites

Good momentum going on this right now resulting in another update. This time I've added partial support for Kenney's tileset and any other tileset using a similar art system. The update does not have the stackable functionality yet (allowing for tall buildings made of multiple images stacked). It wouldn't be hard to add but is a little time consuming for the map editor UI since it would introduce tile layers. Soon though.




Also started versioning the library. This update puts the version at 0.25 (alpha).

Link to comment
Share on other sites

Updated to version 0.26.


- Removed jquery dependency from hexpixi.js

- Remove jquery dependency for simple demos

- Removed bootstrap dependency for simple demos

- Added basic support for using the asset loader


There are two new demo pages that are bare-bones and do not require anything but pixijs and hexpixijs.



Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 3 weeks later...

Released version 0.40 which adds some basic import and export map functionality. The demo page stringifies the map data to a text control, which you then have to copy and paste somewhere to save it. Later you paste that text back into a text control to import the map. You'll see on the demo page if you want. Gotta go because my annoying cat won't stop pestering me.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...