Thursday, 8 October 2009
Micro Men
This docu-drama (ugh) does warn that some scenes are inventive for narrative purposes, and I suspect that the potrayal of ol' Uncle Clive was exagerated. But at one point he's harangued by his advisers to concentrate on the Spectrum, not the QL. They mention the size of the game market and the docudrama Clive turns "Oh yes, Clive Sinclair, the man who gave the world Jet Set £@@!ing Willy." as he tries to push computing forward.
He may or may not have said that. He may or may not have felt that or continue to do so. But still, Sir Clive Sinclair, in the million to one chance you are reading this: be proud.
Yes, we grew up playing Jet Set Willy, Knight Lore and thousands, thousands of others. But we also learnt programming. We learnt the tricks and methods that still serve to this day. We learnt squeeze a lot out of a little ( and how many mobile app developers value that experience today ?). My parents were workers, working class down to the bone. We could never have afforded a £500 computer, they could barely afford a ZX81, or the Spectrum upgrade a year later. We had to sell that ZX81 to buy the spectrum . But they managed, and so I learnt. I played games, and I love them. I still do , but through it all I learnt as well.
Today I'm a Software Developer at a large company. There are thousands, maybe millions of us out there who cut our teeth on Sinclair tech. Without that where would we all be today? All our software would come from the states, British software would hardly exist. Sir Clive Sinclair gave the word much more, so much more than Jet Set Willy.
He gave the British Software Industry its workers.
He gave the world the British Geek.
He gave the world the man I am today.
Be proud Sir Clive, be very proud.
Tuesday, 18 August 2009
A Loud Argument
There are always casualties in war Lister. If there wasn't it would just be loud argument with lots of shoving.
So, PERCOM, the Battlestar character utility, is pretty much finished ! Thanks to unit testing I've got the Cortex trait system in place, and a nice dialog for selecting a trait with a given dice value. The skills, traits and equipment has been changed over, and the currency units have gone from credits to cubits. The only leftover is the archetypes . They wont take long, all I really need are :
- Pilot
- Marine
- Commander
- Technician
- Medic
- Scientist
- Civilian
And the civilian one is going to be unbiased, all skills and attributes will have equal weighting. So aside from the archetypes, and perhaps finding a better name (I hate PERCOM) its done. Perhaps I'll call it recruiter.....
The next issue I want to face is this : Combat with more than a couple NPCs. This gets really bogged down really easily. A 10 vs 10 fight really gets a lot of dice rolling and slows down the combat a lot. Previously I've mitigated this where I can by having fewer but tougher opponents.
But the upcoming campaign I'll be running involves a party of cadets and training officers. Thats a lot of potential NPC's, and a lot of dice rolling that is out of player control. This is distracting and the GM often feels the need to rush this so the players don't feel excluded.
How am I going to fix this problem ? Well, thinking on it, I have two options.
Mathematical Option
Use some maths so the NPC combat boils down to 1 or two dice rolls. Ideally two, with the PC friendly lot get one roll that the PCs can make and the hostiles one roll that GM makes. A little table (probably a spreadsheet) will distribute wounds to the losing roll, depending on the roll difference.
The Software Option
All the NPCs (even Cylon skin jobs) are held in data files from PERCOM. I could write another program that reads all those characters in and runs the NPC side of combat. Each character would be player or hostile flagged, and have a selection mechanism for picking their immediate target. It would track wounds, stun and have and handle initiative ordering. You would need to be able to add the players but mark them as players.
You hit a "start round" button and each NPC makes an attack or the action lined up by the GM in the software. When a player takes an action it can pause and ask for the dice roll. It would need to let the GM just skip the action if something was happening beyond its ability to track. It would also need adjustments to wounds and characters on the fly. Player attacks would have to be entered manually, of course.
Essentially it would just be a character spreadsheet, with macros. The disadvantage is that the NPC actions would just become the GM reading "Fred aims at the third cylon, fires, and scores a glancing blow." before clicking next.
So Which One?
I favour the software solution, but then it sounds something cool to write. I can't see how to realisticly shorten the combat with the mathematical solution without ending up with arbitrary values and results that seem beyond control.
Its more than a Loud Argument isn't it ?
Tuesday, 11 August 2009
Hooray for Unit Testing - Part Two
Following on from my last post about refactoring my character program from Serenity RGP to Galactica, I can now report that last night I finished fixing all the unit tests. So when I ran the program did it work or crash out badly? How comprehensive was my unit test coverage?
In theory , with all the tests fixed it should start. I should see Traits appearing as Dice values rather than Major or Minor. I timidly started the app, bracing myself for the biggest stack trace I'd ever seen.....
And it worked. Just like that, started up and displayed a character, with two complications (a D4 and a D2) and one D6 Asset. Wow, I hadn't expected that . Hoped for, but not expected.
Then I tried to add a new Trait and it bombed. Oh well, close enough to be pleased with. I was planning to refactor the GUI anyway, listing a bunch of Traits to choose from as a straight list , with each dice version of a trait as a seperate choice. I want a list of traits with each dice in a column to the right. Click on the dice for the trait you want.
Also on the boned list were the archetypes. This was a system where you could set up certain types of character (Fighter, Politician, Toilet Cleaner) and each archetype had weightings to favour or disfavour attributes and skills. Since the skills set and trait list were changed between systems I've dumped the old archetypes for now, I'll either retranslate them from Serenity or just write them again.
Now, should I look at the non-rectangular windows effects in java 6 and see if I can get the app to work with cut off corners?
Tuesday, 4 August 2009
Hooray for Unit Testing
For example :
"Allure (minor)" becomes "Allure (D2/D4)"
"Dead Broke (minor or major)" becomes "Broke (D4-D12)"
I've got an NPC program for Serenity which I wrote and evolved over two campaigns and I'm reworking that to work with Galactica. My Trait object's go from being having an enum of Major Minor and Both, to having a list of dice types. This just means removing a field and replacing it with a List
But can I be sure that something subtle isn't broke, some small corner of the app that shall remain forever buggered? No, you never can be. But the unit testing coverage gives me a lot more confidence that I would have had without it. I'm not even through fixing all the errors but I know that the three major parts of the app that touch traits now work with the the dice list, and I haven't even run it yet.
Unit testing lowers refactoring time. Hooray for unit testing !
Tuesday, 28 July 2009
Juiced Louse About This House
But last night I got the racing itch, so having applied so powder and fired up the xbox I started again. It's usual racing game fare, start with some low-end car that you've just taken the L plates off and work your way up. But surprise surprise the second level cars include.... MR2 GTS. Red, and looking just like the one in my driveway, albeit with better paint and less polygons.
Its a strange feeling, driving something on screen like a maniac that I drive steadily and carefully to work everyday. I'm pretty sure the real MR2 doesn't slide that easily but I'm not prepared to find out. I'm also pretty sure the K&N induction system isn't £350, its closer to £75. Maybe the virtual mechanics charge an extra £250?
It all makes me think - how do you afford buy and kit out a sports car when you're under 25 (probably under 21) and not old enough to grow a beard? Wheres the juiced3 where all the men are fat balding and driving mid life crises cars and all the "babes" have 3 kids in tow?
Ah, the unforanate colision of games and reality. Lets hope it never gets here !
Wednesday, 15 July 2009
Days of Swine and Roses
Well, thats the swine, now for the roses.
Is there some company that builds dating website software ? A quick google says yes, so that probably explains why they all have payment schemes like this
- £10/mo if you buy 12 months
- £15/mo if you buy 6 months
- £20/mo if you buy 3 months
- £35/mo if you buy 1 months
Good lord, Imagine this pricing from a petrol station (50p a litre if you buy a whole tank, 75p for half tank, £15 to fill up a small lawn mower). eHarmony does this, as does match.com and all the others. While £120 is a small price to pay for the love of your life, its big one when the same money will let you meet women in person and includes beer, food and dancing.
Here, as a consumer, is what I see as wrong with current crop of dating websites.
- The pricing structure frankly looks greedy.
- You've no idea if a member is a subscriber and thus whether they can reply to you or not.
- Some of them don't even tell you if a member is active or not - are you looking at someone who signed up three years ago and never came back ?
Here's how I would do a dating website :
- The matching , photo and descriptions section wouldn't change. The current players seem to ahve that right.
- Instead of paying for time you pay for contacts. Pick a price, 10p, 50p, £1 whatever, but keep it on the low. £1 is ideal. You buy contact credits in blocks or individually.
- Each contact credit can be spent contacting one member. This gives you a 30 day communiction channel to that member only.
- When you contact a member they don't need to spend a credit to reply, it's free but only to the person who spent the credit. I'm willing to bet that someone who gets a couple of contacts they can talk to for free would consider buying contact credits themselves.
- If you are lucky enough to meet the contact of your dreams and live happily ever after you can trade your remaining contacts in for flowers, chocolates, whips, whatever.
- If you don't sign in for three months then the site will stop listing your profile.
Is this a viable business model ? Do the existing players in the market really get most of there money from those that pay over £100 for a year of subscription ?
I think not. Mobile phones in this country didn't take off until pay as you go arrived, and this is just pay as you go dating.
I think this could be a winner, I just need a snappy name.....
CheapDate ? eMiser ? Ebenezer Scrooges Emporium for Desperate Loners ?
*sigh*
Tuesday, 16 June 2009
Making a mockery
Now I expected the second one to cause problems and I was quite prepared for there to not be any automated testing systems for Android, at least not at that level. What I wasn't expecting was the difficulty of unit testing. Android (in 1.5 at least) has several utility classes for testing. Theres a ActivityUnitTestCase which seems to be the android equivalent of TestCase in JUnit. Then theres ActivityInstrumentationTestCase which seems to be a mechanism actually launching and manipulating an activity inside of either the emulator or an actual device.
The problem is both of these requirement me to add something to the device or emulator, some kind of instrumentation package. Yes , thats right - to the device. Acceptance testing, ok thats unavoidable but unit testing ? Come on, I shouldn't have to run my unit tests inside an emulator.
I want to run my unit tests inside the IDE or inside an ant task . I should be able to mock out Android classes and just test how my code interacts with the mocks. Why can't I do this (using the excellent easymock) :
expect( MockActivity.findViewById(R.id.someButton) ).andReturn( mockButton );
One word : Dalvik. The Android plugin is compiling all the code to dalvik bytecode and the only dalvik jvm on my machine is inside my emulator. Running it inside Eclipse doesn't work and never will.
Thanks google, I'm sure an awful unit testing setup wont make your market apps worse.