function box(_x,_y,_w,_h) return{ x=_x, y=_y, w=_w, h=_h } end function get_cols(a) local gx,gy=flr(a.x/8),flr(a.y/8) local ex,ey=flr((a.x+a.w-1)/8),flr((a.y+a.h-1)/8) local list={} for i=gx-1,ex+1 do for ii=gy-1,ey+1 do if fget(mget(i,ii),0) then add(list,box(i*8,ii*8,8,8)) end end end return list end function collide(a,_dx,_dy,list,side) local ca={ x=flr(a.x), y=flr(a.y), w=a.w, h=a.h } for i=1,#list do local v=list[i] if col(v,ca) then if _dx>0 then a.x=v.x-a.w side["right"]=true elseif _dx<0 then a.x=v.x+v.w side["left"]=true end if _dy>0 then a.y=v.y-a.h side["down"]=true elseif _dy<0 then a.y=v.y+v.h side["up"]=true end end end end --diss code expects that "a" have a --dx and dy function move(a) [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=141827#p) |
third_person_camera
i want to make a 3d game in pico8, but i without time to spend in gamedev ,with the time i have left i doing some camera work , diss a tps style camera(i have to charge some variables to accommodate to the pico8 128x128 screen) , i hope you all can find a good use to it , i also want to thanks the help i got from freds72 (the guy who ported doom to pico8), and again i using sokpop sorce code as reference.


i saw that pico8 got a free version so i decide to make a small game
i kinda new in to developing games ,and that why the game is so simple , or maybe is because pico8 token count said he hates me,
who knows.
about the game he is kinda_like a rougue like , he very inspired in the binding of issac, but simpler
every door do something
yellow
is the item room
pink one
is a mystery can have enemies or good_stuff
the brown one
is just a enemy room
the controls are the keybord keys and z and x
z are shot
x use card
diss game is not that good , is very short and you can see that, is more like train to flex my programing skils that anything .





