Sponsored By

Playdate Pulp: Zero to video game in 60 Seconds

Panic designer Neven Mrgan breaks down Playdate's ambitious browser-based dev tool, 'Pulp,' in glorious detail.

August 30, 2021

12 Min Read

Author: by Neven Mrgan, designer at Panic

Playdate is a brand new, handheld gaming console made by Panic. There’s nothing quite like it: it has a black-and-white screen, a crank you use as a controller in the games, and a wholly custom operating system. It runs original games, written specifically for Playdate.

We wanted those games to be made by just about anyone. An experienced game developer could download our free SDK and write a game in Lua or C, using a rich set of APIs, the way you’d do it for most gaming platforms. But what if you’re just starting out? If you have an idea for a Playdate game, we’d like to see you realize it quickly and simply.

This is what Playdate Pulp is for: it’s a game maker where you don’t have to write any code at all; unless you’d like to, in which case there’s also a scripting language called PulpScript. Pulp lives right in your browser, so you could use it on a MacBook, a desktop PC, a Chromebook, or a tablet.

What’s the fastest way to make a game?

Early on in the development of Playdate, we thought about ways to simplify and streamline the process of creating a video game. How about a Game & Watch style of game, where you’d essentially draw everything on one screen and "turn on" individual graphics according to a simple set of rules about "being in the right spot at the right time"? This was our very first attempt at a Playdate game, back when Playdate was a board with wires sticking out of it and we weren’t quite sure whether it was a fun distraction or a product we’d want so sell.

game-n-watch-style-game.png


Unfortunately, it turned out that those games have a limited potential for fun. Modern games just tend to be a bit more expressive -- even when they’re simple to play, they can convey a little more in terms of surprise and emotion. We wanted to able to tell a story in a Playdate game.

So what other kind of game type could be reduced to a peppy little engine -- an environment where the author could focus on the art, writing, and design, rather than on managing memory, timers, and trigonometry?

Around that time, we were intrigued by Bitsy, a project by Adam le Doux. It’s a web-based game editor where you draw pixel blocks, assemble them into small rooms, and play the resulting exploration game. It requires no programming, yet people have made thousands of fun games in it -- games that often subvert the “room explorer” aesthetic and deliver unexpected, delightful little experiences.

bitsy.png


As a platform, Playdate has its own peculiar set of features. Existing games made in Bitsy wouldn’t work well on it -- the resolutions are too different, we don’t have a color screen. After pondering a fork of Bitsy and emailing Adam to let him know what we planned to do, we decided that building our own game maker inspired by Bitsy would be the best option. Adam graciously gave us his blessing to chart our own path, so we got to work creating a Playdate-specific complement to Bitsy.

Working with what you have

Here, I will admit that my reasons for proposing Pulp in the first place were rather selfish: you see, I’ve always wanted to make video games. I’ve collaborated on some, but constructing a whole game from scratch seemed quite a challenge. What would it take for me, a designer with a background in art and writing -- but with only a passing familiarity with scripting -- to make a game?

There’s a person at Panic with a long history of making wonderful games: Shaun Inman, of the games The Last Rocket and Retro Game Crunch. For these games, he had built custom tools -- level editors and such. Could he put together a creative toolbox for Playdate?

Shaun being Shaun, he had a working prototype in a matter of hours.

playmaker-1.png


Shaun’s previous tools had been web-based as well. The web is a fast, UI-rich platform for developer tools like this. Continuing to build and ship Pulp as a web app would make it accessible to the largest possible audience; it would simplify deployment of updates; it would let users back up their work to our servers and continue to work on it from any device they log on to.

After just a few days of development, we had something you could make a plausible game in.

playmaker-2.png


To streamline Pulp and make sure it performs well on Playdate, we kept the graphics chunky. Each tile that defines a level and the objects in it is 8 × 8 px. From these blocks, you can create something that looks like a classic Zelda world:

zelda-pulp.png


This means the total game resolution is halved from the Playdate’s 400 × 240 px to Pulp’s 200 × 120 px. Is that a problem? We don’t think so -- Playdate has very small, fine pixels, so many games choose to go with bolder art anyway. To someone who’s new to making games, having to drawing four times as many pixels for each tile might be more of a curse than a blessing. Pulp is small on purpose.

To add life to these little building blocks, you can animate any one of them -- from your player character to the NPCs and furniture they interact with, to the ground they walk on.

animation.gif

No code, or a little code

If you make a Pulp game just by clicking on pixels, connecting rooms, and entering some dialog on objects, that game can still do a lot. There’s joy in discovery and being the active protagonist of a story. Countless walking-simulator games prove that you can enchant the player without an elaborate set of interactive features.

But if you’re up for a little bit of learning and a lot of creative thinking, you can write code in Pulp. We added this at first as a quick little hack, a way to essentially expose the engine’s existing mechanics to the author. For instance, if you walk up to an object or a character, they can say something -- the author just enters the object’s label in a text box, and the engine prints that out when the player bumps into the object. Now, what if the game’s creator could tweak that logic a little?

We started with our Behavior window, shown under an object when it’s selected. Originally, this window was small in both scope and physical size in the UI -- how much code would a Pulp user want to write, anyway? Not that much, right?

pulpscript.png

 Enter the game Hidey Spot.

