3 ms·
You may want to give Batari Basic a look. In the early 00's one enthusiast had the idea to make a simple BASIC compiler for the 2600. I was one of the early t
by ddingus 3y ago
You may want to give Batari Basic a look.
In the early 00's one enthusiast had the idea to make a simple BASIC compiler for the 2600. I was one of the early testers and the first thing I did was make a functional "BREAKOUT", bounce the ball off the bat to eliminate bricks in a wall game.
It took a couple hours and was, I think, the first (and buggy) playable program authored by someone other than the language author. And it was fun!
What the author did was kind of brilliant in that he packaged up several of the common tricks used to make games and presented them along with a simple BASIC.
Variables, for example, were just bytes and or individual bits, essentially addressing bits in a byte like an array.
J = %01101101
If J[2] = 0 then X = X +1
Here is a sample program to move a sprite around on the screen:
x=50
y=50
main2
COLUP0=28
COLUBK=02
player0:
%00011100
%00011000
%00011000
%00100000
%01011010
%01111100
%00100100
%00010000
%00011000
%00111100
%00011000
end
player0x=x
player0y=y
drawscreen
if joy0right then x=x+1
if joy0left then x=x-1
if joy0up then y=y-1
if joy0down then y=y+1
goto main2
On the VCS, a game is a loop that renders the display and in-between display frames, during VBLANK, one computes the next game state to be displayed, and it all runs at 50 or 60Hz, locked to the display refresh rate.
The BASIC exposes the little bit of hardware to a programmer in a simple way that I found to be a lot of fun because the really hard parts of assembly language are not necessary, but can be written in-line just as easily as defining a sprite is:
asm
LDA J
ASL
ASL
.
.
.
end
Any hoo, it was fun and surprisingly productive. I found I could knock out simple concepts in an hour or two.
- ddingus 3y agoI just now recalled the author of Batari Basic, and he is Fred Quimby. That bothered me, and now it does not. Fred did a lot of great work along with some others to create both Batari Basic and the Harmony cartridge, both of which mean mere mortals can have a little fun programming for the 2600.