xjermx Posted July 16, 2010 Share Posted July 16, 2010 I'm learning PHP as I build an application based on a game I used to play. I will need a hex style map, complete with forests and mountains and rivers and all of that fun stuff. I'm looking for suggestions for how YOU would recommend going about this. I'm talking in terms of table structure, and generation of the map. I started to generate it all myself, with a regions table and a region_types table. A PKey for the region, along with an x_coord, a y_coord, and a terrainbit, to correspond with the terrain types in the terrain_type table. Each region would have six possible exits, which would be determined by running a bit of math against the region table to determine which regions were adjacent. But that sounds like a lot of work, doing it all by hand. A friend recommended coding an API to build the map, and going form hex to hex, "moving" through them, generating their neighbor hexes as I go. I'm hoping for general strategies here, or "This is the way I would do it". Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/207970-suggestions-for-creating-a-hex-map/ Share on other sites More sharing options...
xjermx Posted July 24, 2010 Author Share Posted July 24, 2010 Bump. I'm still looking for some help on hex map stuff. I've created an API that does some procedural generation of 'provinces'(hexes). I've also hacked away at some code I found on the internet that generates hex maps. But I'm still trying to find somewhere in the middle to meet. This is pointed toward creating a game of sorts, based on old Atlantis PBEM gaming. Anyone interested in throwing a bone? Quote Link to comment https://forums.phpfreaks.com/topic/207970-suggestions-for-creating-a-hex-map/#findComment-1090502 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.