Mary Rose Cook

Pistol Slut third demo

It’s starting to turn into a game. Last night, as I played through the level, I felt a first jolt of fun. I’ve made the frame much wider to allow the pitched battles that I think are going to be the core of the game. I’ve added mortars, floating Chinese lanterns and four planes of parallax scrolling. I added and then removed cycling of the colour of the sky from dark to light to dark. The enemies don’t accidentally shoot each other any more, and they throw grenades.

It is so fun to work on a game. It’s a completely different type of programming from making a website. There are far more interactions between different elements. It is a machine with parts working in concert, whereas a website is a landscape with disparate lanes leading away from each other. Tom Klein Peter said this of building Audiogalaxy:

In fact, almost everything about the scale of the software fascinated me. I found that a system with hundreds of thousands of clients and thousands of events per seconds behaved like a physical machine built out of springs and weights. If one server process stalled for a moment, effects could ripple throughout the cluster. Sometimes, it seemed like there were physical oscillations – huge bursts of traffic would cause everything to slow down and back off, and then things would recover enough to trigger another burst of load. I had never even imagined that these sorts of problems existed in the software world and I found myself wishing I had taken control theory more seriously in college.

I am constantly generalising code so it can be shared: the code that moves objects around, the code for operating a weapon, the code for firing different types of ordinance, the code for different types of particle and particle effects. And I am constantly fighting to improve performance. Usually, when I add something new, the game becomes laggy. I then work on optimisation for a while until I get performance reasonable again. Sometimes, the optimisations involve re-writing the code to make it more efficient - for example, I rewrote the code that triggers events in the level to make the checks for trigger trips far quicker - this requires being clever. Other times, the optimisations come from finding something that is computationally expensive and removing it - for example, I chopped up the graphic for the front-most parallax level into smaller parts to stop the engine wasting time drawing the great tracts of empty space - this requires sacrificing code elegance.

 

Pistol Slut second demo

This is the second demo of Pistol Slut, the 2D, shoot-em-up platformer I’m writing in JavaScript. You can play it at pistolslut.com.

The game now has a mortal enemy who can shoot, take cover and be suppressed by incoming fire. So, Pistol Slut can keep the enemy pinned down as she advances, then unleash a hail of bullets for the kill. Pistol Slut is now mortal and can crouch, throw grenades and, the faster she shoots, the wilder her shots go. After expending her magazine, she must reload.

Pistol Slut has paid a visit to the Sluts With Guns free shop and got an M9, Mac-10 and SPAS shotgun.

</embed>
 

It's Flashbeagle, Charlie Brown

I used to watch this when I was a child. I think my God mother gave it to me on video. The programme comprises four songs performed by characters from Peanuts. A few years ago, my friend, Dave, and I discovered a mutual appreciation. He even has a copy on DVD. We recorded a cover of Lucy Says in the last afternoon before I moved from Leeds to London.

 

Experimanntag

Last Monday, I did the first Experimanntag for my colleagues at Ableton. I showed a film by Michael Mann and then we went to Experimontag, an experimental music club in Berlin. Next week: The Insider.

 

Hurray for the Riff Raff

</param></param></param></embed>
 

You Died on 12th May 2009

I’ve released my solo band’s new record on CD. It has six songs and you can listen to and download it here. Or, email me your address and I’ll send you a CD in the post.

 

Pistol Slut: some details about her

Pistol Slut is a 2D side-scrolling shoot-em-up platformer that I am writing in JavaScript. The game is displayed by a Canvas element. It works in Google Chrome, Safari and Firefox in theory, but not Internet Explorer.

Demo

The most recent vaguely stable version will always be available at pistolslut.com.

Framework

I use The Render Engine by Brett Fattori. It’s a fabulous framework that handles the basics of rendering graphics and sprites to the Canvas element, moving objects, collision detection, animation and level loading.

Code

The Pistol Slut code is open source and available on GitHub. It would be a good reference for anyone who wants to learn about advanced capabilities of The Render Engine that aren’t covered in the demos that come with the framework: animated sprites, level object loading and enemies.

Features so far

A scrolling background, running, jumping, shooting, muzzle flash, bullet ricochets, enemies, snow, animated sprites, scrolling Orwellian signs.

 

Pistol Slut

A demo of the pre-alpha version of my JavaScript game, Pistol Slut.

</embed>