This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 'ラン | IchigoJam BASIC | |
12 CLS | |
13 CLT | |
14 Y=12 | |
20 LC 4,Y | |
22 ?CHR$(251) | |
26 LC 28,RND(23) | |
28 ?CHR$(6);CHR$(6);CHR$(6) | |
30 SCROLL 3 | |
33 Y=Y-BTN(UP)+BTN(DOWN) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 ' What's more? in ICHIGO JAM BASIC | |
10 S = 6: Z = 1: R = 0 | |
12 Q = RND(4) | |
20 IF Q = 0 B=225 | |
22 IF Q = 1 B=228 | |
23 IF Q = 2 B=236 | |
24 IF Q = 3 B=250 | |
30 CLT | |
40 : | |
50 CLS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 REM フワフワ GW-BASIC port /w sound | |
11 CLS: RANDOMIZE TIMER | |
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 | |
16 LOCATE YM,B: PRINT CHR$(OC) | |
17 A$=INKEY$: X=X+(A$="a")-(A$="s") | |
18 IF SCREEN(Y+1,X)=OC THEN Y=Y+1: SOUND 800,1 | |
19 IF SCREEN(Y,X)=OC THEN GOSUB 40 ELSE Y=Y+1 | |
20 IF X<1 OR X>XM OR Y<1 OR Y>YM THEN 30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# What's more? | |
# a quick guesstimation game | |
# (Emoji-enhanced Ruby version) | |
require 'time' | |
cont = true | |
r = 0 | |
t = Time.now.to_f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' 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 | |
CLS | |
RANDOMIZE TIMER | |
t = TIMER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 REM the sum of parts. GW-Basic edition | |
120 A$ = "" | |
125 RANDOMIZE TIMER | |
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$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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" | |
repeat | |
r = r + 1 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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... | |
observations: | |
- 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 :)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 fori=.to7step2:m(i)=i+2:m(i+1)=i+2:next:r=1 | |
1 forj=.to9:fori=.to7:a=int(rnd(.)*8):h=m(i):m(i)=m(a):m(a)=h:nexti,j | |
2 print"#:"r:fori=.to7:printi;chr$(63+(m(i)<0)):next | |
3 r=r+1:input"cards";a,b:if(a=b)or((m(a)orm(b))<0)goto3 | |
5 printchr$(13)m(a)m(b)chr$(13):ifm(a)=m(b)thenm(a)=-m(a):m(b)=-m(b) | |
8 s=.:fori=.to7:s=s+m(i):next:if(s>-40)goto2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fragment shader one-liners | |
// note: some might break for timing reasons (iDate.a/iDate.w) and some for compatibility reasons ("f+=" on a Mac, f.e.) | |
// | |
// void mainImage( out vec4 f, vec2 p ) | |
// and then... | |
// "flames (red)" | |
{f=vec4(p.x/p.y*mod(sin(p.x-iDate.a),.001*length(p-.9)),.2,.5,1.0);} | |
// "rain (small)" |