isometric hex grid?
monkeygoat

Hello, 

Just purchased and have been playing around with the isometric plugin. I am looking at extracting the fallout 2 sprites and playing around with a personal project. Fallout 2 uses a hexagonal grid for movement and I was curious if there was any way to support this. I didn't see anything obvious in the API so I assume it would not out of the box. If you have any pointers on how I could go about adding this support I'd love to hear it!

 

All 4 Comments
Gio

Hi

 

You are right, it isn't supported out of the box. It is something that we do want to support at some point, but it is a fairly big change.

 

There are several aspects that you would need to change to make it work:

 

  1. In the isometric plugin, in terrainBehavior.js, there are functions to convert from world coordinates to grid coordinates and viceversa. This will need to take into account the position and shape of hex cells, and it's slightly tricky - there is a pretty good explanation of the maths here and here. This is probably the most difficult bit. When you change these, I think the positioning of the hex tiles by the iso plugin should just work automatically.
  2. In iso.js, there is a main loop function that updates the grid position for moving objects. This will need to be changed and is fairly simple once you've completed step 1. You could also ignore the existing code that checks for floating-point errors when moving diagonally - it no longer applies when moving on a hex grid, so it's  actually simpler :)
  3. Pathfinding. There is a function called findPath. This defines an array of "neighbors" for each cell, and that's the only bit that needs changing. Bear in mind that this list, however, may be different depending on whether you are on an even or an odd row of your hex grid.

All in all, it isn't too difficult, but I wouldn't say it is easy either and to be honest I would only attempt this when you are really quite familiar with how the iso plugin work (maybe after making a simple game or two with square cells).

 

Like I said, it's something we would like to look into at some point. Unfortunately it's fairly low priority at the moment, as we need to finish the visual editors for wade and wade.iso first :)

monkeygoat

wow thanks for the detailed & quick response! Yeah I've been reading up on how other engines do it *just* incase :>. I'll stick with the grid for now and see if i can get it to work as-is. Thanks again!

Adrian Browne

I have been develping a 2D game with hexagon tiles with Wade 3.0 and would like to move to isometric. Since it is now 2 years + since this last post, I was hoping that you have now made isometric hexagonal tiles available? Hopeful....

foxcode

I'm sorry to disappoint you, but as of today, wade still does not support hexagonal tiles. As far as I'm aware we do not have plans to implement this. It's possible that it might be looked at after WADE 4 but I can't promise that.

I think if you want to have a hexagonal isometric grid, you would have to implement it yourself. I dont think it woudl be too complicated, however it would be a lot of work.

Post a reply
Add Attachment
Submit Reply
Login to Reply