hidey-spot.png

To help answer for myself the question of what features Pulp needed, I figured I’d make a game in it from start to finish. I picked one of my old ideas: a kid wakes up before Christmas to find all the presents the family has hidden around the house. It’s a game made up of rooms, some objects, and it tells a story by letting you walk around the space. Hidey Spot didn’t need scripting, and for the first third of its life, it didn’t use any. You’d just move around, talk about objects and characters you encounter, and occasionally collect hidden presents.

Once Shaun exposed variables and dialog through PulpScript, I could, for instance, make the protagnist say something the first time they see a book. But then, on subsequent interactions with the same book, you could get different dialog -- a simple matter of using variables.

From there, the game’s abilities grew as PulpScript itself grew: Hidey Spot gained an inventory, puzzles where you have to combine objects, and a permanent HUD showing the number of found presents and what room you’re currently in. The game feels much more playful and surprising now, though its core idea would still work without PulpScript.

No matter how simple a scripting language is, it’s nice to have a comfortable editor with all the modern conveniences: syntax highlighting, automatic styling, instant syntax checking. To achieve this, Pulp embeds the Ace code editor.

pulpscript-editor.png


PulpScript is limited in some ways -- for instance, it doesn’t currently support arbitrary math expressions, just simple operations between two values. Shaun has joked that “brute force creativity” is the attitude to take when solving a problem in Pulp. This simple toolbox gives you just enough flexibility to expand the game’s featureset beyond what seems possible at first. With a little bit of lateral thinking, you can generate random mazes, write lengthy dialog trees, and make games that look like graphic adventures or dungeon crawlers.

pulp-games.png

If you can imagine the game of your dreams as a set of tiles that can be programmatically changed, you can make it in Pulp.

Sounds good

Whether you use PulpScript or not, you’ll definitely want to make your game come alive by adding music and sound effects. Fortunately, Shaun is an aficionado of chiptune music, and he put together an old-school tool for creating audio in Pulp. Using five robotic channels of beeps and boops, you can channel your NES nostalgia into composing a catchy soundtrack for your game.

sound.png


These tunes can be assigned to the rooms in your game, or you can trigger them programmatically. It’s amazing what a difference a little bit of background music and interactive sound makes.

In fact, Pulp users have liked these music tools so much, they’ve asked us to make it so they can put their Pulp songs to Playdate games made using our full SDK. We’re working on exactly that -- code that will let you import a Pulp song into your SDK game.

That’s just one of the features of Pulp you’ll discover on your own. Also included is an editor for your font and UI elements; import/export features for all the art you create, as well as the whole game; and a way to create your game’s “box art” for the Playdate launcher screen.

Here comes the good part

There are plenty of fun tools for making games out there, many of them on the web. While we think Pulp is special in itself, there’s something that makes it extra cool, in my opinion: you can play a Pulp game on your Playdate.

Pulp has a Download button which returns your game packaged as a .pdx file -- a Playdate game executable. This is ready to be moved to the device either over USB, or through your https://play.date account. That’s all there is to it: grab the file and put it on your Playdate. You can now play using the actual hardware, complete with the crank and all. And yes, you can program the crank in Pulp!

playdate.png

The resulting game package contains the Pulp engine, plus the JSON file describing the game yourself -- rather than being bytecode, the game is a big table of all the objects you’ve created, including the script. The engine steps through that as you play.

In the future, we plan on making this move from the browser to your Playdate even faster -- imagine simply clicking a button in Pulp and having the game beam instantly to the Playdate. It’s fast and magical.

Accessibility

Pulp features a number of familiar keyboard shortcuts -- Cmd-S, Cmd-Z, and so on. Shift- clicking buttons that display a confirmation dialog will skip the dialog, Opt/Alt will modify the current tool. This is all very convenient once you’ve been working in Pulp for a while and you want the fastest way to get things done. Sometimes, however, it can make an app less accessible. An author might not know to hold Option to get the fill bucket tool, or they might not be able to perform the keyboard press together with a mouse click. We kept this in mind and tried to make it so all features are usable in at least two ways -- by clicking, by keyboard navigation, and available to screen readers.

The future of Pulp

As I write this, Shaun is hard at work adding yet more features to Pulp -- things we’ve heard about from beta testers, and things we want for our own Pulp games. Just in the last few weeks, Pulp has added project-wide search (for tiles names as well as your own code); a faster way to connect rooms; a menu to navigate different sections of your script; and a new interface theme. Did I mention that we have several themes? Every good developer tool will have users fanatical about a particular color scheme.

themes.png


And we won’t stop there. As we get more feedback on Pulp, we’ll see how we can make it even better -- open to more people, ready to turn more dreams into playable games.

Pulp and the Playdate SDK are still in private beta testing. We expect to make them publicly available -- for free, to anyone -- later this year.

Pulp is an approachable game-making tool for those of us who haven’t coded games from scratch before. It’s also a quick prototyping solution, useful even if you can program your own sprites and levels; a quick way to check if your idea holds up. And it’s a fun sandbox that requires a new style of thinking, a quirky, creative workshop whose scope might challenge a seasoned game developer to see how far they can push it. We expect that soon after Pulp is out, we’ll be delighted to see the surprising things people build in it.


Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like