After enough new knowledge is covered I write a complete game to utilize several of the techniques to illustrate how it all comes together so each new complete project is more complex than the one before. I do cover only Commander X16 specific so I recommend reading Commodore C64 BASIC tutorials and guides.
Please note that the games and most examples are written with a goal to be as clearly readable and understandable so there is very little source code optimizations.
Crazy Snake
This game is written in very clean BASIC with very little trickery so not much special Commander X16 knowledge is required. We do VPOKE directly into video memory so only understanding of fundamentals is required.
Recommended reading
VERA Overview
Topics Covered in Game
Analyzing the game itself is a great way to learn basics like:
- How to structure source code (outer loops, game loop)
- What is Game loop
- Use of Data structure like multiple Arrays
- How to read Joystick, Keyboard
- How to use VPOKE to “talk to” VERA
- Video RAM organization and using colors
- Writing to certain location on the screen
- Using PETSCII control characters to display messages and title screen
Try me!
Tetris Clone
This game introduces some more advanced features of Commander X16 and we have to take a bit more care of how to use data structures and optimize some parts of the game to make it playable.
Recommended reading
VERA Overview
Tiles in Basic I - Video Modes 0 and 1
Colors and Palettes
Topics Covered in Game
Tetris clone requires us to improve on pretty much all parts of the snake game structure:
- We have additional loops outside and inside game loop
- Advanced game collisions based on screen state
- Pre-calculate relative positions of four segments of each tetromino
- Customize color palette
- Customize tiles (characters)
- Speed increase per level
- Adding sound to the game
GOTO Crazy Tetrominoes Tutorial
Try me!
Boulder Dash style game
With this game we are using most of the Commander X16 hardware capabilities and we are getting close to squeezing most out of it for BASIC games. We have to pay close attention to timings, synchronizing scrolling and animation, take care of different types of collisions, etc.
Recommended reading
VERA Overview
Tiles in Basic I - Video Modes 0 and 1
Sprites in Basic I - Setup
https://www.8bitcoding.com/p/sprites-in ... Animation
Scrolling and Layers in BASIC
Colors and Palettes
Simplest Sound Effects Library for BASIC
Font Library for Commander X16
Topics Covered in Game
This game is taking advantage of hardware features of Commander X16 to the level it almost looks like 16bit game or something written in Assembly for 8 bit computer like:
- Two phase approach to development
- Full color mode
- Full screen scrolling
- Two layer graphics
- Scrollable playfield
- Static HUD
- Animated full color sprites
- 256 color title screen in graphics mode
- Advanced physics and game mechanics
- Loading assets to memory from binary files for:
- Tileset
- Sprite Sheet
- Fonts
- Sound effects library
- Title screen
Try me!
Lunar Lander style game
With this game we are using most of the Commander X16 hardware capabilities and we are getting close to squeezing most out of it for BASIC games. Due to pixel perfect collision detection requirement we had to use small machine code routine.
Recommended reading
VERA Overview
Tiles in Basic I - Video Modes 0 and 1
Sprites in Basic I - Setup
https://www.8bitcoding.com/p/sprites-in ... Animation
Scrolling and Layers in BASIC
Colors and Palettes
Music Player Library for BASIC Programs
Font Library for Commander X16
Topics Covered in Game
This game is taking advantage of hardware features of Commander X16 to the level it almost looks like 16bit game or something written in Assembly for 8 bit computer like:
- Integration of machine code, Assembly source code is available
- Full color mode
- 256 Color Title screen
- Two layer graphics
- Bitmap background
- Tile based HUD
- Full color sprites
- Advanced physics and game mechanics
- Loading assets to memory from binary files for:
- Tileset - fonts
- Sprite Sheet
- Background music
- Title screen
GOTO Crazy Lander Tutorial
Try me!