0,]']±>Sï}WÿÍu§ðp8·d%qy)6o;]ÉA¦ösï÷ôôô”°ÂVl†3Q?d???????????????PPPPPPPPPPPPPPPPPPPPPPPPPPPPPP1 Á=DDDDDDDDDDDÝDDDDDDDDDDDÝDDDDDDfDDDDDDDÝDDDDDDfDDDDDDDÝDDDDDDfDDDDDDDÝDDDDDDfDDDDDDDÝDDDDDDfffffffDDDDDDDÝDDDDDDfffffffDDDDDDDÝDDDDDDDDfffffffÝDDDDDDDDfffffffÝDDDDfÝDDDDfÝDDDDDDfÝDDDDDDfÝDDDDÝDDDDÝ -- title: happy bits -- author: batmangreen_123 -- desc: 64x64 code: tic80.com/play?cart=590 -- site: website link -- license: MIT License (change this to your license of choice) -- version: 0.1 -- script: lua -- dont look! --im telling you, dont look! --please, its for the sake of humanity! --dont go any further! --forget it --look at it all you want --but remember, I warned you! --this function is by nickifr --its cart 590 if you want to check it out! --tic80.com/play?cart=590 function Scale64() -- Function for showing 64x64 screen as 128x128, fully centred and with functioning background -- Function made by nickifr -- Fetching Background Color and making it usable bgrColour=string.format(string.sub(string.format(peek(0x03FF8)),1,2)) bgrColour=tonumber(string.sub(string.format("%x",bgrColour*256),1,1)..string.sub(string.format("%x",bgrColour*256),1,1),16) for ramPosLine = 0, 135 do ramPosLine=135-ramPosLine for ramPosChange = 0, 119 do if ramPosChange <= 31 and ramPosLine<=63 then -- Get Original Values value=string.format("%x", peek(((ramPosLine)*120)+ramPosChange) * 256) if string.len(value) < 4 then value = "0"..value end -- Convert Original to New valueL=tonumber(string.format(string.sub(value,1,1)..string.sub(value,1,1)), 16) valueR=tonumber(string.format(string.sub(value,2,2)..string.sub(value,2,2)), 16) -- Remove Original Values poke(((ramPosLine)*120)+ramPosChange, bgrColour) -- Write New Values poke(((((ramPosLine*2)+2)*120)+(ramPosChange*2)+2)+387, valueL) poke(((((ramPosLine*2)+1)*120)+(ramPosChange*2)+2)+387, valueL) poke(((((ramPosLine*2)+2)*120)+(ramPosChange*2)+1)+387, valueR) poke(((((ramPosLine*2)+1)*120)+(ramPosChange*2)+1)+387, valueR) else poke(((ramPosLine)*120)+ramPosChange, bgrColour) end end end end t=0 x=96 y=24 m={ x=0,y=0 } function solid(x,y) return solids[mget(x//8+m.x,y//8+m.y)] end function isSpike(x,y) return spikes[mget(x//8+m.x,y//8+m.y)] end function collides(x,y,id) return mget(x//8+m.x,y//8+m.y)==id end level=1 ta={ x=0,y=0,r=0 } p={ x=8,y=16, vx=0,vy=0, s=256, death={}, g=0.2, j=-2.5, s=false, c=true } d=0 function p.update() --movement if btn(2) then if p.s then p.vx=-1 else p.vx=1 end elseif btn(3) then if p.s then p.vx=1 else p.vx=-1 end else p.vx=0 end if p.vy==0 and (btn(4) or btn(0)) then sfx(1,"F-3",15,3) p.vy=-2.8 end if solid(p.x+p.vx,p.y+p.vy) or solid(p.x+7+p.vx,p.y+p.vy) or solid(p.x+p.vx,p.y+7+p.vy) or solid(p.x+7+p.vx,p.y+7+p.vy) then p.vx=0 end if solid(p.x,p.y+8+p.vy) or solid(p.x+7,p.y+8+p.vy) then p.vy=0 else p.vy=p.vy+p.g end if p.vy<0 and not p.g==0.2 and solid(p.x+7+p.vx,p.y+7+p.vy) or solid(p.x+7+p.vx,p.y+p.vy) then p.vy=0 end if p.vy==0 then p.s=256 else p.s=257 end p.x=p.x+p.vx p.y=p.y+p.vy --collision --flag if collides(p.x+4,p.y+4,4) then cl=1 end --spikes if (collides(p.x+5,p.y+6,5) or collides(p.x+6,p.y,5) or collides(p.x,p.y+6,5)) and d==0 then sfx(2,"B-2",15,3) d=1 end if (collides(p.x+6,p.y+6,7) or collides(p.x+6,p.y,7) or collides(p.x,p.y+6,7)) and d==0 then sfx(2,"B-2",15,3) d=1 end --float tiles if (collides(p.x+6,p.y+6,6) or collides(p.x+6,p.y,6) or collides(p.x,p.y+6,6)) then p.vy=-1.5 end if (collides(p.x+6,p.y+6,8) or collides(p.x+6,p.y,8) or collides(p.x,p.y+6,8)) then p.vy=-0.5 end end function p.draw() spr(p.s,p.x,p.y) --spr(257,p.x,p.y+8) --print(p.vy) --print(mget(p.x+p.d.x,p.y+p.d.y), p.x*8,(p.y*8)+4,2,false,1,true) end function TIC() solids={[1]=true,[2]=true,[3]=true,[18]=true,[19]=true} spikes={[5]=true} en=false levels={ {x=16,y=8,px=1,py=3}, {x=0,y=0,px=1,py=3}, {x=8,y=0,px=1,py=3}, {x=16,y=0,px=1,py=3}, {x=24, y=0, px=1,py=2}, {x=32, y=0, px=1,py=2}, {x=40,y=0,px=1,py=6}, {x=48,y=0,px=1,py=6}, {x=56,y=0,px=1,py=6}, {x=64,y=0,px=6,py=6}, {x=72,y=0,px=6,py=6}, {x=0,y=8,px=6,py=6}, {x=8,y=8,px=6,py=6}, {x=0,y=0,px=0,py=0} } if p.c then p.update() end --m.x=m.x+.1 if cl==1 then p.c=false ta.x=p.x ta.y=p.y ta.r=ta.r+1 if ta.r>70 then level=level+1 if level>#levels then level=level-1 end p.x=levels[level].px*8 p.y=levels[level].py*8 cl=0 end end if cl==0 and level<14 then ta.r=ta.r-1 if ta.r < 0 then ta.r=0 end if ta.r==0 then p.c=true end end m.x=levels[level].x m.y=levels[level].y if d==1 then p.x=levels[level].px*8 p.y=levels[level].py*8 d=0 end cls(0) print("thanks for playing",0,0,12,false,1,true) if level<14 then map(m.x,m.y,30,17) p.draw() if not p.c then circ(ta.x,ta.y,ta.r,12) end end Scale64() t=t+1 end