Nuke ‘Em

Strategy games have been a real albatross around my neck, partly because they push the right buttons in my head that make me obsessively play them until I win, and when I win, it’s too boring and I have to play again at another difficulty level or play another game.  The latest incarnation of this is Catan HD on the iPad, which is a version of the insanely popular German board game Settlers of Catan.  I would love to play that game, but it involves getting together three or four people, so forget it.  (Unless you’re in the Bay Area and want to play.  I would even host games at my house, but nobody’s going to come to West Oakland to play a board game, even if I FedEx over kevlar vests and free gas cards.)  I have wasted a small amount of effort on Catan so far, and it kicks my ass every single time.  I am sure I will spend hours of my precious time trying to google out some strategies and beat the thing, and I am sure once I figure out the secret, I will get bored of it and consider it a waste of five dollars.

But a bigger obsession is trying to write one of these games.  And that all started when I was a freshman in college.  My friend and later roommate Kirk Sluder started a game called Nuke ‘Em on the VAX computers.  It was done entirely by email, and basically, you emailed in your changes, and then Kirk tabulated all of the stuff and emailed back updates.

From what I remember, the rules were something like this:

  1. A player started with X factories (I think it was 4 or 5)
  2. A factory could create a nuke, an ABM, or 25% of a new factory per turn.
  3. In a given turn, you could state your new production and/or decide to nuke another player.  You could also email in some pithy commentary about how you were going to kick everyone’s asses and it would go into the email that was sent out with the turn’s results.
  4. When you nuked someone, each ABM would cancel out one nuke.  I don’t remember if it took just one nuke or four to knock out a factory.  When all of the factories were gone, you were done.  (And now that I think about it, Kirk may have called them cities and not factories.)
  5. There may have been some rules about collusion or inter-country trading, but I don’t remember.

So that was the basic deal.  It was a very low-tech game, and I think we only played one of two rounds before the whole thing got sidetracked by the usual college concerns of getting laid, getting drunk, and occasionally going to classes.  There was also a much more popular and immersive game called Monster that a few people brought over to the VAX – it was sort of a precursor to what later became MUDs, and wasted a lot more time, but offered more immediate gratification.

(I don’t entirely remember how the Nuke ‘Em game went, except everyone else got immediately involved in these skirmishes, while I just stayed isolationist and stockpiled a shit-ton of ABMs.)

Anyway, I think Kirk piddled around for a bit trying to write a more mechanized version of the game in VAX BASIC.  And the next year, when I started learning Pascal, that was my first major goal: to write this entirely automated version of the game, where you logged in and made your changes in some form, and then maybe saw a map or some tally of what was going down.  This was long before the days of the web, like in the fall of 1990, so everything was VAX-based.  This was the first time I really started screwing with the Starlet libraries on the VAX, which were these awesome runtime libraries for doing all kinds of crazy stuff, like drawing menus on the screen.  There were header files (or whatever the hell Pascal used) for every VAX language, so you could use them in Fortran or COBOL or whatever you used.  So I clunked away on that for a long time, but didn’t get anywhere, and gave it up.

I think there have been at least four or five times I have tried to reinvent this game.  I have a bunch of C source code I was apparently working on in the summer of 99, along with some decent notes on the thing.  It was web-based, and had a bunch of CGI pages that were C binaries, which is about the least portable way of doing things. I should probably try to recompile this crap and see if it works, but ten-year-old source code written for linux has a way of not working because every other week, someone decides on making their own free curses library the standard or whatever the hell.  Looking at the code I have, it uses ndbm for its database, and a slightly more complicated system of different terrains on a map, and I wasted a lot of time writing my own libraries to do crap like parse URLs for arguments.  But I didn’t get much working, and gave it up quick.  (Given the timing of this, it was probably an attempt at making something I could use as a sample for finding a job, although at the time, Silicon Alley was giving HTML production jobs to anyone with a pulse.  Except me, of course.)

I also have notes from a 2004 attempt at the same thing, but no source code.  And in 1998, I did an end-run on the whole thing and spent a few all-nighters trying to write a framework for simulator/strategy type games where someone could use that and write a game like Nuke ‘Em in some convoluted scripting language.  The C++ code I have for this is absolutely horrid and does nothing.

And in 2008, when I was trying to learn Ruby on Rails, I started this new version of the game, although it was much more involved.  It was map-based, and the map had little squares with technology levels. Just for kicks, I’ll paste the rules at the end of this post.

