Compare commits
44 Commits
cdbda98f23
...
clouds
Author | SHA1 | Date | |
---|---|---|---|
23df0bbe23
|
|||
d48b81f371
|
|||
ad05ea4bde
|
|||
b421df9174
|
|||
dd34ad0a37
|
|||
9a865e418f
|
|||
4a086be607
|
|||
09a09b646a
|
|||
0574fe4021
|
|||
79d6321891
|
|||
bf6fa03374
|
|||
078e9a9887
|
|||
bf9667e766
|
|||
066142e62c
|
|||
69e9336d7f
|
|||
e83f7002a2
|
|||
c35c9f0c3e
|
|||
537a086e9b
|
|||
eb76795de1
|
|||
5a1ce6fe91
|
|||
1ea5057111
|
|||
2a2f487dfb
|
|||
38b4da8c80
|
|||
6cb0b54cdd
|
|||
3400325154
|
|||
3462815118
|
|||
aee3b29d69
|
|||
9d4bc8998b
|
|||
9ea66b9756
|
|||
85ee8f113f
|
|||
621ae777d0
|
|||
44b8826720
|
|||
02e5533eb1
|
|||
0dda2596af
|
|||
b237ccb152
|
|||
1ffa6197fd
|
|||
0b89989264
|
|||
2aa62b8e2d
|
|||
9669658414
|
|||
05417e851a
|
|||
bf46878f34
|
|||
170af5bc01
|
|||
510db3f96b
|
|||
0c6b0e0021
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.vscode/settings.json
|
.vscode/settings.json
|
||||||
|
vacation.bin
|
||||||
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "shrinko8"]
|
||||||
|
path = shrinko8
|
||||||
|
url = https://github.com/thisismypassport/shrinko8.git
|
124
clouds3.p8
Normal file
124
clouds3.p8
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
pico-8 cartridge // http://www.pico-8.com
|
||||||
|
version 42
|
||||||
|
__lua__
|
||||||
|
|
||||||
|
function _init()
|
||||||
|
cmgr0=cloud_manager:new(15,51,5,1,5,13)
|
||||||
|
cmgr1=cloud_manager:new(12,51-8,7,4,13,6)
|
||||||
|
cmgr2=cloud_manager:new(6,51-14,9,3,15,7)
|
||||||
|
cmgr0.step=5
|
||||||
|
cmgr1.step=4
|
||||||
|
cmgr2.step=3
|
||||||
|
last_x=0
|
||||||
|
x=0
|
||||||
|
dx=0
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function _update60()
|
||||||
|
if (btn(4)) dx+=1.0
|
||||||
|
dx*=0.75
|
||||||
|
x+=dx
|
||||||
|
while last_x<x do
|
||||||
|
cmgr0:update()
|
||||||
|
cmgr1:update()
|
||||||
|
cmgr2:update()
|
||||||
|
last_x+=1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function _draw()
|
||||||
|
cls(12)
|
||||||
|
cmgr0:draw()
|
||||||
|
cmgr1:draw()
|
||||||
|
cmgr2:draw()
|
||||||
|
end
|
||||||
|
|
||||||
|
cloud_manager={}
|
||||||
|
function cloud_manager:new(sparseness,y,h,oval_h,c0,c1)
|
||||||
|
local c={
|
||||||
|
frame=0,
|
||||||
|
clouds={},
|
||||||
|
bitplanes=split"241,242,244,248",
|
||||||
|
step=1,
|
||||||
|
sparseness=sparseness,
|
||||||
|
y=y,
|
||||||
|
c0=c0,
|
||||||
|
c1=c1,
|
||||||
|
h=h,
|
||||||
|
oval_h=oval_h
|
||||||
|
}
|
||||||
|
setmetatable(c,{__index=cloud_manager})
|
||||||
|
return c
|
||||||
|
end
|
||||||
|
|
||||||
|
function cloud_manager:update()
|
||||||
|
self.frame+=1
|
||||||
|
if self.frame%(self.step*self.sparseness) == 0 then
|
||||||
|
local bp=deli(self.bitplanes,1)
|
||||||
|
add(self.clouds,{x=127,y=rnd()*self.h,w=flr(rnd()*16)+16,plane=bp})
|
||||||
|
add(self.bitplanes,bp)
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.frame%self.step==0 then
|
||||||
|
local clouds2={}
|
||||||
|
for c in all(self.clouds) do
|
||||||
|
c.x-=1
|
||||||
|
if (c.x+c.w>0) add(clouds2,c)
|
||||||
|
end
|
||||||
|
self.clouds=clouds2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function cloud_manager:draw()
|
||||||
|
local r0=96
|
||||||
|
local r1=96+16
|
||||||
|
local h=self.h+self.oval_h+1
|
||||||
|
assert(h<=16)
|
||||||
|
|
||||||
|
-- render to spritesheet
|
||||||
|
poke(0x5f55,0x00)
|
||||||
|
rectfill(0,r0,127,r0+h,0)
|
||||||
|
|
||||||
|
-- use bitplanes
|
||||||
|
for c in all(self.clouds) do
|
||||||
|
poke(0x5f5e,c.plane)
|
||||||
|
ovalfill(c.x,r0+c.y,c.x+c.w,r0+c.y+self.oval_h,15)
|
||||||
|
end
|
||||||
|
poke(0x5f5e,255)
|
||||||
|
|
||||||
|
-- render from high memory
|
||||||
|
-- to higher memory
|
||||||
|
rectfill(0,r1,127,r1+h,0)
|
||||||
|
|
||||||
|
for i in all(split"0,1,2,4,8") do
|
||||||
|
palt(i,true)
|
||||||
|
end
|
||||||
|
for i=0,15 do
|
||||||
|
pal(i,7)
|
||||||
|
end
|
||||||
|
|
||||||
|
poke(0x5f5e,0xf1)
|
||||||
|
sspr(0,r0,128,h,0,r1)
|
||||||
|
poke(0x5f5e,0xf2)
|
||||||
|
sspr(0,r0,128,h,1,r1+1)
|
||||||
|
sspr(0,r0,128,h,5,r1+1)
|
||||||
|
poke(0x5f5e,255)
|
||||||
|
|
||||||
|
-- render to screen
|
||||||
|
poke(0x5f55,0x60)
|
||||||
|
pal()
|
||||||
|
pal(1,self.c1)
|
||||||
|
pal(2,self.c0)
|
||||||
|
pal(3,self.c1)
|
||||||
|
sspr(0,r1,128,h,0,self.y)
|
||||||
|
pal()
|
||||||
|
end
|
||||||
|
|
||||||
|
__gfx__
|
||||||
|
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
@ -6,13 +6,19 @@ Arcade Mode palette notes:
|
|||||||
-- 2: dolphin shading
|
-- 2: dolphin shading
|
||||||
-- 3: azure water, maybe score display? (140)
|
-- 3: azure water, maybe score display? (140)
|
||||||
-- 4, 5: keep default in sky layer (for emergency awakener)
|
-- 4, 5: keep default in sky layer (for emergency awakener)
|
||||||
|
-- 4 (underwater) is a deeper blue shade part of sea
|
||||||
-- 6: dolphin specular highlights
|
-- 6: dolphin specular highlights
|
||||||
-- 7: dolphin white paint
|
-- 7: dolphin white paint
|
||||||
-- 8, 9: unassigned, layer specific
|
-- 8, 9: layer specific
|
||||||
|
-- sky:
|
||||||
|
-- 8: bright cloud shadows (15)
|
||||||
|
-- 9: light gray for clouds (6? 13? 134?)
|
||||||
-- 10: word primary (yellow 10?)
|
-- 10: word primary (yellow 10?)
|
||||||
-- 11: word shadow (wood 132?)
|
-- 11: word shadow (wood 132?)
|
||||||
-- 12: dolphin eye
|
-- 12: dolphin eye
|
||||||
-- 13: common sky color
|
-- 13: common sky color
|
||||||
|
-- this is a reassignment candidate but means I will never do
|
||||||
|
-- the "sunset palette cycle" thing
|
||||||
-- 14: dolphin primary color
|
-- 14: dolphin primary color
|
||||||
-- 15: highlight white (all layers)
|
-- 15: highlight white (all layers)
|
||||||
--
|
--
|
||||||
|
1
shrinko8
Submodule
1
shrinko8
Submodule
Submodule shrinko8 added at aa7ac7aa9d
BIN
vacation-cover.png
Normal file
BIN
vacation-cover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
BIN
vacation.bin.minified.zip
Normal file
BIN
vacation.bin.minified.zip
Normal file
Binary file not shown.
1135
vacation.minified.p8
Normal file
1135
vacation.minified.p8
Normal file
File diff suppressed because it is too large
Load Diff
BIN
vacation.minified.p8.png
Normal file
BIN
vacation.minified.p8.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
919
vacation.p8
919
vacation.p8
File diff suppressed because it is too large
Load Diff
1128
vacation_html/index.html
Normal file
1128
vacation_html/index.html
Normal file
File diff suppressed because it is too large
Load Diff
157
vacation_html/vacation.js
Normal file
157
vacation_html/vacation.js
Normal file
File diff suppressed because one or more lines are too long
BIN
vacation_html/vacation_html.zip
Normal file
BIN
vacation_html/vacation_html.zip
Normal file
Binary file not shown.
Reference in New Issue
Block a user