BL:AM

Sat 07 October 2023 by Jim Purbrick

After The Spirit of Gravity in February I ended up talking to Jason Hotchkiss and Jo Summers. I knew Jason from a Build Brighton guitar pedal workshop years ago and as a sound artist from Sound Plotting, but Jo knew Jason as the game developer who made 1D Pong. After talking about 1D Pong and another 1D dungeon crawler we started thinking about the most ridiculous 1D game we could imagine in 2023 and settled on 1D, 1 button battle royale.

Normally that’s where the story would end, but for some reason the idea kept rattling around in my head and eventually I ended up putting my thoughts down in a Google Doc and started thinking about how to make it happen.

To be a battle royale the game had to be multiplayer with players on a shared map trying to shoot each other, but a 1D display meant the gameplay couldn’t come from aiming. Judging the distance to shoot by charging and launching a missile solved this problem and provided a fun core gameplay loop which could be implemented with a single button. Hold the button to charge the missile then release the button to fire a distance dependent on the time the button was held.

First Multiplayer Game

With the button used for shooting, moving players around had to rely on another key feature of battle royale games: the shrinking map. The game would start with a large map filling the display and would position players randomly as they joined. Periodically the map would shrink and randomize the player positions within the smaller play area. This would create a natural tempo increase in the game as players would move closer together, so players could fire shorter distances and so fire more often. Eventually all the players would be next to each other, so just tapping a button would always result in hitting a player, ensuring the game came to a swift end.

Jason had already suggested the Raspberry Pi Pico as a potential hardware platform, so I built a prototype as a Linux terminal application which outputs frames as lines of ASCII to quickly test the design in a way that might be easy to port. The first prototypes were surprisingly fun. Some tweaking of the map resize period gave good players enough time to range-find long distances while not making weaker players wait too long if they were a long way from the action. As the map got smaller the action got more frantic before ending in a flurry of button mashing as planned.

The slow pace at the start gave players enough time to learn how to play, but could feel frustrating when all the targets were at the other end of the map. A solution came by adding loot boxes, another feature common to battle royale games. Scattering loot boxes across the map meant players would always have something nearby to shoot, helped maps feel more varied and provided a way to add depth via power-ups and another way to move around via teleporters.

Loot boxes also added another interesting gameplay choice: should I try to snipe an opponent immediately or get tooled up first? The initial design always fired missiles at the nearest target, which Jo highlighted as a problem as it meant you couldn’t always pick your target. An easy solution was to alternate the direction of fire. Just tapping the button meant players could quickly launch a missile in the wrong direction before getting back to carefully charging a shot to fire in the right direction again.

USB serial to Pico

After playtesting the software version at The Brighton Indie Gamedev social, I was convinced that the game was fun and started thinking about hardware. I expected it to be a lot of work to get running on the Pico, especially as I’d allowed myself to joyride some relatively new C++ features like lambdas and auto parameter types, but g++ happily took my fancy code and cross compiled it without any complaints. I could also use PuTTY to connect to the Pico as a USB serial device to see the ASCII output, which was incredibly useful while testing the hardware without the LED display and then for debugging problems while getting the display working.

I ended up with a hardware main function (which wired the inputs up to the Pico pins and redirected the output to the USB serial interface), a terminal main function (which used some hacks to get unbuffered keyboard presses) and renderTerminal and renderRgb methods implemented by the game objects. The rest of the code was shared between the two builds, allowing me to quickly develop, test and debug the game using VS Code and gdb, then cross compile and drag a binary to the Pico mounted as a USB drive.

In May I got the chance to play 1D Pong at Jason’s studio which made me realize how important audio is when you only have a 1D display: the sounds of balls bouncing off bats and points being scored did a lot to explain what was going on, so I started thinking about adding sound to 1D battle royale. The Pico doesn’t have a digital to analogue converter, but some experimentation showed that it can generate some gloriously grungy sounds by using pulse width modulation to play samples using one of the digital outputs. After aggressively compressing some of ProjectsU012’s arcade sounds and converting them to 8 bit samples stored in header file arrays, the game came to life. Instead of being a quirky, abstract 1D game it was a battle royale complete with missiles whooshing and exploding and players powering up and teleporting around.

Brighton Indie Gamedev

I haven’t made a game in a long time and I’ve never made a hardware game, so this project has been a lot of fun. It’s also something that I couldn’t have done without Jason, Jo and everyone at the Brighton Indie Gamedev socials: thank you to everyone for your help and feedback.

One Button Controllers

Dreamy Hardware

“Battle Lines: Arcade Machine” (BL:AM) was included in the Pop Up Arcade at the Dreamy Place Festival in Crawley in October 2023 where I had lots of fun playing it and talking about the design and development. You can find more gameplay footage here.


How (Not) to Build a Metaverse

Wed 05 October 2022 by Jim Purbrick

Earlier in the year I helped Josh Sanburn and his team put together a podcast series on building Second Life for the Wall Street Journal called “How To Build a Metaverse” which I’m now really enjoying. It’s great to hear all of the amazing stories about the origin …

