Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $9.99/month after trial. Cancel anytime.

Code the Classics Volume II
Code the Classics Volume II
Code the Classics Volume II
Ebook378 pages3 hours

Code the Classics Volume II

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Take inspiration from the some of the greatest video games of the 1980s and learn how to write your own modern classics

Code the Classics Volume II not only tells the stories of some of the seminal video games of the 1980s, but shows you how to create your own games inspired by them, following examples programmed by Andrew Gillett, ably assisted by Raspberry Pi co-founder and CEO Eben Upton along with Sean M. Tracey. In this book, you'll learn how to run and edit the games in this book by installing Python, Pygame Zero, and an IDE. You'll also:

  • Get game design tips and tricks from the masters.
  • Understand the fundamental tasks needed for every game: display images, play sound effects and receive inputs from the keyboard or a game controller.
  • Learn how to code your own games with Pygame Zero, a library that helps automate those tasks.
  • Explore the code listings and find out how they work.

You'll meet these vintage-inspired games, and learn from their code in between rounds of play:

  • Avenger: fly across a scrolling landscape while you save humans from malevolent aliens.
  • Beat Streets: fight your way through a level, and defeat a notorious crime boss.
  • Eggzy: collect gems and survive as long as possible before time runs out.
  • Leading Edge: Race a car on a pseudo-3d race track.
  • Kinetix: Break bricks with your paddle, and use powerups to avoid various menaces.
LanguageEnglish
Release dateAug 28, 2024
ISBN9781916868052
Code the Classics Volume II
Author

Simon Brew

Simon Brew is the former editor and founder of Den of Geek - the popular culture news and reviews website. He is the author of three books including Movie Geek, TV Geek and The Secret Life of the Movies. Simon is also the founder of the magazine and podcast Film Stories.

Related to Code the Classics Volume II

Related ebooks

Programming For You

View More

Related articles

