MOVE ALONG
This tumblr has been deprecated in favour of a new tumblr with exactly the same name, URL and content, but which is a subblog of my normal account instead of a seperate thing in its own right.
So, you need to refollow http://blog.piracyinc.com/
Sorry about that.
Our Program Continues
So, kind of went dark for a while.
Things that happened in the meantime:
a) I spent a while writing a mission system you could send your boats on.
b) I wrote some missions
c) I deleted the entire codebase.
The first two are kind of more obvious. The point of the game was to send things off on these missions and they’d do things, and they’d report back. It wasn’t really very fun, though.
Plus, as much as I was enjoying Ruby development, it became a lot more useful to be learning Django (since that’s what my most recent jobs have required), and as these two problems converged, a solution presented itself. git rm -rf *.
This has resulted in a number of major changes. The first is the reorigination of the basic unit of the game from having many different things (Ships, Pirates, Missions, Events, Upgrades, Training, Maps, and more) to having three things. Ships, Maps and Cards. Basically, it’s now a sufficently complex card game, which has some interesting knock-on effects which I’ll talk about when it’s further from being vapourware.
Plus, because it’s a system I’m more used to, I’m a couple of steps further than I was when I abandoned Rails, only a couple of weeks after I restarted it.
Missions Accomplished
This afternoon, I pressed a button and my current test company “Captain Flashheart” of “Red Delirium Limited“‘s newest ship elected a new captain. This doesn’t seem like much, but was actually the first thing you can do with the mission system. So yay, another bit ticked off.
Deploy
One of the fun things about a new language and new systems is occasionally tripping over them.
For example, PInc is currently being developed on my local machine, and then deployed to Heroku for hosting. Not sure if that’s a good long time-viable thing, but it’s a good staging environment. Plus, free. However, my local machine runs the reference Ruby stack - ie, MRI - which is what I’d assumed Heroku runs. It’s all ruby, right?
Not quite right, apparently. I’ve had a couple of fun bugs involving migrating from SQLite to Postgres, but my favourite so far is today, where I spent ages tracking down why none of the bugs I fixed in the Map controller would work.
Turns out that when I copied the admin version of the map controller out of the way, I hadn’t renamed the class, and where the local environment was loading the thing I expected, Heroku found the old version first. Of course, I should have clocked this when I needed admin rights to see anything at all.
What does this tell me? Well, it tells me I need to update my test cases, for a start. Also, I should move dev closer to live. However, since my local dev machine’s RAID card has a massive objection to Linux (in a “fall-over-corrupt-all-your-data” type way), this may be a little while.
Exploring new Avenues
And a week went by.
The next thing is probably the missions system, but the missions system is huge and complicated and needs some basic parts in place before I start it, or else I’ll end up rewriting it later. So, distractions.
Well, major distraction was Mass Effect, followed rapidly by the sequel.
However, relevant distraction was the map system. Ideally, we’re going to end up running multiple shards at the same time, but I’m not yet sure how I’m going to do that - it might involve separate ruby installs per shard, with some kind of magic cross-shard login system. Multigame support is therefore not quite there yet. Each game should really have a separate map, though.
Looking for decent mapping tools has been fun. I’ve looked at some incredibly expensive ones, but I couldn’t see though the license whether using them in a commercial application was against the rules, so I went for an open source one built for a forthcoming game called “Hero Extant” which generates pretty bitmaps and overlays all sorts of funky data. A few iterations of that and I have a passable map, which I split into 36 squares and fed into a thing that looks at bitmaps, works out which bits are sea, and builds node-graphs I can use with an A* pathfinding algorithm. Currently that only works inside a tile, I haven’t done the world-level path-finding just yet.
However, having the basic layout enables me to stir it into the database and put the exploration mechanic on top. Not that there’s anything to explore yet, but the tile progress from a blue mess to a blury green one and finally a sharp map as you learn more. I’ll probably filter the lot to make it look a bit more piratey, rather than the original SimCity aesthetic it’s currently exploring, but it’ll do for now.

Sunday Morning, 3am
Today I’ve:
Fixed the authentication flow. You log in, you pick one of your companies (most people will only ever have one, so it just redirects for them) you get to the dashboard.
Moved the static data out of its own sqlite DB and into a proper migrated database, which makes change management and deployment a lot easier.
Sorted out a deployment strategy, at least for now.
Sorted out blogs and static pages
Redesigned the login pages a bit.
Fixed the “I see no ships” bug.
Implemented Feedback tab via Uservoice
Fixed a couple of security issues
Experienced 01:59 twice in just over an hour (GMT ftw)
Next up: Ticks & Missions, I guess. Should probably sleep first, now my neighbours are partying less hard.
Happy Halloween, crew.
Status
Okay, so we have pirates, ships, logins, companies and authentication done.
This is The Plan:
- Maps Contain Towns
- Ship Classes
- Ship Graphics
- Mission Graphics
- Mission Architecture
- Ticks
- Potter Missions (Ability to go out and find new places to Scourge)
- Scourge Missions (ability to go out and earn loot)
- Admin Missions (pseudo-missions to do things like share loot and reelect captains)
- Share Loot. Make Pirates Happy.
- Pirates Less Happy Over Time
Deployment
- Release Stab One
This is The Continuation:
- Text cleanup and first pass at signup flow tutorial
- Spivak Pirates
- Tick Countdown
- Release Stab Two
And then
- Assign Pirates to Research
- Origins
- Research
- Stab Three
Eventually
- Dynamic Towns Part Two: Revenge of the Fripperizers
- Dynamic Towns Part Three: Electric Buildingoh
- Dynamic Towns Part Four: Haylp, Heylp.
- Levelled Ships, Hands-Off PVP
- Map View
- Foreign Powers
- Mark’s Alphabet
- Company Logos
- Cannonball Run
- Honest Traders
- Playing Cards
- Skynet
- Twitter Integration
- Facebook Integration
- Get Paid
- Pirate Party
- We Wants A Training Day
- TLAPD