New challenge: Keeping track of my own code

Posted on August 11, 2012 | 2 minute read

As I’m learning JavaScript I notice that the challenges I’m facing have shifted through stages that look something like this:

  1. What the heck is the syntax for this?_ (“How do I make it move?")_

  2. How do I code this one feature/logic challenges. (“How do I make them move in unison?")

  3. How do I make it run well/optimisation challenges_ (“What’s killing my fps?")_

  4. Math challenges. (“How do I make this entity follow this rotating entity as its angle changes?")

  5. Overall organization and structure of the entire project and entity relationships. (“WTF IS GOING ON I DO NOT REMEMBER THIS”)

Of course I face issues in all four of those stages, but right now my biggest issue seems to be keeping track of this thing as a whole and deciding what is best put where. Because the entities in this project are so reliant on each other (and on timers!), one action is usually relevant to at least two different entities.

Don’t get me wrong, it’s not like I just put crap in willy-nilly. I think about where things go and have from the beginning. For a while it was fine, but now it does feel like it’s getting too bloated. So bloated that even I’m forgetting some of the interdependencies I have going on. If I could just make some sort of diagram for myself that I can continuously update with the different relationships between entities and other elements in the code. I remember learning about ER diagrams and data flow diagrams in year 11/12 Information Systems, but not sure if either of those is appropriate for what I need (and if so, which). Or is it a case of “If you’re getting confused by your own code it must be too messy”? Do people¬†usually forget how things relate to each other in their own code once it grows, even if it’s not actually all over the place and effort has been put into keeping it tidy, or is it just me?




Categories:game dev dev games
comments powered by Disqus