read more

Virtual Worlds, Real People

Thu 17 March 2022 by Jim Purbrick

Last week I gave a lab talk to my former research colleagues at the Mixed Reality Lab at the University of Nottingham about the work I’ve been doing since leaving the lab over 20 years ago. Rather than talk about technology I focussed on the lessons that todays efforts …

read more

The Art Of Social VR

Wed 03 February 2021 by Jim Purbrick

The recording of my recent Stereopsia 2020 talk about the art of designing social VR experiences is now online. The talk summarises a lot of material covered in more depth in my posts on The Conversation Around Content, A Tall Dark Stranger and Small Places Loosely Joined, so if please …

read more

0 to 1

Thu 20 August 2020 by Jim Purbrick

Facebook badge

8 years ago London was hosting the Olympics and I met Philip Su for the first time at Browns in Covent Garden to talk about the engineering office Facebook was planning to open in London. By the end of this year Facebook London will have thousands of people working in …

read more

Replicated Redux: The Movie

Tue 22 May 2018 by Jim Purbrick

The recording of my recent React Europe talk about Replicated Redux is now online and I’ve written several other posts describing designing, testing and generalising the library if you would like to know more about the details. If you’d like to play the web version of pairs or …

read more

Free Tests For Everyone!

Thu 11 June 2015 by Jim Purbrick

Modern software development is sometimes colourfully described as being similar to firing tracer bullets at a target. Rather than spending time doing a lot of research, design and specification up front, the smallest, simplest version of the software is built and the feedback gathered from its use is used to …

read more

Investing In Testing

Wed 10 June 2015 by Jim Purbrick

Last year I was talking to an engineer at Droidcon London who was working on an Android app with 100% test coverage. I immediately asked whether he thought 100% test coverage was worthwhile: many software engineering teams strive to achieve 100% test coverage, but few succeed because it’s an …

read more

buckd

Mon 18 August 2014 by Jim Purbrick

BuckGraffiti

One of the things I’ve been working on since joining Facebook is Buck, an open source Android & Java build tool which is significantly faster than many other Java build tools for a number of reasons.

As well as being fast, Buck gains a lot of power and flexibility by …

read more

Following In My Father’s Footsteps

Mon 12 November 2012 by Jim Purbrick

Tintin Hair

From 2 years before I was born, until just before I started working on Second Life at Linden Lab, my Dad worked at an innovative technology company with a large consumer photography business: Kodak. From January next year I’ll be working at an innovative technology company with a large …

read more

21st Century JavaScript

Sat 12 March 2011 by Jim Purbrick

The slides and video of my talk at AsyncJS on Thursday are now online. The video is pretty murky, but the sound has come out fine and you can see enough of the slides to be able to follow along at home. The talk focuses on ways to bring useful …

read more

Spawning Django Blogs

Mon 18 October 2010 by Jim Purbrick

Since leaving Linden Lab I have been talking to a number of people about doing freelance consulting and development work while I get my start-up off the ground and last week got round to setting up a UK limited company so that people will actually be able to pay me …

read more

FOSDEM X: The Movie

Sun 14 March 2010 by Jim Purbrick

A video of my FOSDEM talk about Mono in Second Life and our plans for the future of scripting is now online (the slides are also available here ):

Watching back, I was surprised to hear myself say “Hooray!”, “Shit” and “Crap” quite so often…

While you’re catching up on …

read more

FOSDEM X

Wed 10 February 2010 by Jim Purbrick

Last weekend I went to the 10th Free and Open Source Developers European Meeting in Brussels. This year was the first time that FOSDEM had hosted a track on Mono, so I went along to find out what’s going on with Mono, tell the Mono folk what our plans …

read more

@scalecamp

Mon 07 December 2009 by Jim Purbrick

On Friday I jumped on the train to London to attend the first scalecampuk, an unconference about scalability, at the Guardian offices.

The sessions were all very interesting and mostly very relevant. I learned new things about XSS and CSRF and Django’s defences against them from Simon Willison, new …

read more

Bouncaline

Tue 03 November 2009 by Jim Purbrick

Last week I took some time off to spend with Luke and Natty during half term and we spent Wednesday having a lovely time finishing off a game we started a couple of months ago: Bouncaline.

Luke has been interested in making games for a while: he made a level …

read more

New Widgets

Tue 25 November 2008 by Jim Purbrick

It’s that time of year again where people start asking what I’d like for Christmas and I start wondering what they’d like in return. It’s just the sort of problem that should be solved with social software. Over the last few years I’ve had an …

read more

dConstructing dConstruct

Thu 18 September 2008 by Jim Purbrick

A couple of weeks ago the great and the good of web development descended on Brighton for the wonderful clearleft produced dconstruct conference and once again I’m glad I went along.

Steven Johnson kicked off with a talk about how Dr. John Snow’s innovative data visualization of a …

read more