## Hogs of War: Level Editor #### Ashley Smith
This presentation can be viewed at:
## Design and usage ![Heightmap preview](https://imgur.com/wlK072x.png)
The editor is comprised of multiple, toggleable windows with different purposes. Each tool opens its own set of windows to aid the user.
### Objectives * View the map with various methods and textures * Change the shape and appearance of the map * Export relevant map data for use in-game ### Key features * 3 Tools using an adjustable brush * Sculpt: Raise or lower the map in an area * Select: Precisely select and edit the map * Paint: Change where textures are applied * Preview textures and apply them at runtime ### Sculpting tool
The *sculpt* tool can be used to raise and lower vertices in an adjustable brush. Holding the `Shift` key keeps the tool in place to avoid accidentally altering the heightmap.
### Selection tool
The *selection* tool separates the selection of vertices from their modifications. Once a selection has been made, the tool can be used to modify all selected vertices at once.
### Various map visual modes
The map can be rendered using a single texture in *standard mode* or by using multiple in *enhanced mode*. The splatmaps used in enhanced mode can also be viewed.
### Texture painting tool
The splatmaps used in *enhanced rendering* can be edited with the *paint* tool. Textures in the *map properties* panel can be clicked to quickly configure the tool to apply it to the map.
## Target audience This editor has been made for the sole purpose of aiding the *Hogs of War* development team in the creation of maps for their game. It is speculated that this editor may also be released to the community when it's feature-complete. With this in mind, it was important for non-programmers to intuitively interact with the editor. Having information, settings and functionality in separate windows as opposed to hiding behind menu entries is a step towards this goal. ### Cross-platform The *Hogs of War* level editor is built with **[CMake](https://cmake.org/)** so that the files necessary for compilation on any operating system can be generated. The editor can therefore be built and ran on Windows, MacOS and Linux (Linux and Windows tested and up-to-date), alleviating some restrictions of usage. ## Workflow ### Tools and technologies * Development: [C++](https://isocpp.org/) compiled with [CMake](https://cmake.org/) * Graphics: * [OpenGL](https://www.opengl.org/): Graphics rendering * [Glad](https://glad.dav1d.de/): GL Loader * [GLM](https://glm.g-truc.net/0.9.8/index.html): Math library * Editor features: * [GLFW](https://www.glfw.org/): Window creation * [ImGui](https://github.com/ocornut/imgui): Editor interface * [LodePNG](https://lodev.org/lodepng/): Texture saving and loading * [TinyFileDialogs](https://sourceforge.net/projects/tinyfiledialogs/): File picker ### Project management * **[Hacknplan](https://hacknplan.com/):** * Agile task management with SCRUM * Weekly scrums with the developer team * **[Git + GitHub](https://github.com/):** * Code repository and source control * Weekly snapshots of Windows builds * Informal 'todo' list and sprint changelog ### Story point allocation
Points logged, 0, 25, 53, 84, 108, 127, 146, 180 Closed, 0, 24, 38, 85, 98, 117, 136, 173 Open, 134, 110, 124, 100, 81, 99, 78, 54 Total points estimated, 134, 134, 162, 185, 179, 216, 214, 227
Points were logged at the start of each sprint. This chart shows how the amount of work increased as the project was realised. Most remaining tasks are extensions for future work.
### Project evolution ![Roadmap changes](https://i.imgur.com/TYfwX5R.png)
Feedback was gathered each sprint and our visions of the end product converged over time. Initially, I wasn't aware how much emphasis should be placed on texture painting.
## Evaluation While this editor does not contain the ability to change the spawn locations of objects and characters, it can change the shape and appearance of map. I believe that the pool of provided tools in conjunction with the configurable brushes make this editor a suitable improvement to the tools available and will be effective for creating various maps for use in *Hogs of War*. There are things left to be done, such as the placement of object spawns. This project doesn't really end at the hand in and I'm dedicated to ensuring this project benefits the *Hogs of War* team. However, for the final hand in, this editor **will** be capable of creating a brand new map from scratch with current tooling. ### Reflection * **Most challenging sprint:** * Reading legacy code and understanding the thought processes behind the data format * **What would I do differently?:** * Simplify the relationship between the `Map` and `Heightmap` classes for future programmers * **How would I make this more effective?:** * Create a wiki on [GitHub](https://github.com/) in advance in preparation for going open-source to help users