Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 22.5 ('Gyroscope')
Instant purchase and download via GumRoad!

FEATURE

Invaders from Space!

Creating a retro game in Xojo

Issue: 22.5 (September/October 2024)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 41,775
Starting Page Number: 36
Article Number: 22504
Resource File(s):

Download Icon project22504.zip Updated: 2024-09-02 10:58:51

Related Web Link(s):

http://xdevmag.com/downloads/invaders.m4v

Excerpt of article text...

If you've been on the planet for a while, you have probably heard of the classic game Space Invaders (https://en.wikipedia.org/wiki/Space_Invaders), one of the first video games ever made. Depending on your age, you may not have actually played it, though. It's actually old even for me—I didn't get into computers until the 1980s.

The original game was simple, featuring black and white graphics and rows of alien ships that gradually descend closer to your ship, which is fixed at the bottom of the screen (see Figure 1). You can only move horizontally and fire straight upward. If an alien ship crashes into your ship, you lose a life.

My favorite of this style of game was Galaga (https://en.wikipedia.org/wiki/Galaga), a sequel/clone that had color graphics and a variety of alien ships that moved in different ways and had additional capabilities.

When I decided to write my own Invaders in Xojo (Hey, it's summer!), it seemed so simple. Since I was just fooling around and testing the idea, I didn't do any research and relied on my own (faulty) memory of the original game.

Thus, I got confused between the capabilities of the two games. I originally thought of enabling dive-bombing alien ships, like in Galaga, but later realized that wasn't part of the original game, so I didn't implement that feature. (As you'll see, however, the game is built so you can add that if you'd like.)

That's also why my game isn't really a clone. I didn't try to mimic the original graphics or style; it's just a similar game. However, it turns out to be surprisingly fun and capable, and I'm pleased with how it turned out.

...End of Excerpt. Please purchase the magazine to read the full article.