umbenennen

This commit is contained in:
2026-10-29 23:02:16 +01:00
parent f1cc775715
commit db1daac391
6 changed files with 0 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
# Spielbescheibung Jump n Jump
## Grobe Idee:
In diesem Spiel steuere ich einen Ball, der über eine Bahn geführt werden will, die von rechts nach links scrollt (bzw. später auch in die andere Richtung. Ggf. geht es nach oben. der Ball hüpft dabei immer mit einer kleinen initialen Kraft und verbraucht somit minimal Energie.
Um Hindernisse zu überwinden muss der Ball mehr Energie aufwenden. Dieses kann ich als Spieler einstellen indem ich die Pfeiltaste nach unten drücke. Je länger ich drücke, um so mehr Kraft habe ich (und verbrauche ich dann auch).
Auf der Strecke kann ich zusätzlich Energie einsammeln. Ich muss immer auf der Plattform bleiben. Falle ich aus dem Bild, ist das Spiel auch zuende. Erreiche ich bestimmte Punkte, so kann ich an diesen Stellen "respawnen". Treffe ich auf was Spitzes, platzt der Ball.
+122
View File
@@ -0,0 +1,122 @@
pico-8 cartridge // http://www.pico-8.com
version 42
__lua__
function _init()
game_over=false
make_cave()
make_player()
end
function _update()
if (not game_over) then
update_cave()
move_player()
check_hit()
else
if (btnp(5)) _init()
end
end
function _draw()
cls()
draw_cave()
draw_player()
if (game_over) then
print("game over!",44,44,7)
print("your scrore:"..player.score,34,54,7)
print("press ❎ to play again!",18,72,6)
else
print("score:"..player.score,2,2,7)
end
end
-->8
function make_player()
player={}
player.x=24
player.y=60
player.dy=0
player.rise=1
player.fall=2
player.dead=3
player.speed=2
player.score=0
end
function draw_player()
sprite=1
if (game_over) then
sprite=player.dead
elseif (player.dy<0) then
sprite=player.rise
else
sprite=player.fall
end
spr(sprite,player.x,player.y)
end
function move_player()
gravity=0.2
player.dy+=gravity
if (btnp(⬆️)) then
player.dy-=3
sfx(0)
end
player.y+=player.dy
player.score+=player.speed
end
function check_hit()
for i=player.x,player.x+7 do
if (cave[i+1].top>player.y) or (cave[i+1].btm<player.y) then
game_over=true
sfx(1)
end
end
end
-->8
function make_cave()
cave={{["top"]=4,["btm"]=119}}
top=45
btm=85
end
function update_cave()
if(#cave>player.speed) then
for i=1,player.speed do
del(cave,cave[1])
end
end
while (#cave<128) do
local col={}
local up=flr(rnd(7)-3)
local down=flr(rnd(7)-3)
col.top=mid(3,cave[#cave].top+up,top)
col.btm=mid(btm,cave[#cave].btm+down,124)
add(cave,col)
end
end
function draw_cave()
top_color=5
btm_color=5
for i=1,#cave do
line(i-1,0,i-1,cave[i].top,top_color)
line(i-1,127,i-1,cave[i].btm,btm_color)
end
end
__gfx__
0000000000aaaa0000aaaa0000888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000aaaaaa00aaaaaa008888880000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00700700aa0aa0aaaa0aa0aa88888888000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00077000aaaaaaaaaaaaaaaa88988988000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00077000aaaaaaaaaaaaaaaa88888888000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00700700aa0000aaaaa00aaa88899888000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000aa00aa00aa00aa008988980000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000aaaa0000aaaa0000888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__sfx__
000400001105012050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000a00002c05000000260501e0001f050070400704008040070300803008030070300801008010070100700000000000000000000000000000000000000000000000000000000000000000000000000000000000
+63
View File
@@ -0,0 +1,63 @@
pico-8 cartridge // http://www.pico-8.com
version 43
__lua__
-- game main loop
game_state={
state = 1 -- 1: title 2: game 3: over
}
function _init()
end
function _update()
-- update game_objects
for object in all(game_objects) do
object:update()
end
end
function _draw()
-- draw game_objects
for object in all(game_objects) do
object:draw()
end
end
-->8
-- game objects
game_objects={}
--[[ template:
function make_object(_x,_y)
local object={
x=_x,
y=_y
}
function object:update()
end
function object:draw()
spr(1,x,y)
end
add(game_objects, object)
return object
end
--]]
__gfx__
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+106
View File
@@ -0,0 +1,106 @@
pico-8 cartridge // http://www.pico-8.com
version 43
__lua__
-- game main loop
game_state={
state = 1 -- 1: title 2: game 3: over
}
function _init()
bx = 0
by = 0
map_x=0
map_y=0
finex=0
finey=0
end
function _update()
-- update scrolling
finex -=1
if finex<-8 then
finex=0
bx +=1
end
map_x=map_x+finex
-- update game_objects
for object in all(game_objects) do
object:update()
end
end
function _draw()
cls(12)
-- draw background
map(bx,by,finex,map_y,17,10)
map(0,16,0,80,16,6)
-- draw game_objects
for object in all(game_objects) do
object:draw()
end
end
-->8
-- game objects
game_objects={}
--[[ template:
function make_object(_x,_y)
local object={
x=_x,
y=_y
}
function object:update()
end
function object:draw()
spr(1,x,y)
end
add(game_objects, object)
return object
end
--]]
__gfx__
00000000bbbbbbbb4444444499999999000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000333b33334a44444a9aaaaaa9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
007007003b3333b344444a449aaaaaa9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0007700044444444444444449aaaaaa9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00077000444a444444a444449aaaaaa9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00700700444444a44444a4449aaaaaa9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000004a44a444444444a49aaaaaa9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000004444444444a4444499999999000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__map__
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000010100000000000000000000000000000000000000000000000101010101010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010101010000
0000000000000000020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000001010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010101000000010000
0000000000000000000000000000000000000000000000000000010101010100000000000000000000010101010000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010100000000000000010000
0000000000010100000000000000010101010100000000000000000000000000000000000000000000000000000000000001010100000000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000000000000000000000000010000
0000000000020200000000000000020202020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010100000000000000000000000000010000
0101010101020201010101010101020202020201010101010100000000000001010101000000000000000001010101010100000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000101010101000000000000000000000000000000010000
0202020202020202020202020202020202020200000202020200000000000002020202000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100010101010101010101010100000000000000000000000000000000000000000000000001
0000000000000000000000000000000000000000000000000000000000000000000000000000010101010101010101010101010101010101010101010000000000000000000000000000000000000000000001010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000010101010101000000000000000000000001010101010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000010101010101000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0303030303030303030303030303030300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0303030303030303030303030303030300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0303030303030303030303030303030300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0303030303030303030303030303030300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0303030303030303030303030303030300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0303030303030303030303030303030300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+47
View File
@@ -0,0 +1,47 @@
pico-8 cartridge // http://www.pico-8.com
version 43
__lua__
-- main program block
function _init()
mode = 1
end
function _update()
if (mode == 1) then
if (btnp(5)) mode = 2
elseif (mode == 2) then
if (btnp(5)) mode = 3
end
end
function _draw()
cls()
if (mode == 1) then
title()
elseif (mode == 2) then
print("press 'x' to win")
else
end_screen()
end
end
function title()
x=60
y=60
print("press 'x' to start game")
print("\^o8ffhello world",x,y,10)
end
function end_screen()
print("a winner is you")
end
__gfx__
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+101
View File
@@ -0,0 +1,101 @@
pico-8 cartridge // http://www.pico-8.com
version 43
__lua__
-- game main loop
game_state={
state = 1 -- 1: title 2: game 3: over
}
function _init()
make_player(60,60,1)
end
function _update()
-- update game_objects
for object in all(game_objects) do
object:update()
end
end
function _draw()
cls()
-- draw game_objects
for object in all(game_objects) do
object:draw()
end
end
-->8
-- game objects
game_objects={}
object_type={
player=1,
plattform=2,
ruby=3
}
-- player class:
function make_player(_x,_y,_sprite)
local object={
x=_x,
y=_y,
sprite=_sprite,
obj_type=object_type.player
}
function object:update()
if btn(⬆️) then self.y -=1 end
if btn(⬇️) then self.y +=1 end
if btn(⬅️) then self.x -=1 end
if btn(➡️) then self.x +=1 end
if self.y>120 then self.y=120 end
if self.y<0 then self.y=0 end
if self.x>120 then self.x=120 end
if self.x<0 then self.x=0 end
end
function object:draw()
spr(self.sprite,self.x,self.y)
end
add(game_objects, object)
return object
end
--[[ template:
function make_object(_x,_y)
local object={
x=_x,
y=_y
}
function object:update()
end
function object:draw()
spr(1,x,y)
end
add(game_objects, object)
return object
end
--]]
__gfx__
000000000077aa000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000077aaaa00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0070070077a0a0aa0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000770007aaaaaaa0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00077000aaa0aa0a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00700700aaa9009a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000aa999900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000aa99000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000