Thursday, September 12, 2024

CAGD 495 Sprint 1

For this semester, I’ve been assigned to a special project making a training tool for the United States Geological Survey that models how earthquakes could affect San Francisco. A different team worked on the project for nine months and then passed the torch to our team to complete it.


Here’s what we’re starting with. This project is totally unlike anything I’ve ever had to work on before, and this first sprint was extremely challenging. The first hurdle we faced was having to do lots and lots of reading through scripting and documentation to understand how the project had been assembled. Especially since the old team suddenly and unexpectedly lost their funding halfway through development, one can imagine how organized a project is left under those conditions. Nevertheless, it’s a really impressive system they’ve set up.


One strategy I initially tried to employ when going through the game scripts to try to find what I was looking for was having my own note document where I could write summaries of the scripts, map connections between them, and mark which one’s I’d looked at and which ones I hadn’t yet. While this somewhat helped me understand the codebase, it was rather time inefficient.


The most important move I ended up making was that when I setup a new install of Unity and Visual studio to work from my laptop instead of my desktop, it came with an updated package that lets me click on an implementation of a class or struct in the code and find its definition and references. This was something I’d never had to think about before—since in all the projects I’d made before I never had an issue finding my definitions—but it was vital to working effectively in somebody else’s project.



Ultimately, learning to use this feature was the most important thing I learned, and after a lot of hard work, I managed to get my first assigned feature implemented! I modified the existing code to display a building’s details when clicked on to additionally show how many people are in the building. First, I needed to add a reference to the RuntimeNavigationNetwork which contains a dictionary called TileNodes that lets me input the clicked-on tile and output an AI node. Not shown in the image, but I also had to add the RuntimeNavigationNetwork as a library so that I could reference the TransportNode data class for the nodes. Then, I feed that to the AIMapData’s PeopleNumDic dictionary to find how many people are at the selected node. Finally, I return that back to the UI display, which displays the number of people in the building.


I’m somewhat disappointed in myself that this is all I have for tangible progress, but I hope that the description of the process shows just how much work went into it. The majority of the battle was trying to figure out where all this data was stored in the codebase, and then figuring out how to link up those wildly different systems.  and with this first step up the mountain, we’ve got some momentum going forwards.


Featured Post

ProcGen FPS Update -- 8/28/2024

  The level is procedurally generated each time the program is run.