Mars Trail: a text adventure!
Github
Stored neatly on github
Project Description
I was interested in pivoting to a software dev position at my current company, and they write everything in C. This project is a simple text adventure to pick back up some C syntax and use a couple other techniques too.
Post-Mortem
- pointers are good; use them frequently
- limit scope as tight as possible and just make that work, don’t make 18 events before the basic game works
- similarly: don’t optimize too early. JUST MAKE IT WORK
- clarity for yourself and other programmers is huge:
- heavily employ conventions where possible, like build.sh or Makefiles and standard file structures like images/ directories
- make data as simple as possible, and collected in one place
- clean naming conventions are huge
- XXXX_delta for EVERYTHING
- take advantage that C initializes values to zero
- i can afford to have lots of object attributes if most of them will be zero anyways
- separate data from actions
- i had individual outcome functions that applied a number to a
- getting an outside set of eyes can improve things a lot
- restructuring outcome fns → outcome data
- figuring out a bug i had with input parsing (using 2 getchar’s)