Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
SigmaSkibidiNumbers authored Nov 20, 2024
1 parent db8e605 commit b12b1fa
Showing 1 changed file with 296 additions and 0 deletions.
296 changes: 296 additions & 0 deletions games/SigmaLand.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
/*
First time? Check out the tutorial game:
https://sprig.hackclub.com/gallery/getting_started
@title: SigmaLand
@author:
@tags: []
@addedOn: 2024-00-00
*/

const player = "p"
const coin = "c"
const brick = "b"
const switches = "s"
const obstacle = "o"
const portal = "m"
const portall = "n"
const portalll = "v"
const portallll = "z"
const portalllll = "x"


setLegend(
[ player, bitmap`
......33333.....
......6660......
......6666......
....77722777....
..777777777777..
..777775777777..
.77.77777777.77.
.77.77757777.77.
.66.77777777.66.
.66.FFFFFFFF.66.
....FFFFFFFF....
....FF....FF....
...FF......FF...
...FF......FF...
...00......00...
...000.....000..` ],
[ coin, bitmap`
................
....00000000....
...0066666220...
..066666666220..
.00666602666220.
.06666602666620.
.06666600666620.
.06666600666660.
.06666600666660.
.0F666600666660.
.0FF66600666660.
.00F66600666600.
..0FFF66666660..
...00F6666600...
....00000000....
................` ],
[ brick, bitmap`
CCCCC1CCCCC1CCCC
CCCCC1CCCCC1CCCC
1111111111111111
CC1CCCCC1CCCCC1C
CC1CCCCC1CCCCC1C
1111111111111111
CCCCC1CCCCC1CCCC
CCCCC1CCCCC1CCCC
1111111111111111
CC1CCCCC1CCCCC1C
CC1CCCCC1CCCCC1C
1111111111111111
CCCCC1CCCCC1CCCC
CCCCC1CCCCC1CCCC
1111111111111111
CC1CCCCC1CCCCC1C` ],
[ switches, bitmap`
................
................
................
................
................
..000000000000..
..0C33111144D0..
..0C33111144D0..
..0C33111144D0..
..0C33111144D0..
..000000000000..
................
................
................
................
................` ],
[ obstacle, bitmap`
................
................
................
....LLLL111.....
...LLLLLL11.....
...LLLLLLL11....
..LLLLLLLLL1....
..LLLLLLLLL11...
.LLLLLLLLLLL1L..
.LLLLLLLLLLLLL..
.LLLLLLLLLLLLL..
LLLLLLLLLLLLLLL.
0LLLLLLLLLLLLLL.
00LLLLLLLLLLLLL.
0000LLLLLLLLLLLL
00000LLLLLLLLLLL` ],
[ portal, bitmap`
................
.....577777.....
....55777775....
....57722277....
...5572222275...
...5572222275...
...5572222275...
...5572222275...
...5572222275...
...5572222275...
...5572222275...
...5572222275...
....55722275....
....55777775....
.....555555.....
................` ],
[ portall, bitmap`
................
.....C99999.....
....CC99999C....
....C9922299....
...CC9222229C...
...CC9222229C...
...CC9222229C...
...CC9222229C...
...CC9222229C...
...CC9222229C...
...CC9222229C...
...CC9222229C...
....CC92229C....
....CC99999C....
.....CCCCCC.....
................` ],
[ portalll, bitmap`
................
.....D44444.....
....DD44444D....
....D4422244....
...DD4222224D...
...DD4222224D...
...DD4222224D...
...DD4222224D...
...DD4222224D...
...DD4222224D...
...DD4222224D...
...DD4222224D...
....DD42224D....
....DD44444D....
.....DDDDDD.....
................` ],
[ portallll, bitmap`
................
.....H88888.....
....HH88888H....
....H8822288....
...HH8222228H...
...HH8222228H...
...HH8222228H...
...HH8222228H...
...HH8222228H...
...HH8222228H...
...HH8222228H...
...HH8222228H...
....HH82228H....
....HH88888H....
.....HHHHHH.....
................` ],
[ portalllll, bitmap`
................
.....F66666.....
....FF66666F....
....F6622266....
...FF6222226F...
...FF6222226F...
...FF6222226F...
...FF6222226F...
...FF6222226F...
...FF6222226F...
...FF6222226F...
....F6222226F...
....FF62226F....
....FF66666F....
.....FFFFFF.....
................` ]
)

setSolids([player, brick, obstacle])


let level = 0
const levels = [
map`
pbbs..bb.bvbbx
.bb.b.bb.bb..m
.bb.b....bb.bb
.bb.bbbb.bb...
.bb.bbbb.bnbb.
.bb.....obbbb.
.bbbbbbb...bb.
.......o...bzb`,
map`
pbbbbb.bbb.bbb
.bbbbb..s..bbm
.bbbbb.bbb.bbv
.bbbbb.bbb.bbz
.bbbbb.bbb.bbx
.b.bbbobbbobbb
..o..o.....bbn
b..bbbbbbb.bbb`,
map`
pb.bbb.bbbbbbb
.b.s.b...bbbbz
.b.b.bob.bbbbx
.b.b.b.b.bbbbm
.b.b.b.b.bbbbn
.bobob.b.bbbbb
........o..bbv
bbbb.bbb.bbbbb`,
map`
po...b......bb
bbb.bb..bbb.bx
bbb.bb.b..o.bv
bb..bb.b..o.bm
bb.bbb.b.boobn
bbo..b.b.bbbbb
bb.bo.obo..bbz
bbbb...b.sbbb.`,
map`
nbbbbbbbbbbb.b
z..........o.s
bobbbbbbbbbb.b
b.bpbbb...bbob
b.b.o........v
b.bbbbbbbbbbbb
b..........bbx
m.bbbbbbbbbbbb`,
map`
p.............
..............
..............
..............
bbbbbbbbbbbbbb
p......o.....p
bbbbbbbbbbbbbb
bsbobmnvzxbpbc`
]

setMap(levels[level])

setPushables({
[player]: [obstacle]
})

onInput("d", () => {
getFirst(player).x += 1
})
onInput("a", () => {
getFirst(player).x -= 1
})
onInput("s", () => {
getFirst(player).y += 1
})
onInput("w", () => {
getFirst(player).y -= 1
})
onInput("j", () => {
if (getFirst(player).x === getFirst(switches).x && getFirst(player).y === getFirst(switches).y)
clearTile(11,6), clearTile(12,6)
})
onInput("k", () => {
setMap(levels[0])
})



afterInput(() => {
if (getFirst(player).x === getFirst(portal).x && getFirst(player).y === getFirst(portal).y)
setMap(levels[1])
if (getFirst(player).x === getFirst(portall).x && getFirst(player).y === getFirst(portall).y)
setMap(levels[2])
if (getFirst(player).x === getFirst(portalll).x && getFirst(player).y === getFirst(portalll).y)
setMap(levels[3])
if (getFirst(player).x === getFirst(portallll).x && getFirst(player).y === getFirst(portallll).y)
setMap(levels[4])
if (getFirst(player).x === getFirst(portalllll).x && getFirst(player).y === getFirst(portalllll).y)
setMap(levels[5])
})

0 comments on commit b12b1fa

Please sign in to comment.