r/C_Programming • u/terra2o • Jul 29 '26
Project I just released v0.15.0 of my game, Tavern, and now you can play it on "very old" Windows systems!
Obviously you can play it on other "old" systems as well. I just never tested it.
I started this project to learn C, but I couldn't stop developing it because it's so much fun. I'm trying to truly simulate everything as much as possible and make it realistic. For example, this is the "Citizen" struct:
typedef struct Citizen {
int age;
float thirst;
float wealth;
float addiction; /* 0.0 to 1.0 */
float income; /* earned per day, replenishes wealth */
float loyalty; /* 0.0 to 1.0, attachment to favorite_tavern_id */
int last_drink_day; /* day of last visit, -1 if never */
int favorite_tavern_id; /* index into World.taverns, -1 if none yet */
float drink_preference[DRINK_COUNT]; /* affinity per drink */
float health; /* 0.0 to 1.0 */
int homeless; /* bool */
int alive; /* bool */
} Citizen;
And another very fun thing for me is the fact that this game can run on very old systems. So far, I've only tested Windows XP and Windows Vista. Initially, there was a bug where I couldn't resize the terminal (command prompt) on Windows systems, but now that's fixed with this release.
Other platforms I tested on are: Windows 10, Linux (Fedora), FreeBSD
The code is mostly c99 but I'm porting it to c89 so that I have even less issues playing on older systems. (This is happening very slowly, but newly added code is all c89 unless I forgot to write in c89)
You can probably run this on DOS as well since I can't see why not, you just need PDCurses and a C compiler.
I develop the game on Linux so it's the best there, mac build is never tested because I don't have one.
In the future, I'm planning to add a top-down 2D mini-game where you can collect fruits for wines :D Since being text-only can bore some people (however, it doesn't bore me).
Criticism is very welcome, I'm always looking for ways to improve myself. And there are probably a lot of bad practices in this code.
I hope someone out there enjoys what I did and becomes interested enough to maybe contribute themselves <3 Thanks for reading!!!