Anyway, there is a part of me that really wants to fire up eclipse and start working on this again.  Or maybe learn how to use some iOS framework like GameSalad to make a game that way.  And if I had infinite time and patience, I would.  But given that the rails stuff I wrote in 2008 fantastically crashes when I try to run it because there have been like 19 major revisions to rails since then, it probably won’t happen soon.

Anyway, here’s my rules from 2008.  I think I got the game to the point where I needed to figure out how to implement the AI for robot players before I gave up.

Rules

Here’s the rundown on how the game works, but note: everything is
under construction. Everything can be changed. In fact, until things
solidify, entire games could drop off the face of the earth. I will do
everything I can to avoid that, but there’s no guarantee on the
stability of the data at this point.

Also, anything marked with TODO is either something that isn’t implemented,
or something where a decision hasn’t been made yet on how it will work.

Four basic entities are used in the game: Worlds, Cells, Nations, and Forces, as described below.

Worlds

If Nuke ‘Em was a board game, a World would be the board. Each World contains basic meta-data defining
its structure and behavior, as given by its creator. There can be multiple worlds run by multiple admins, each
with a few or a lot of players. As far as those attributes, here’s a quick list:

Name

The name of the world. It can be simple, stupid, or silly, depending on the admin.
This doesn’t affect play, except maybe that a really hardcore name will scare away the n00bs. And maybe worlds
with really cool names will attract more players.

Cells Across and Cells High

This defines how big the world will be. Worlds are rectangular
grids of squares (sorry, no cool hex graphs like those old-school Avalon Hill games), with each square being a
Cell, which we’ll get to in a second. Obviously, a 1000 x 1000 map is going to be able to host a bigger
game than a 100 x 100, but if you put four players in a 1000-square map, it could take them forever to find each
other.

(There’s also an upward limit on the number of players in a world that can vary. Since players are randomly granted
a 3×3 plot of land, and those grants can’t overlap, you’ll eventually get to a point where a new player can’t find
a clear group of nine cells to start playing. And your mileage may vary when new players are added mid-game, since
current players may have carved up the map by then. TODO: two features that could be added to control this would be
a configurable hard cap on players, and a boolean that can be toggled to prohibit mid-game player addition.)

Turn Length

Nuke ‘Em is turn-based, meaning the world is updated and advanced each period, although players are welcome to mess
around with and adjust their entities as much as they want, to a limit. The length of a turn is measured in minutes.
You could set the turn length to 1440 and have things change each day over the course of months, or set it to 5
for a fairly interactive game that might be over in an evening.

The following are affected by turn updates:

  • Nations’ production is updated on a per-turn basis. Add up the civ of every cell you control and multiply by ten, and that
    revenue is generated each turn. High civ cells mean higher tech factories; more cells mean colony plantations bringing in cash.
  • TODO: Any Forces created by a Nation aren’t available until the next turn. (TODO: maybe this should vary – Rome wasn’t built in a day.)
  • Forces can only move a given distance in a turn.

Anything else happens in realtime, and happens simultaneously between all players.

TODO: At the end of each turn, each player gets an email with a verbose summary of their activities that turn,
and a public summary of everyone’s turn. Private events won’t be in that update (details of troop buildups, etc.)
but very big things will be (two countries nuke each other, Britney Spears shaves her head, etc.) There will also
be a facility for players to enter their own diatribes into the public news, so you can go Hugo Chavez on someone’s, ass.
And the public news is also viewable on the home page.

Nuclear

You’d think the use of nuclear weapons in a game called Nuke ‘Em would be a given, but you can set this to false
and make your world wars Greenpeace-compliant. This is sort of like the designated hitter rule in baseball, and people
will argue a more intimate game on a level playing field, versus giving people instant gratification with the
big guns. Either way, the feature can be toggled on and off by an admin.

World Defaults

A world defaults with a 100 across by 25 high map, a one-minute turn, and is nuclear-capable. Note that a one
minute turn is really damn short.

Cells

A Cell is a single unit of land. As for the basic properties, it has an x/y location (0,0 being the upper
left corner), and an ID of the world to which it belongs. It also has the following properties.

Occupant

When a player moves their forces on an otherwise empty cell, they plant their flag into the ground and its theirs.
If you’re the second person crossing into that cell, if it has no military presence, it is theirs. If it does
have occupying forces, skip forward to the combat section to see how that works out. (TODO: There is no facility
for allied troops to let each other move through their respective lands.) (TODO: there is an issue with being
able to “look” at neighboring cells, and/or cells you once owned.)