Reviews for Code the Classics Volume II

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Code the Classics Volume II - Simon Brew

    Chapter 1

    Block Breaker

    Demolishing a wall, brick by brick, with a ball is the simple idea behind the block breaker genre that became an arcade sensation around the world

    Block breaker games were an arcade mainstay from the mid to late 1970s, the most famous example being Atari’s Breakout – even though it wasn’t the first. An evolution of the classic bat-and-ball game Pong, the genre’s simple concept involves demolishing a wall of bricks using the ball.

    The massive success of Breakout spawned countless clones, along with an official sequel, Super Breakout, which added the option of having multiple balls simultaneously in play. By the early 1980s, the popularity of the genre was on the wane, but in 1986 Taito’s Arkanoid revitalised it with the addition of player power-ups, varying brick behaviour, and enemies.

    Inspiration

    Arkanoid was largely the creation of two young Japanese games designers, and childhood friends, Hiroshi Tsujino and Akira Fujita. The key to creating a good block breaker game is in the level design, which must be done just right to prove challenging and interesting enough, yet not impossible. To this end, Tsujino designed level maps on paper first, harking back to his younger days when he couldn’t even afford to play arcade games and so would make drawings based on them. The inspiration he drew, literally, led to a blockbuster hit in the arcades.

    Arkanoid

    A poster for Arkanoid showcases a vibrant and dynamic scene. On the left side, colorful stacks of blocks are positioned prominently, serving as the primary targets. The iconic Taito logo is displayed at the top right. From the bottom right, a ball is seen launching toward the blocks, leaving behind a trail that traces its path, indicating its movement and impact. The game’s title, Arkanoid, is dynamically presented in the bottom right corner. Below the main scene, backgrounds from five different levels available in the game are displayed, each offering a unique visual aesthetic to enhance the gameplay experience.

    One of Taito’s biggest arcade hits, Arkanoid spawned several sequels and numerous home conversions, including the modernised Arkanoid: Eternal Battle.

    Other Notables Breakout / Batty / Quester

    Legendary names in the history of technology such as Nolan Bushnell, Steve Wozniak, and Steve Jobs adorn the credits list for the 1976 arcade machine hit, Breakout.

    Moving things a slight jump on from the groundbreaking Pong, the idea underpinning Breakout was simple: at the top of the screen, some blocks. At the bottom, whatever you wanted to call a moving horizontal line. In between? The fundamental idea, use the ‘line’ (aka bat or paddle) to bounce the ball towards the top of the screen, with every block struck being destroyed. Clear the blocks, you win the level. The ball hits the bottom of the screen? There goes a life.

    Breakout gets the credit for being the first game of this ilk, and made its manufacturer, Atari, a lot of money. Yet you could charitably say it was following the path set by a lesser-known forerunner, Clean Sweep, a game that arrived two years before. The concept was and is so simple, though, that a swarm of imitators was inevitable, not least when Breakout became a huge early hit that remained ever-present in arcades for many years after its debut. Many would follow in its slipstream.

    Still, those imitators ran out of steam a little over the ensuing decade, washing in and out of trend as gaming evolved apace. Nevertheless, the powerful upgrade that the so-called ‘block breaker’ subset of games needed would arrive in something of a hurry. Furthermore, it would land via a couple of desks, one of which belonged a fast-rising developer named Hiroshi Tsujino. For a man who would describe himself as an unwelcome child to arcades in his youth, he was set to have quite the impact on them.

    Insects appeal

    Born and raised in the Japanese city of Takaoka, one of Tsujino’s early passions had nothing to do with games at all: he was an insects nerd. I was a bit of an insect expert, he admitted as he told his life story. Well, an insect expert who also loved watching television too.

    Inevitably, it was a television news bulletin in 1978 that alerted the young teenage Tsujino to the video game revolution: a game called Space Invaders was fast becoming a sensation. It even made it to his neck of the woods, as Tsujino’s local supermarket added an arcade area with a bunch of machines. One 100 yen coin later, and Tsujino had played Space Invaders for the first time, but certainly not the last.

    As a youngster, money was tight though, which meant that Tsujino would hang around the arcade watching others rather than play the games too often himself: hence, the ‘unwelcome child’ tag he gave himself in those establishments. He wasn’t alone though, and significant to this story, his love of arcades was shared by Akira Fujita. The pair had actually known each other since they were very young, but their firm friendship wouldn’t ignite until they discovered their shared love of games.

    Over time, both of them would find a way to fully break into that world too. They started by imitating what was there, with what they had at hand: no computers at home here, instead paper and pens. Tsujino would making drawings based on existing games, with Akira recording the sounds from the machines as well. All the while, they were building up their knowledge.

    The arcade cabinets of the game, Arkanoid. It comprises a label at the top, a display unit at the center, and a control knob at the bar top with several buttons. The cabinet on the right displays a pixelated view of stacks of blocks positioned prominently in the structure. Positioned at the bottom right of the screen is a horizontal paddle-like structure. A ball hits the paddle and rebounds diagonally towards the right side of the screen.

    1Arkanoid became a big hit in arcades worldwide

    They then started collecting gaming flyers from their local arcade, building up a memorabilia collection which sparked the idea of setting up a game club and a little publication of their own. They figured if they sent their 20-ish page mini-magazine to game manufacturers, they’d swiftly get a response. After all, who else was doing what they were trying to do at that time? Not many people, as it turned out.

    What they got from the manufacturers was not just more flyers for their collection, but corporate sponsorship too. Names such as Taito, Sega, Namco, and Nintendo were among those signing up to support their club and publication, much to the surprise of the pair. Things were beginning to escalate.

    Do it yourself

    In tandem with everything else exploding around the nascent gaming scene, this was also the era of design-a-game competitions. Gaming companies would spread the net wide for ideas, and invite contributions from players themselves: send in a good proposal and there was a solid chance it would at least get seen by somebody with the power to make it.

    Unsurprisingly, Tsujino was interested in such competitions, and proved really rather good at them. In fact, both he and Akira soon found themselves winning them independently of each other, and bringing in amounts of money that high-school students were unused to seeing. Pivotally, gaming manufacturers were noticing the pair as well, and were keen to meet them.

    When Tsujino graduated from high school, it was thus unsurprising that he wasn’t short of employment offers. By this stage he’d already made several trips to Tokyo to meet some of the companies interested in him, but with a bunch of options to select from, he zeroed in on his favourite: the now-legendary Taito.

    Big city

    Tsujino, just out of high school, was now working for one of his favourite companies. Akira too was instantly hired by Taito following graduation, and the pair moved to the big city pretty much straight away. This was in the first half of 1983. When they got to work? They weren’t working on arcade games: instead, they were put in front of an MSX home computer.

    The MSX was and is a curious machine. A big hit in Japan, but never one that made too much impact elsewhere in the world, it was an outlier of sorts in the 8-bit era. It resulted from a meeting of minds between Microsoft and the ASCII Corporation, launching in the autumn of 1983, with a steady flow of games from Tsujino and Akira.

    The pair did a mix of arcade conversations – including Elevator Action – and original titles for the new computer. Yet the MSX’s time in the limelight proved short-lived, and the department making games for it was soon folded as manufacturing of the computer itself was brought to a swift end. The pair were instead sent to the city of Yokohama to work for Taito’s arcade division, where a fresh challenge would soon await them.

    Taking minutes

    The genesis of classic video games is something of a dark art, and it’s sometimes tricky to identity the catalyst, the eureka moment, that led to one coming to life. In the case of Arkanoid, key pointers suggest that it was something really quite mundane: an internal meeting at Taito.

    By now we’re in early 1986, and there were rumblings that Breakout-style games were finally making a comeback. Those rumblings hadn’t made it to the Taito development teams, but elsewhere within the company, the sales department had its ear to the metaphorical ground. It wanted a new Breakout-style game, and it wanted it very, very quickly.

    By this stage, Tsujino had designed his first arcade game for Taito, a title by the name of The Fairyland Story. Taking a little bit of inspiration from Lode Runner, whilst adhering to the fixed screen mechanics that defined many Taito games of the era, it was a forerunner of sorts to the classic Bubble Bobble, albeit with liberal lashings of cake.

    The idea of making a Breakout variant, though? "The reaction of the development team, including myself, was ‘huh? Why Breakout now?’," Tsujino would admit. But the development team had been set a task. It was decided that everyone within Taito’s development department could and would submit a proposal for how to approach it. The two ideas that bubbled to the top? One from Akira, one from Tsujino. They were to work directly on the same commercial game for the first time, but before they could do so, their competing ideas needed to be unified.

    I was fed up with my boss's unreasonable request to ‘take the best parts of both proposals and put them together into one project’, Tsujino concedes. Yet they ended up doing just that, facing a deadly-looking deadline. What they brought together was a variant of Breakout that would add an enemy to battle, and add to the mix a host of collectable power-ups. These include being able to catch the ball, activating multiball, and arguably the most useful of all, your paddle doubling up as a laser gun to blast away the blocks. But heck, they didn’t have much time to complete the game.

    The arcade cabinet of the game, Arkanoid. It comprises a label at the top, a display unit at the center, and a control knob at the bar top with several buttons. The side of the cabinet reads, ROMSTAR with geometrical patterns at the top and bottom. The screen displays stacks of blocks positioned prominently. Positioned at the bottom left of the screen is a horizontal paddle-like structure. A ball hits the paddle and rebounds diagonally towards the right side of the screen.

    2The upright cabinet version of the Arkanoid coin-op

    A bit of a month

    On paper, it’s hard to disagree with Tsujino’s assertion that the schedule for what became Arkanoid was brutal. There was a core team of just four people working on the game (with the occasional bit of added help, not least on the audio side). To make things even trickier, Taito was also looking to keep costs lean on the hardware side.

    The spec of the printed circuit board (PCB) they were going to use for the game was therefore quite low, and there was an initial fear that the whole project was an impossible job. Then? Just for good measure, the ticking clock was thrown into the mix. We developed it in a short period of time that we had never experienced before, just one month with four people, Tsujino recalls.

    The cocktail cabinet of the game, Arkanoid. It comprises a wooden block with transparent glass at the top. The center of the screen has a display unit that displays Arkanoid with labels on the top and bottom.

    3The cocktail cabinet version of the coin-op proved popular

    As much as they tried to buy themselves more time, their requests for an extension were rejected by Taito bosses. They had no choice: they simply had to get on with it. Akira was put in overall charge of the project, with Tsujino supervising the graphics. There was much early experimentation involved too. This was to both work within and push at the limits of the PCB.

    There was an early decision to keep the blocks of the game nice and simple, making sure they were clear and obvious to the player. Not everyone agreed – there was some push to make them 3D rather than 2D, for instance – but Tsujino wanted them to be easy to distinguish, and he won that particular argument. He didn’t win every battle, though: he wanted blocks to all be the same colour too, and that’s how he initially designed things. Yet he was eventually overruled, very much against his wishes.

    Tsujino also freely admits that he took inspiration from a hit movie of the time for the tech-fused look of the game: Disney’s futuristic family film, TRON. Plus, there was a little bit of a trick that’s worth highlighting. The designs for the enemies in the game were originally done as 3D models. The limited tech afforded by the PCB meant they couldn’t appear in the game that way, and so they were then converted down to sprite art instead. Battling against tech limitations was a constant during development.

    The objectives

    In an in-game screenshot of the game, “Arkanoid,” positioned at the bottom left of the screen is a horizontal paddle-like structure. This paddle emits a soft, reddish glow along its edges. The screen comprises stacks of blocks positioned prominently in the center against a hexagonal grid background. Three balls at the top left to move across the stacks and hit them.

    4One of the power-ups in Arkanoid gives you multiple balls

    I remember trying and failing many times to express characters that were simple and inorganic but had complex movements, by actually rotating a model of an enemy character that rotated in 3D and drawing dots while doing so, Tsujino explains, adding that he was repeatedly sketching by hand to express wireframe-style pictures.

    A flyer titled “Arkanoid” is at the top and reads the features in Japanese.

    5A Japanese arcade flyer for Arkanoid

    Doh ray me

    The graphics were at least sorted when attention turned to the level design of the game. At the heart of Arkanoid is a similar mechanic to Breakout: a bat-and-ball game, where blocks must be busted and occasional added foes defeated. A small innovation was that some blocks needed to be hit multiple times before they’d disappear, an extra bit of work for the code to deal with. Plot-wise, there’s the dastardly Doh (long before Homer Simpson became synonymous with the same three letters), the end-of-level boss with the least sinister name in gaming history. The level design – and the third one was notoriously tricky – would all build towards the final confrontation with Doh at the end of the game.

    Tsujino estimates he did around two-thirds of the level design in all, and this is where his experience drawing pixel art and entering game competitions came in particularly useful. It’s an old trick that’s still worth trying today when developing your own game. He would come up with level ideas that he’d map out on paper, going back to the visuals he used to make when he couldn’t afford to play arcade games himself. He’d then hand those over to the programmer. Then, when he saw the coded version of his work, he’d play it and see how it felt in practice.

    It was a full-on time of his life. After returning home late at night, the metallic sound of the ball bouncing back and forth would ring in my head even while I was sleeping, he recalls of the game’s truncated development period. The core idea’s simplicity though, and the reluctance to overcomplicate graphics, meant the timelines could be hit. The game was playable in double-quick time.

    In an in-game screenshot of the game, “Arkanoid,” positioned at the bottom left of the screen is a horizontal paddle-like structure. The screen comprises colorful stacks of blocks that are positioned prominently, serving as the primary targets against a decorative grid-like background. The top shows the player scores and high score.

    6Arkanoid -style games include Batty on the ZX Spectrum

    In an in-game screenshot of the game, “Arkanoid,” positioned at the bottom right of the screen is a horizontal paddle-like structure. This paddle emits a soft, reddish glow along its edges. The screen comprises colorful stacks of blocks positioned prominently in rows, serving as the primary targets against a decorative grid-like background. A ball hits the paddle and rebounds diagonally towards the stacks. The top shows the current and high score; In an in-game screenshot of the game, “Arkanoid,” positioned at the bottom right of the screen is a horizontal paddle-like structure. The screen comprises colorful stacks of blocks that are positioned prominently, serving as the primary targets against a greenish background. Vertical shots from both ends of the paddle move across the stacks and hit them. The top shows the current and high score.

    7Different level layouts require thoughtful tactics and use of power-ups

    From the beginning of development to the first version of Arkanoid being put into the hands of testers had taken just a single calendar month. Arkanoid then went to a few test locations, and the early signs were that it was going to be a hit: in fact, a much bigger hit than Taito had been expecting.

    Haste

    Taito had wanted a block breaker game quickly, and duly got one. But even the sales department that had asked for what became Arkanoid would have been taken aback by the original tests that were done with the game. When it went into playtesting, the response was hugely positive. When it was formally launched in July 1986, 100 yen coins were being spent on it in sizeable quantities.

    At the time, I didn’t think the game would create a boom, Tsujino admits. But create a boom it did. Arkanoid would become one of the most successful arcade games of 1986 across the world, its success bleeding into 1987 too. Home computer conversions would follow, as would a fast-turnaround sequel, Arkanoid: Revenge Of Doh, that repeated the success of the original (produced by a different team).

    Hiroshi Tsujino would get married shortly after the completion of the game, and take a honeymoon in Hawaii. What did he discover there? Somebody playing on an Arkanoid arcade cabinet. It was like I was making my world debut, he laughs.

    An in-game screenshot of the game, “Arkanoid.” A vibrant rectangular boundary against a dark background shows the score, high score, and round at the right. Inside the boundary are colorful stacks of blocks that are positioned prominently, serving as the primary targets against a reddish background. Positioned at the bottom right is a horizontal paddle. Balls from the paddle rebound towards the right side of the screen to the stacks.

    8The ZX Spectrum version of Arkanoid

    Blocking on

    Tsujino and Akira would soon go their separate ways. Tsujino stayed in Japan for his next project, the wildly ambitious Ninja Warriors (it was three times harder, he notes), but after a few further years, he got the opportunity to work for Taito’s Chicago office in the USA instead. Not speaking English, and having never been to mainland USA by himself, he jumped at the chance. He’d spend just over a decade in America, before being lured back to Japan by a role at Sammy, which in turn merged with Sega. More recently, he’s been working on games for smartphones, and for the Nintendo Switch console.

    An in-game screenshot of the game, “Arkanoid.” A vibrant square boundary against a dark background reads the title, high score, and player 1 and player 2 with respective scores at the right. Inside the boundary are colorful stacks of blocks that are positioned prominently, serving as the primary targets against a rustic background. Positioned at the bottom is a horizontal paddle. Balls from the paddle rebound towards the stacks.

    9Other home versions included this one for Commodore 64

    Akira Fujita moved straight onto another much-loved coin-op, the shoot-’em-up Darius for Taito. If Arkanoid had been up against technical restrictions, Darius was pushing the other way: the arcade cabinet boasted a game screen that was spread across three CRT displays, making it in turn three times wider than its contemporaries. Then, having put a fresh spin on a block-busting game, he was one of the team who made Raimais, a title that bore more than a passing resemblance to Pac-Man.

    Doh-minance

    As for Arkanoid itself, it had another knock-on effect. If there’d been any doubts that block breaker games were coming back into vogue, the sensational success of Arkanoid smashed them to bits. As well as the direct sequel – which arguably improved on the award-winning original – further imitators sprung up at speed.

    Perhaps the best of them was Batty, a British home computer Breakout clone that arrived in 1987, but whose initial commercial release was held up for undisclosed reasons. In spite of rave reviews, it slipped out on a six pack of games initially, rather than its expected full price standalone release. Speculation was rife that its perceived closeness to Arkanoid had caused a problem, yet it was ultimately released, and subsequently given away free on a magazine cover-tape too.

    The number of games that bear the Arkanoid name meanwhile has hit double figures over the past 35 years or so. Intrinsically, there’s something simple about the heart of the game that Akira and Tsujino latched onto: the foundation of a bat-and-ball game goes to the very infancy of gaming, and in itself isn’t too tricky to code. Coming up with the extra features and the points of distinction? Well, that’s what happened with Arkanoid, a game whose third level remains as difficult as

    Enjoying the preview?
    Page 1 of 1