Featured Post

Colour blindness HLSL shader for XNA

I’ve recently been thinking about accessibility and ways of adding various aids to my games to make them more enjoyable / playable to gamers with physical disabilities. So, first up, I’ve written a shader to simulate various forms of colour blindness and a little sample application that allows...

Read More

Update

Posted by Paul | Posted in Code, Puppy Games, XBLIG, XNA | Posted on 25-12-2011

0

It’s been a while since I posted anything to the blog as I tend to use Twitter these days for gamesy stuff but I thought I’d recap exactly what I’ve been doing these past few months in Pumpkin Land.

I’ve been keeping busy converting various bits n bobs of Java, frameworks and libraries to C#, in an attempt to release some of the awesome games from Puppy Games on the iPhone via the awesomeness that is Mono / Mono Touch.

I’ve worked with the Puppy guys in the past, bringing Ultratron to the Xbox 360 via XBLIG / XNA Games Studio and entering a Droid Assault WIP to the 2011 Dream Build Play contest (we didn’t win).

Previously, I’d used a hybrid approach when dealing with the Puppy code in XNA. A bit of their stuff, a bit of mine, the Content Pipeline, etc, in a mash up of conflicting styles and designs goals. And while this worked, it involved a fair amount of hacking, bug hunts and lots of head scratching trying to fit square puppies in round, pumpkin shaped holes.

So, this time would be different! I’d convert the whole Shaven Puppy Games Library (SPGL), their support tools, their reflection based resource loaders, their GUI, the lot! Oh, and therefore any bits from The Lightweight Java Game Library (LWJGL) that the Puppy engine utilised. It would be a fairly complex conversion but ultimately make converting the games much, much easier.

I started sometime in October, maybe the 14th and by mid December I was done. A minimal SPGL proof of concept app running in the iPhone simulator on my brand new shiny MacBook Pro. Sprites, music, SFX, arbitrary geometry, text, touch all present and correct.

The actually journey from Java source to running appplication wasn’t too bad. A few folks commented that it should be a breeze to convert to C# due to the similarity of the languages, and while mostly right, there were a few bumps along the way.

Firstly, I ‘needed’ a new Mac. Mine was old and slow and the keys were silver instead of the new flat black ones and, ok then, I just wanted a new one. Then I had to set up the Mono environment which was quite difficult for someone that bootcamped Windows pretty much exclusively on the old one. Where do the libraries go? Ah, Nant is compiled with MCS and I want a v4 compler so I need DMCS, blah, blah, blah. I shouldn’t complain though as without Mono none of this would be possible. And it really is an outstanding piece of work created by magic, pixie dust and lots of hard graft by the folks at Xamarin

Next was down to a combination of too many late nights and grand incompetence on my part. Trying to run my Mono code on the iPhone. That’s desktop code. On the iPhone. What was I thinking!? Once I realised what I fool I’d been I created some Mono Touch solutions, referenced the correct framework libs and we were good to go.

Then there was all the Java bits ‘missing’ from C# that I needed to either duplicate or rewrite. I chose to duplicate and spent some time in java.nio, java.io etc dragging more and more bits of core functionality in until finally drawing a line, adding some NotImplemented exceptions and commenting out some stuff that probably will never be called anyway.

Generics are different. A bit of head scratching there. Annotations / Attributes close enough to hack around a solution (no generic attributes allowed in .Net). Reflection pretty much the same really just different keywords so I either added extension methods or changed the source code to be more Dot Netified. Default scope rules are different, no biggie though. Checked exceptions – gone. Iterators to foreach mostly ok (except for list modifications while traversing) and probably a few others that I forget now.

I must thank Cas Prince for putting up with me hassling him late at night on Skype about Java syntax or functions or why my sprites aren’t showing / are the wrong colour!

So there we are. All ready to go in the new year, hopefully with some cool games for desktops, mobiles and tablets. Cas will do the Java side and I’ll port to iOS.

Merry Christmas.

PS – I’ve also got a Windows Phone 7 / Xbox ports done now too. Happy days :-)

Pumpkin Games at GameCityNights

Posted by Paul | Posted in Uncategorized | Posted on 29-04-2011

3

I attended GameCityNights yesterday.

“AN AFTER-DARK EXPLORATION OF VIDEOGAME CULTURE”

