Hex World Creator/ Hex of Life
by Raymond Pederson
A world builder (written in C++ / GLUT / OpenGL) involving textures, reading in DDS files, interpreting mouse clicks, multiple lighting effects, with user ability to save/load files, and the use of Hexagons of course.
In addition, a small simulation called the "Hex of Life" can be ran which user timer functionality, multiple lighting effects, and use of my HexData/HexArray Structure.
Features (World Creator)
- Putting in custom textures of the DDS format. (the DDS file must have premade mip maps!!!)
- Put/remove textures into hexagon locations using mouse clicks (drag mouse to put in multiples of same texture)
- Mouse clicks converted into hexagons positions; even when the camera moves
- Move the camera multiple directions at once (buffered camera movement)
- Light effect over each hexagon (directional in world builder/ point light in Hex of Life)
- Save and Load files using .txt files
- Build HexData and HexArray structure to be used in creating games
Features (Hex of Life)
- Shows a simulation used with hexagon creator
- Shows Conway's Game of Life with hexagons
- Alpha: lighting effect which dims and then brightens between each phase
- Can load in different maps to see the simulation happen differently
Pictures of Hexagon Creator:
Hello World (for hexagon creator)!
Beginnings of Settlers of Catan map (tundra = desert).
Pictures of Hex of Life:
After 1 movement.
After a few moves/
- Hex Games - Excellent source of hex based algorithms (making them and making bouding boxes for hexes)
- Open GL tutorial- Textures - Superb resource on how to read in DDS files/ understanding UV coordinates (algorithm I used almost identical to the example given- so credit of DDS loader give to the creato of this website)
- Polygon Outlines - Used as a minor reference in making the hex outlines.
- How to make DDS - How I made DDS files.
- Buffer movement - Main ideal of how to do buffered movements.
- Hex of Life - Used as a reference to basic algorithm of "Hex of Life" simulation (yet I altered it slightly).
Warning: code is not at all guaranteed to be clean, makes only work for linux machines.