Terrain

Each cell has a type of terrain which, with one exception, is assigned when a World is created. Cell terrain can be
“plains”, “water”, “city”, “desert”, “mountain”, and “nuked”. To a limited extent, terrain dictates how Forces can move.
TODO: Currently terrain is completely random. In the future,
maybe the ability to either load in new maps or use a map constructor would be nice.

Civ

A cell’s civ is the level of civilization in that terrain. By default, that equals 1, which is probably the level
of an agrarian community. At the end of each turn, a cell produces resources based on its civ level. (TODO: what
is the rate?) A higher civ also means the forces built in that cell have a higher civ. (TODO: what happens to
civ when a cell changes hands?) (TODO: A nuked cell has a civ of 0.)

If you’re an occupant, you can spend resources to improve a cell’s civ, at the rate
of one civ point per $10,000 spent.

Nations

A nation basically is a player, and consists of their controlled cells and their forces. It also contains the
gnarly name you chose as the moniker for your country, your email address (for those end-of-turn updates), the
world in which you belong, and any other personal preferences that might come up in the future. There’s one other
all-important property:

Resources

Resources are basically money. It’s hard for me to call them anything other than dollars, but you’ll see the $$$ sign
when this is discussed. Not only could it have had some hokey fake monetary unit (gold pieces, Euros, whatever), but
it also refers to the general production ability of your nation, and not just piles of metal or paper. Anyway, cells
make money every turn. And you can spend money to build forces or improve cells. (TODO: a feature to send money
to another nation to pay them off so they won’t nuke you. Or a way to steal money from a nation you destroyed.)

Forces

Forces refer to any type of army, navy, or other military unit. Actually, there are exactly three branches
to choose from: “army”, “navy”, or “air force”. (Sorry Marines, I had to stick to the basics.)

TODO: There are also two additional forces that can be created. When a cell is civ 50 or higher, it can create ABM forces.
And there are ICBM forces, which can be created by nuclear superpowers. (More on that in a bit.)

Combat

TODO: Not done yet. These are the basics.

When you move forces to a cell that contains another nation’s forces,
a battle is automatically started. The basic version of this: your
forces and their forces cancel out. For example, you have an army of 100
with a civ of 10, and you march into a cell containing an army of 50
with a civ level of 10. You now occupy the cell, and your army now
contains 50.

This is calculated by lining up each side’s forces, from lowest civ to highest, and when civ is the same, by smallest
to biggest.

Nuclear War

TODO: Nukes have not been implemented at all yet, so everything here is speculation.

My thought on how a nation can go nuclear is this: once a cell reaches a certain civ level, it can now create forces
that have nuclear capabilities. And/or you might have to pay a one-time fee for the first time you ever go nuclear.
So for example, if civ level 100 is nuke, you pay $1,000,000 in improvements on one cell, then you get a “go nuke” link
appears. When you pony up an additional $1,000,000 payment (i.e. the research costs of a nuclear program) that
one cell and any others with a civ level of 100 can now create nuke-capable forces.

This is the easy version of the rules: your nuke-capable cells can create ICBM forces. To make this easier, an ICBM force
has exactly one troop in it, and costs $100,000 to build. It also has infinite range, so it can hit any cell from
anywhere on the map. When you “launch”, you choose a destination cell and press the button. You’ll get a report
that will tell you if the cell you hit was occupied or empty. (And if it was empty, tough shit – you don’t get a refund.)

There is one defense to the ICBM, and that’s the ABM. If a cell is civ 50 or higher, you can build one. (You
don’t need to be nuclear-capable, these are conventional explosives.) It costs
$50,000 and is a similar one-troop setup like an ICBM. You can’t move an ABM; it just sits there until something
bad happens. But when a missile attacks a cell with an ABM in it, one ABM takes out one ICBM. If you build
50 ABMs in one cell, it will take 51 nuke strikes to take it out. TODO: how these fare when a cell is conventionally
attacked.

If a cell is nuked, everything in it and in the 9×9 surrounding it is instantly killed, even ICBMs and ABMs. Not only that, but for the
rest of the game, the center cell is completely uninhabitable and impassable by anything (except airplanes?)

TODO: I am thinking of making a rule that when a cell falls to an enemy, they take possession of the ICBMs
and ABMs in a cell. They can’t build more, but they can use the ones there.

Share

Comments are closed.