> Was it just hazing, or was the thought that someone might actually be able to accomplish this?
Actually no. Most devs that just got started familarizing themselves with the codebase wanted to refactor the file and came up with the idea themselves. Usually they thought this is a crappy file and this must be an easy task to do because they saw all the nested if/elseif/else statements in the code.
The problem, architecture-wise, was that the road logic was the glue code that integrated a lot of different parts, layers, and NPC behaviours from the rest of the codebase as it was changing the surrounding game world.
If there was a hospital placed with a non-squared ground tile next to it, if it was placed with a 1 offset (roads were 3x3 tiles), if it was placed with a 2 offset next to another road... It went as far as influencing the path heatmap that was necessary for the A* guessing algorithm to make the NPCs walk correctly on the sidewalks. The permutations of possible sidewalks alone were enough complexity on their own...
So in a lot of ways necessary features that historically had no place in the Entity/Component based engine at some point made it in there.
The next best thing (and also spaghetti code) was the Cursor Entity, which had to have line tracing algorithms to be able to select things that are visible under a donut-like shape when the user was hovering the hole, or say, a tree in the game world. Convex and Concave shapes were integrated, and lots of edge cases in there, too, which are actually huge mathematical problems in terms of available performance once you dig more into it, so we ended up with binary height map sprites that helped both the slicing and the cursor at some point.
The important lessons learned from the road logic were very valueable for newbies, as it was teaching the practical problems of isometric game worlds.
So afterwards everyone was able to grasp why the complexity was added, and what was necessary to remove it (in the sprints in the future).
At some point we decided a couple of things because of the road logic and cursor entity for new iterations of the engine, like:
- always use a 1x1 road tile
- always use square based tiles for all objects
- dont make sidewalks, use just road tiles
- dont make trees with holes in their leaves
- dont make trees higher than the buildings
- no artist can ever request crosswalks. Never ever.
...etc