
Okay, so Cliffski’s Blog has shamed me into thinking I need to start talking about my game… (drumroll) Space Rogue!
And so, the high concept for SR is simple, make a 2d game that’s awfully like Elite mixed with Rogue, and maybe a bit of X3 thrown in for good measure.
But you start in a random position in a procedurally generated universe, you might be born a pirate, a trader, a law enforcer, a bounty hunter, and although your starting point is defined, your ultimate destiny is up to you. Throw in management of other ships and pilots (who are on your pay roll) - or manage stations, defending them from dastardly attacks.
Bored of how it’s turning out? You can hit a single Key and the game goes away and generates a new universe, with new missions and legends and back stories and new bounty. the faction balance is re-done, the imperials may have been the leading faction last time out, but now, the federation have the upper hand…
So where’s the game currently?
Simple, It’s at first pass prototype stage, I have a playable, if limited game currently, you can warp to different stations and trade with them in a variety of commodites, like minerals and slaves.. (Infact the commodoity tree is lifted straight from Elite currently)
Ai is in and working, except it’s very shallow, they don’t actually seek out trade, and universe persistance isn’t there, meaning if somethings going on outside of your current sector, you just can’t see it…
Then I hit a block, as I’m using GameMaker (yes, lazy, I know) - the constraints of GM aren’t bad actually, and it could probably do exactly what I wanted, but as soon as I start to increase the scope of my plans, I think “that’ll just be too much for GM” and I start thinking of the alternative development routes. A C# solution probably, using SDL, and all sorts of other magical TLA’s, except I’m no master of C# - In fact, I’m a complete and utter n00b.
The huge step back will increase my scope, but massively increase my frustration, doing simple things will be hugely difficult (like a decent sprite management system, rotation, input)
So I started prototyping other ideas… breaking off from the “one .exe fits” all concept. I’ve now generated several little prototype ideas…
The sector name generator
I like X3’s names for the sectors, they seem to bring a history to an otherwise dead block of space.
But with X3, the sectors are pre-determined by a designer some place, with balance and gameplay considered. I want to do everything proceeduraly. Which is a bit trickier…
So, using a very very complex set of case statements, I managed to start generating “X3″ like sector names. (I admit, it’s even possible to get names like “Home of Light”), the test cleverly picks a word and then scores it in certain factors. I lovingly named these factors.
“Dread, Depression, Hope, Law, Pirate”
So when the case statement picked a word like “Light” it intrinsically knows that this word provides “Hope” (literally, light = hope + 5) - When it picks a word like “Sorrow”, it adds to depression, dread, and removes from hope…
This gives me a set of variables that I can then use to determine lots of things…
Like a good next word… It’s clever enough to never provide a sector name like “Hope of Sorrow”, or “Bankrupt Profit”
What this gives me is a way of generating “decent-ish” sounding names, better than the vowel constenant jumbles I was previously doing. (Lave fits the pattern, but qutopij sounds and looks shit) - Admittedly, I could use character frequency bias to generate planet names, and then append scientific roman numerals on the end. “Bestat IX”
Universe Generation
For a while I was obsessed with the idea of no data storage, the game would create the entire universe off a single two digit number, but do it pre-deterministically, not randomly, enter the same number, get the same universe.
It works too, using a combination of fibonacci sequences and just random seeding, it works fine, but because the sequence may get knocked out of order by the user “doing stuff” (like jumping between galaxies, or simply having an Intel processor) -I can’t guarnetee that one mans 42 is anothers.
So I started going down the route of String examination, from the initial seed of 42, the universe would go away and make a planet name. Lets say Pluto (by pure chance) - then it’d look at the word P L U T O and score it based on the values of the ascii characters. The location of the station would be determined by the first letter, P and the last letter, O… (O and P are very close to each other in the alphabet, so I can confidently predict it’d put the station somewhere in the middle of the world)
Then I’d use the middle letter of the planet to determine it’s politcal, technological, and market values. Everything from the letter U.
So if you ever found a planet called PLATO - the station might be in the same place, but the markets would be significantly different.
And then to stop predictability in this system, (if someone spotted that planets with more A’s in it than Z’s were more beneficial) I created a new balance list each and every time it was used, (using another one of those fibonacci sequences)
All was fine, and it worked perfectly, this created an infinite (yes, infinite) amount of sectors. The game would happily let the player type in any combination of words or letters and it would go away and pre-deterministically make this sector for them, (obviously, for gameplay purposes this wouldn’t be in the final game)
Then…
Rather than having seperated worlds of population like in Elite, I’ve considered the idea of jumpgates, jump gates intrigued me for quite a while, linking two sectors by a point. The Warp drive in Elite is pretty clever, it beams the ship from one sector to another.. no matter where they are.. However, gameplay wise, in my game, it had some drawbacks.
Pretty much every fight could be avoided by simply warping out of the sector… Rather than racing to a jumpgate…
But then, if the universe didn’t exist outside a sector, how could a jumpgate possibly work? Does a jumpgate get created and then state where it’s destination is, (and pass that information on when the sector is destroyed and re-created?) - fine.. But what about the return journey? Stored where?
And then I started thinking about making AI use jumpgates, in my game, if the AI jumped through a gate, they’d be destroyed, if the player chased them, they’d be re-created,
So I came up with this…

What you’re looking at here, believe it or not, is a universe. In each square exists a sector, named, balanced, connected to it’s allies and sectors of its same type. Over time, the sectors grow stronger (shown by being more solid, brighter, colour than the others), and when a faction becomes strong enough they start to invade smaller factions, each universe is born, and the game’s rules determine if it should be destroyed or not - the game decides what a good universe is, using some basic criteria
No faction can have ultimate control, (i.e. no faction can be “too powerful”)
No faction can be completely destroyed (they must all exist, no matter how small)
Each faction must have a HQ or epicenter
Each faction must border another faction, if it’s the same faction, a trade link is created, raising the power of that sector.
It works surprisingly well, the next step will be to be able to click on a sector, and let it create the station set up within… If you click on a epicenter square, it generates a station grid that is predominately that faction… Each square then will have another set of squares within that, with a station in each..
Then I’ll apply the wars, and everything should fragment nicely, causing piracy and law to live next to one another…
Sectors simply collapsing through trade embargos and war, war-neighbouring sectors producing weapons for each faction, war drives everything forward.
Recent Comments