Side-Project: Ancient Chinese Civil Service Exam Simulator v0.1

This is the first thing I’ve ever coded that could fairly be described as a ‘game’, even though it’s an incredibly short and simple one.

The player rolls up a character who is assigned a set of attributes and a semi-random Chinese name. Off they trot to take the provincial exams, which are taken over the course of three days, with increasingly high attribute requirements to stay in the competition each day (the actual number for fulfilling this is a composite of the attributes themselves, a bonus based on number of times the exams have been attempted and a small random bonus). At the end of three days, if the character has passed all three tests, they are assigned a rank and title and go home to glory.

If the character fails at any stage, they go home in disgrace. Based on their family background, they then have a certain number of additional attempts (each one, as mentioned, gives a bonus to passing the games next time).  Fail enough times and they live out their days toiling in the fields as a peasant.

Game Design

Something that struck me after playing a couple of times is that I need to make it WAY harder to win than my first attempt. The random element is important! Also, right now the player doesn't really have much to do except for rerolling their stats so there's not much game there. 

It’s moderately fun to play around with a couple of times, but to improve it for the next iteration I would like to add:

·         More events

·         More randomness

·         More sophisticated outcomes

·         Different levels of examinations

·         More player agency – do you cheat? Do you try to make friends with the other students?

·         Actual characters.

·         Possibly skills.

·         Descriptive text for attributes.

A couple of quick key learnings not mentioned before: I feel I’m compiling my code regularly enough. Every time I tried to do a new category of thing, I recompiled my code. Keeping iterations fast did, I think, help to keep time costs down overall. Testing concepts before adding content also worked. Example: I made sure that you could get to the end of the game and test all the stats based on just one of the stats before adding other stats in. This definitely saved me time updating things, but it could have been done better. Finally, I'd like to do more with custom functions. I’m barely using these. For the next iteration I think I could be doing a lot of the basic architecture a lot smarter.  

Questions to myself to solve later: What have other people done to build CYOAs, text adventure games and so on? How much of that can I learn from? What are the redlines - obviously you can't copy code directly but general approaches shouldn't be subject to any meaningful IP protections.

Comments

Popular posts from this blog

Week 5 - Lab (Inheritance) Done

Tideman. Tideman! (pounds desk) TIDEMAN! (Cs50x 2021 weeks 2 and 3)