Chapter 2.12 --- Extra Credit

Write a 2D Game

"Going to dance at my wake?"

"I don't dance," the lawyer answered, "but you tempt me to learn."

Robert A. Heinlein, I Will Fear No Evil

Hopefully you've had a lot of fun writing and playing your own Text Adventures and MUD-like online games; but in today's gaming world, you may be hard-pressed to get your friends excited about working at the command line or out of a MUD console to try your new game. So now it's time to make a paradigm shift and start thinking about graphics and user interfaces.

We already have a game engine to work with, but it needs some major overhaul before we can write our first 2D game. We also have to determine what we mean by 2D game, since there are so many varieties to choose from---room-based graphical adventures, like the old Sierra classics; side-scrollers, like the old Nintendo games; rogue-likes; the list goes on. It would be useful if we could abstract all these different styles into our engine, so that we can use it to build all these different styles of 2D games. Luckily, we're working with Lisp, and that's exactly what it was made for: endless abstraction.

To support our endless whims and fancies, we will be using the lispbuilder-sdl library in our extended game engine, one of the better Lisp libraries available for working with graphics, audio, and all things gaming. We will also be generating our graphics and environments procedurally, so that we can use a minimum of assets and textures from open-source graphic libraries.

Exercise 2.12.1


Exercise 2.12.2

The Display

Exercise 2.12.3

Display Types

Exercise 2.12.4

Clearing and Redrawing the Display

Exercise 2.12.5

Display Buffering and Memory

Exercise 2.12.6


Exercise 2.12.7

More Audio

Exercise 2.12.8

Even More Audio

Exercise 2.12.9


Exercise 2.12.10

Graphics and Other Resources

Exercise 2.12.11


Exercise 2.12.12

Procedural Content Generation

Exercise 2.12.13

Game Physics

Exercise 2.12.14

The Game Loop

Exercise 2.12.15


Exercise 2.12.16

More Input

Exercise 2.12.17


Exercise 2.12.18

More Fonts

Exercise 2.12.19

The 2D Game Engine

Exercise 2.12.20

Abstractions of Rooms and Worlds

Exercise 2.12.21

Tidy Game Scripts

results matching ""

    No results matching ""