You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

1h 8m 47s logged

Sometimes, the most productive thing you can do is destroying everything for a clean slate.

So that’s what I did and refactored my codebase, painting my GitHub red. The old city generation code ended up becoming messy spaghetti code that made it difficult to debug and work on it. And that sort of legacy code when I look back in a month is what ends up shelving projects for years on end. This half an hour will save me many in the future.

I also removed the cluster expansion method of building expansion completely as it created annoying expansions that didn’t make sense of everything being 1 square off a road.

Also created a GameManager and moved aspects of GridManager and FinanceManager to the new script, to try and centralise the logic and stop having random bits such as the day manager in the FinanceMananger, which didn’t make an sense.

Also yes, I wasted 20 minutes trying to figure out what was going wrong when I forgot to add GameManager.cs to the scene 💔

1
25

Comments 0

No comments yet. Be the first!