Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
142 additions
and 68 deletions.
- +9 −9 collab_2/gfx/gfx0
- +23 −23 collab_2/gfx/gfx1
- +75 −1 collab_2/lua/05.lua
- +16 −16 collab_2/map/map0
- +16 −16 collab_2/map/map1
- +3 −3 collab_2/sfx/sfx16
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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,2 +1,76 @@ | ||
| add(games,{ | ||
| name="freedom", | ||
| author="zatyka", | ||
| _init = function() | ||
|
|
||
| text,tick,px,py,ps,pdy,pjmax,pjcnt,pspd,pf,solids,pwrups=" freedom",0,192,88,21,0,1,0,3,0,{},{{384,408,"shrink"},{384,136,"shrink"},{176,440,"air jump"},{16,80,"speed"}} | ||
| for ix=0,31 do | ||
| for iy=0,31 do | ||
| tileval=mget(ix+96,iy) | ||
|
|
||
| for i=3,0,0xffff do | ||
| if (tileval>=2^i) s={(32*(i%2)+ix)*8, (32*flr(i/2)+iy)*8,rnd(4)} add(solids,s) tileval-=2^i | ||
| end | ||
| end | ||
| end | ||
| function col(objs) | ||
| for o in all(objs) do | ||
| if(px<o[1]+8 and px+ps>o[1] and py<o[2]+8 and py+ps>o[2]) fobj,pwrup=o,o[3] return true end | ||
| return false | ||
| end | ||
| end, | ||
| _update = function() | ||
| tick+=1 | ||
|
|
||
| pf,colsol=0,{} | ||
| for s in all(solids) do | ||
| if (abs(s[1]-px)<50 and abs(s[2]-py)<50) add(colsol,s) | ||
| end | ||
|
|
||
| if(btn(1)) px+=pspd xdirc,pf=1,tick%4 | ||
| if(btn(0)) px+=-pspd xdirc,pf=0xffff,tick%4 | ||
|
|
||
| while (col(colsol)) do | ||
| px+=-xdirc | ||
| end | ||
|
|
||
| if((btnp(2) or btnp(4)) and (pjcnt<pjmax)) pdy=0xfff8 pjcnt+=1 sfx(16) | ||
| pdy=min(pdy+1,15) | ||
| py+=pdy | ||
| local ydirc=sgn(pdy) | ||
| if (pjcnt==0) pjcnt=1 | ||
| while (col(colsol)) do | ||
| py-=ydirc | ||
| pdy=0 | ||
| if (ydirc==1) pjcnt=0 | ||
| end | ||
|
|
||
|
|
||
| if (col(pwrups)) then | ||
| if (pwrup=="air jump") pjmax+=1 | ||
| if (pwrup=="shrink") ps-=7 | ||
| if (pwrup=="speed") pspd+=1 | ||
| del(pwrups,fobj) | ||
| sfx(17) | ||
| end | ||
|
|
||
| camera(mid(px-64,0,640),mid(py-64,0,640)) | ||
| if (px<0) text,py,px=" thanks for playing",0xfff8,64 sfx(18) | ||
| end, | ||
| _draw = function() | ||
| cls() | ||
| sspr(64+pf*8,40,7,7,px,py,ps,ps,xdirc==1) | ||
|
|
||
| for s in all(solids) do | ||
| spr(120+s[3],s[1],s[2]) | ||
| end | ||
| for pwr in all(pwrups) do | ||
| local x,y = pwr[1],pwr[2] | ||
| spr(105+x%3,x,y+sin(tick/25)) | ||
| print(pwr[3],x-8,y-7) | ||
| end | ||
| print(text,10,17) | ||
| -- print(#solids,px,py-8,6) | ||
|
|
||
| end | ||
| }) -- game 5 |
This file contains 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,16 +1,16 @@ | ||
| 252525252525252525252525252525256363636363636363636363636363636305050505050305050505050103010505050501010301010505010101030101010000000000000000000000000000000000000000000000000000000000000000070303070303030b0b07030303030b0303030b0b03030303030303030303030b | ||
| 252525252526272525252525252627256262626262626262626262626262626205050505050105050505050505050505050505050105050505010505010505010000000000000000000000000000000000000000000000000000000000000000040000000000000808040000000009000000000000000000020202020202020a | ||
| 25263625252525252525252627252525626262626262626262626262626262620505050505050505050505050505020505050505050505050501050505050501000000000000000000000000000000000000000000000000000000000000000007030202020202020206040400020b02020a0a0b0f070501030303020202060e | ||
| 252525252525252526272525252525256262626262626262626262626262626205050505050105050505050101010505050505050105050505050205050105050000000000000000000000000000000000000000000000000000000000000000050501010101000000040000000008000008000000000000020202020202060e | ||
| 25252627252525252525252526272525626262626262626262626262626262620505050205040505050505050405050505050505050502050505050105050505000000000000000000000000000000000000000000000000000000000000000005010101010101010105000000000802020a020202020202020202020202020a | ||
| 252525252526272525252627252525254261616161616161616161616161614305050505050505050505050505050505050102010501020505050205010102050000000000000000000000000000000000000000000000000000000000000000050101050101010101050000000008000008040406060202020202020202020a | ||
| 252627252525252525252525252525255000000000000000000000000000005105050505050505050505020505050505050505040505050501050105040505050000000000000000000000000000000000000000000000000000000000000000050101010101010101050000000008000008040406060202020202020202020a | ||
| 2525252525252627252525252526272550000000000000000000000000000051050505050505050505050505050505050505050505050505050505050505050500000000000000000000000000000000000000000000000000000000000000000501010101010101050500000000080000080c0c06060602020202020202020a | ||
| 2525252627252525252627252525252550000000000000000000000000000051010301010505050503050101010101010301010505050101010505050505030500000000000000000000000000000000000000000000000000000000000000000501010101010909090d0c04000008000008080806060602020202020202020a | ||
| 252525252525252525252525252525255000000000000000000000000000005105010105050505050505050505050501010105050205050405020205020501050000000000000000000000000000000000000000000000000000000000000000050000040602020a0a0d0c04000008000008080806060602020202020202060e | ||
| 252525252525252525252525252525255000000000000000000000000000005105050205050505050105010105050205010501050505010505050502050105050000000000000000000000000000000000000000000000000000000000000000050000000000000000050c04000008000008080806000001010101010101040e | ||
| 171717351415153415151516371717175000000000000000000000000000005105010501050505050105010101050505010505010501050505050505050105050000000000000000000000000000000000000000000000000000000000000000050000000000000000050c0404040a02020a0a0a03010101000000000000000a | ||
| 17173514151515151515151516371717500000000000000000000000000000510505020502050505010505040505050501050101050101050101050505050505000000000000000000000000000000000000000000000000000000000000000005050101010908000405080000000a02020a0a0b03010101000000000000000a | ||
| 17351415151515341515151515163717500000000000000000000000000000510501050105010505010505050505050501050505050505050101010501050505000000000000000000000000000000000000000000000000000000000000000005000000000908000005080000000a02020a0b0b0a080808020202000000000a | ||
| 35141515151515151515151515151637500000000000000000000000000000510505020505040505010502050505050501050502050205050504050505050505000000000000000000000000000000000000000000000000000000000000000007020202020b0b0202070b0202020e060707030202010109030303010101010b | ||
| 1415151515151534151515151515151652606060606060606060606060606053050505050505050501010505050505050105050505050505050505050505050500000000000000000000000000000000000000000000000000000000000000000d000000040c0c000205080000040c040505040001010008020202000000000e |
Oops, something went wrong.