This is a little demo I made, I finally learned how to use tline. Have fun "playing", and have a nice day.
code (sprites are used as well):
function r(o,r,n,e,d)local r,e,d,l=o or 0,r or 0,e or 8,d or 1for o=0,127do tline(r+o,e+0,r+o,e+127,o/8,-2+sin(o/127)*l,0,1/d,n or 1)end end function e(o,r)local e,n=":","."?stat(92)..n..d[stat(91)]..n..stat(90),o,r,2 ?stat(93)..e..stat(94)..e..stat(95),o,r+8 end d,o=split"january,february,march,april,may,june,july,august,september,october,november,december",12function _draw()cls(12)pal(15,140,1)t=time()*20for o=1,32,2do local o=o/2*o/30line(0,o,127,o,15+o%2*1.2)end circfill(120,10,24,10)for o=1,9do local o=t/240+o/9local r,e=cos(o)*30,sin(o)*30line(120+r,10+e,120+cos(o)*45,10+sin(o)*45)end for o=0,5do spr(20+min(o&2,1)*16,-16+(t*mid(1,o~3,2)/2+(o&3)*100)%144,5+o*10,2,1)end r(0,44,1,4,-1)for o=0,127do tline(o,0,o,127,o/8,-18+sin(o/127)/2,0,.25,2)end r(0,0,5)r(0,64,1,4,-.5)map(0,0,0,24,16,16,2)o+=(btn()/2&1)-(btn()&1)if(btn()>0)n=btn(⬅️) o%=136spr(4+time()*tonum(btn()>0)*6%3,-8+o,82-sin(o/128)*8+sin(t/8)/2*tonum(btn()>0),1,1,n or false)e(1,114)end |
this looks like it has amazing potential, keep working on it! I can see a plot already.
I wasnt planning on expanding. But I think I will, thanks man. :)
This could turn out to be a fun game.
As a pico-8 screensaver/clock, it's pretty nice. Minutes and seconds could always take two character spaces and be right aligned for nicer visual, and the sun's position in the sky could depend on the time. The color palette could also change depending on the time.
i just realized that thats even possible, thanks for pointing it out.
there could be a moon and sun at the sky with stars depending on time,
if the time is local.
You could make an accurate moon phase based on the date.
Because you have both local time and UTC time, you could make a reasonable approximation of the longitude for the stars, but you're missing the latitude.
I wouldn't put it past zep to have hidden the device's gps coordinates in some obscure undocumented stat/poke/GPIO/file/whatever so maybe one day ?
Moon phase is realistically doable.
EDIT : just remembered that even if the moon phase is the same from everywhere on the globe, the angle of view is not, so you need the the latitude to correctly rotate the moon image... Maybe assume you are at the equator by default, and add a GPS input option in the pause menu (saved in cartdata) ?
[Please log in to post a comment]