Skip to content

Instantly share code, notes, and snippets.

Programming is for AIs. Let's go shopping.


  • Germany
Block or report user

Report or block tomaes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tomaes / digitreaction.bas
Created May 20, 2019
Another tiny game; this time in IchigoJam BASIC. Press the right key, don't press the wrong key. Hurry to make it to 1k points.
View digitreaction.bas
1 'digit reaction
10 CLV
20 R=0
22 X=RND(28)
23 C=RND(9)+48
30 LC X,23: ?CHR$(C)
33 R=R+1: S=S-R
40 K=INKEY(): IF K=0 GOTO 30
50 IF K<>C S=S-200: LC X,23: ?"NOPE!": GOTO 30
60 S=S+150: ?"SCORE:";S
View fluffy.bas
10 REM フワフワ GW-BASIC port /w sound
12 XM=80: YM=24: X=XM/2: Y=1: OC=239: L=30
14 B=INT(RND*(XM-L*2))+L: SOUND 200,.5
15 UP=0: L=30-S/10: IF L<1 THEN L=1
17 A$=INKEY$: X=X+(A$="a")-(A$="s")
18 IF SCREEN(Y+1,X)=OC THEN Y=Y+1: SOUND 800,1
20 IF X<1 OR X>XM OR Y<1 OR Y>YM THEN 30
tomaes / colorconfusion.bas
Last active May 21, 2019
The Commodore Plus/4 supports 121 colors. Let's use 3 of them for a micro game. Quickly press the first letter of the color shown (not the color word displayed)
View colorconfusion.bas
10 vol 5
12 s=999: r=0
20 a$(0)="black": a(0)=1
22 a$(1)="grey ": a(1)=2
24 a$(2)="red ": a(2)=3
30 r=r+1
32 c=int(rnd(1)*3)
33 d=int(rnd(1)*3)
35 color1,a(d),5: printa$(c);
38 n=0: e=0
tomaes / whatsmore.rb
Last active May 17, 2019
Unicode-enhanced Ruby version of whatsmore.bas
View whatsmore.rb
# What's more?
# a quick guesstimation game
# (unicode-enhanced Ruby version, aka first Ruby test)
require 'time'
cont = true
r = 0
t =
tomaes / whatsmore.bas
Last active May 9, 2019
Started as a qb.js experiment, but it so happens that qb.js is a very limited implementation of QBasic. Had to go back to the real thing.
View whatsmore.bas
' What's more? (v1.1)
' a quick guesstimation game in QBASIC
' (slightly extended version, won't run in qb.js)
DIM c%(2): cont% = 1: r% = 0: bchar% = 97 '97 = a,b / 48 = 0,1
tomaes / sumofparts.bas
Created May 2, 2019
Miniature Edutainment Game in GW-BASIC. A minor tribute to the first programming language I came in contact with. Back when Pangea was still a thing. ;)
View sumofparts.bas
110 REM the sum of parts. GW-Basic edition
120 A$ = ""
130 FOR I=0 TO 19
140 N% = INT(RND(1)*10)
150 S% = S% + N%
160 A$ = A$ + CHR$(48+N%) + "+"
170 NEXT
180 A$ = LEFT$(A$,LEN(A$)-1) + "="
190 CLS: LOCATE 12,1: PRINT A$
tomaes / minesonar.lua
Last active May 9, 2019
the same minesonar.bas micro game in LUA
View minesonar.lua
-- minesonar.bas in Lua (aka first Lua test, v2)
r, x, y = 0, math.random(8), math.random(8)
print "There is a mine hidden in an 8x8 field"
r = r + 1
tomaes / minesonar.bas
Created Apr 26, 2019
Another micro game (\o/): uncover a mine as quickly as possible. Enter coordinates, get the distance back. (c64/vic20 et al.)
View minesonar.bas
0 x=int(rnd(1)*9):y=int(rnd(1)*9):print"where is the mine? enter x,y coords"
1 r=r+1:inputa,b:d=sqr(((x-a)*(x-a))+((y-b)*(y-b))):print"dist:"d:ifd>.1then1
5 print "done in"r"rounds!":ifr<4thenprint"wow!"
tomaes / c64romandkernal.bas
Last active Apr 22, 2019
A tiny program (with some fancy output) to detect a (classic) C64 OS/KERNAL and its version (well, v3 only, but hey...). Works on all(?) 8bit CBM machines.
View c64romandkernal.bas
0 c=-(peek(58504)=54): poke1024,.: k=-((peek(55296)and15)=14)
1 print"c64:"chr$(16*c+99),"kernal v3:"chr$(16*k+99)
tomaes / blocktumble.txt
Last active Apr 20, 2019
a few notes on block tumble!
View blocktumble.txt
"Block Tumble!" is a humble Commodore 64 puzzle game from 1991 in 2KBytes; it features 56(!) levels.
Here are some random notes I took while poking around in memory...
- the level encoding is fixed: 18 Bytes x 56 = 1008 Bytes
- the level data starts at 0BF9 (in memory), or at 03FA (file offset)
- a better, flexible encoding of the level data should take around ~870 Bytes
(assuming a not-too-crowded field in most levels and on average at least 8 wall stones)
(also: discussing level encoding should be a separate post, as there are MANY options :))
You can’t perform that action at this time.