Stuart Gilray from Just Add Water was there doing the one on one, describing how he got into the industry and showing some of the new Stranger’s Wrath HD artwork, which looked pretty.  There was a live video interview with Lorne Lanning of Oddworld fame which was thoroughly entertaining; touching on socially designed games and why he believes classic games can stand the test of time just as well as classic movies. And a section on Second Life that was highly amusing by (I think) a fella called Paul Butler.

They also showcase indie games there which is the main reason I attended. I must thank Bob Fearon for putting my name forward and Chris White for making it happen.  There are usually 3 or 4 screens available to indie devs so I took my Xbox and demoed Doppelganger and the latest WIP build of Droid Assault. It was fascinating seeing other people experience the games for the first time and try and learn the mechanics (by trial and error – not a SINGLE person read the ‘how to play’ screens, not one).

It quickly became apparent that Droid will require some kind of tutorial – without reading the instructions (or having me direct their actions) players simply attempted to kill all the bots without using the transfer mechanism to build a team. Some players struggled with the twin stick control too so my intention to add a few different methods was vindicated.

So, all in all, it was a really enjoyable evening – a few beers, a decent chicken curry, some interesting chat and I got to show off a couple of games.

Cya next month!

(if you fancy showing your stuff send me a message and I’ll put you in touch with Chris to set it up).

 

 

Colour blindness HLSL shader for XNA

Posted by Paul | Posted in Code, XBLIG, XNA | Posted on 22-04-2011

2

I’ve recently been thinking about accessibility and ways of adding various aids to my games to make them more enjoyable / playable to gamers with physical disabilities.

So, first up, I’ve written a shader to simulate various forms of colour blindness and a little sample application that allows you to switch between 3 different forms of colour deficient vision: Protanopia (absence of red retinal photoreceptors), Deutanopia (absence of green) and Tritanopia (absence of blue).

Normal color vision is trichromatic. It is initiated by the absorption of photons in three classes of cones, the peak sensitivities of which lie in the long-wavelength (L), middle-wavelength (M), and short-wavelength (S) regions of the spectrum. Therefore any color stimulus can be specified by three numbers, the cone responses; and all colors visible to the color-normal observer are included in a three-dimensional color space. Reduced forms of color vision arise from the effective absence of one of the retinal photopigments of the L type in protanopes, the M type in deuteranopes, and the S type in tritanopes.  For dichromatic observers any color stimulus initiates only two cone responses, and all colors that they can discriminate are included in a two-dimensional color space. Compared with trichromatic vision, dichromatic vision entails a loss of discrimination and results in a reduced color gamut.

If anybody is interested, the code can be found here:
http://www.pumpkin-games.net/downloads/src/XNAColourBlindnessSimulator.zip

Caveats:

The ‘magic’ numbers used in the shader were initially designed to work with older CRT monitors.  I’m not sure how this will affect the filters when viewed on newer LCDs. I’m continuing research around this area and will post findings as and when.

Typically you would use as a post process filter to simulate how your game would look to dichromats.

Sources:
http://vision.psychol.cam.ac.uk/jdmollon/papers/Dichromatsimulation.pdf
http://gimp.sourcearchive.com/lines/2.6.6-2/display-filter-color-blind_8c-source.html
http://www.iamcal.com/toys/colors/

Sometimes it is not possible, desirable or practical to alter artwork offline to cater for all gamers.  So the next task is to create a post process component that can (in real time) dynamically alter the colour range of the final output so that it is more friendly to colour deficient players. This component could be turned on or off depending on a players needs (e.g off for a ‘normal vision’ gamer and on for a dichromat). The approach I’m attempting to take is outlined in the following paper:

http://www.inf.ufrgs.br/~oliveira/pubs_files/CVD_PCA/Machado_Oliveira_EuroVis2010.pdf

Droid Assault Screenshots

Posted by Paul | Posted in Dream Build Play, Droid Assault, XBLIG, XNA | Posted on 22-04-2011

1

Some images from my latest project.

A conversion of the excellent Droid Assault by Puppy Games – coming soon (hopefully) to the Xbox 360 via Xbox Live Indie Games.

The game is currently experiencing some severe performance problems but I’m hoping to sort all that out in time for June’s Dream Build Play competition.

 

Hello World!

Posted by Paul | Posted in Uncategorized | Posted on 15-04-2011

0

I sort of have a blog thing! Not sure what I’ll write here yet though. Most probably some rubbish about XNA and Xbox Live Indie Games more than likely.

It’s a work in progress at the moment, so things will likely come and go, move around a bit and generally get redesigned on the fly as I find my feet.