I'm a graphic/web designer with some front-end web development experience. I've always been interested in game design but never really knew where to start, or didn't think I was a good enough programmer to get anywhere. But I've been coding a lot more Javascript/jQuery this past year or so, and that experience has inspired me to go ahead and jump in with an idea I've been kicking around for a while.
The game is a political Strategy/RPG (roughly in the vein of Paradox's Clausewitz stuff). I won't go into too many details, but the backbone of the game is a simple simulation of a population of citizens (somewhat similar to the "pops" in Victoria II). The player indirectly affects the population's well-being by enacting political reforms that tug on some RNG modifiers.
For my first sort of proof-of-concept prototype, I've started by simulating the life of a single citizen. The math is a little oversimplified and not finely tuned yet, but already it achieves some pretty plausible results!
The simulation is here: http://dannymcgee.net/games/epluribusunum/p1.html (Instructions: Pretty self-explanatory, but the End Turn button advances time by 1 year. RealTime just auto-advances 1 year every second.)
And the source code is here: http://dannymcgee.net/games/epluribusunum/game.js
First, I'd love to get a general sort of critique of my code. I've read a few articles about OOP in Javascript, but I'm probably missing some opportunities for optimization or better organization, and my math is pretty sketchy.
Secondly, I'm not really clear on how to expand from here. The next logical step—I think—would be to scale up the number of citizens. For the sake of simplicity, let's say the sim starts with 12 citizens. When one dies, a new one is "born" to replace it. However, I haven't the foggiest idea how to implement something like that. Can anyone nudge me in the right direction? Linking to an article or video that covers what I would need to know would be a totally acceptable answer. I'm just not even sure what to search for.
Thanks!