i made a clock and you can set the time yourself in the code or with the little knob on the side, if you pull it out a bit like a normal watch you can adjust the time and if you dont you can turn the mainspring (but it doesnt affect the power beause i dont want to have to wind my virtual watch lol)
its real messy. i can label it if someone wants but to adjust to your timezone youre gonna wanna change the line in _update that says hour = date sub - 6. the - 6 is subtracting 6 hours from the default gmt to get mountain time where i live but you can change it to whatever you like
you can copy this into a file you make called clock.lua wherever your toolbar widget things are stored and then add a line in appdata/system/startup.lua to create it on startup like this
create_process("/tooltray/clock.lua", {window_attribs = {workspace = "tooltray", x=2, y=2, width=128, height=128}})
if you dont have startup.lua just create one in appdata/system and add the above line to it. the path for my clock.lua is just /tooltray/clock.lua because i made a tooltray folder for my widget things in my root folder.
-- clock
function _init()
mx, my, mb, ms = mouse()
lastX = mx
lastY = my
winding = false
windNum = 0
setMin = 0
setHour = 0
springA = 0
movedX = 0
moved = false
clock = 0
wind = 0
windX = 84
windY = 39
end
function _update()
cls(1)
lastX = mx
lastY = my
mx, my, mb, ms = mouse()
winder()
clock += 1
hour = (date():sub(12,13) - 6)%12
minute = (date():sub(15,16) + setMin)
second = (date():sub(18,19))
end
function _draw()
--spr(2-windNum%2,windX,windY)
drawWinder(windX,windY)
background()
flywheel()
mainspring()
local sx = (sin(second/60+0.25)) * 10
local sy = (-cos(second/60+0.25)) * 10
line(42,59,42+sy,59+sx,24)
local hx = (sin(hour/12+0.25+(minute/60)/12)) * 16
local hy = (-cos(hour/12+0.25+(minute/60)/12)) * 16
--line(42,42,42+hy,42+hx,7)
local ha = hour/12 +(minute/60)/12
drawHand((ha-1)*-1,16,42,42)
local mx = (sin(minute/60+0.25)) * 24
local my = (-cos(minute/60+0.25)) * 24
--line(42,42,42+my,42+mx,7)
local ma = minute/60
drawHand((ma-1)*-1,28,42,42)
-- print(second,128,16,7)
-- print(minute,128,32,7)
-- print(hour,128,48,7)
end
function drawHand(a,l,x,y)
local x1 = (sin(a - 1/12)) * 2
local y1 = (-cos(a - 1/12)) * 2
local x2 = (sin(a + 1/12)) * 2
local y2 = (-cos(a + 1/12)) * 2
local x3 = (sin(a)) * l
local y3 = (-cos(a)) * l
local x4 = (sin(a)) * 2
local y4 = (-cos(a)) * 2
line(x+x1,y+y1,x+x3,y+y3,6)
line(x+x2,y+y2,x+x3,y+y3,6)
line(x+x4,y+y4,x+x3,y+y3,7)
circfill(x,y,2,6)
circfill(x,y,1,1)
end
function drawWinder(x,y)
local n = windNum%2
rectfill(x,y,x+2,y+6,13)
line(x-1,y+1,x-1,y+5)
if n == 0 then
for i= 0,2 do
local xx = x+1
local yy = y+1
line(xx,yy+i*2,xx+1,yy+i*2,29)
end
elseif n == 1 then
for i= 0,3 do
local xx = x+1
local yy = y
line(xx,yy+i*2,xx+1,yy+i*2,29)
end
end
end
function winder()
if mx >= windX and mx <= windX + 16 and my >= windY and my <= windY + 16 then
if mb == 1 then
winding = true
end
end
if winding == true then
if mb != 1 then
winding = false
end
end
if winding then
if not moved then
local n = lastY - my
if n > 0 then
springA += lastY - my
end
else
setMin -= lastY - my
end
windNum += lastY - my
movedX -= lastX - mx
end
if mb == 0 then movedX = 0 end
if movedX >= 8 and not moved then
windX += 1
movedX = 0
moved = true
end
if moved and movedX <= -8 then
windX -= 1
movedX = 0
moved = false
end
end
function mainspring()
circfill(42,28,16,18)
for i = 1,3 do
local a = i/3 - springA/60
local x = sin(a) * 6
local y = -cos(a) * 6
circ(42+x,28+y,6,22)
end
for i = 1,3 do
local a = i/3 + 5/12 - springA/60
local x = sin(a) * 10
local y = -cos(a) * 10
circfill(42+x,28+y,5,18)
end
circ(42,28,12,22)
circ(42,28,13,22)
circ(42,28,15,29)
end
function flywheel()
circ(24,47,9,9)
for i = 1,3 do
local a = i/3+0.25+(cos(clock/24)/3)%2
local x = sin(a)
local y = -cos(a)
line(24,47,24+x*9,47+y*9,9)
end
end
function acos(x)
return atan2(x,-sqrt(1-x*x))
end
function asin(y)
return atan2(sqrt(1-y*y),-y)
end
function background()
--circ(240,135,36,7)
--circ(240,135,37,7)
circfill(42,42,40,1)
circfill(42,42,30,13)
circ(42,42,41,29)
circ(42,42,29,29)
circ(42,59,10,1)
circ(42,59,11,1)
for i = 1,12 do
local a = i/12+0.25
local x = sin(a)
local y = -cos(a)
line(42+x*32,42+y*32,42+x*36,42+y*36,6)
end
for i = 1,12 do
local a = i/12+0.25
local x = sin(a)
local y = -cos(a)
pset(42+x*9,59+y*9,7)
end
for i = 1,60 do
local a = i/60+0.25
local x = sin(a)
local y = -cos(a)
pset(42+x*38,42+y*38,7)
end
for i = 1,12 do
local a = i/12+0.25
local x = sin(a)
local y = -cos(a)
pset(42+x*38,42+y*38,8)
end
end
check out this dope ass pool game
tiny farm has an itch now if you want the exe:)
https://lumpycamel123.itch.io/tiny-farm
for my final game in the lumpy games tiny games pack i made a little farming simulator. i would consider it to be pretty feature extensive as you can farm ranch fish and mine your way through my tiny little world.
also it has fully featured co-op
how to play--
you can open the shop by pressing x on the froggys(frobert and frebeca) to buy seeds, sell crops, buy animals, sell goods, turn bars into ore, buy harvest multipliers, and buy tool upgrades by switching menus with the right and left buttons with after pressing on a froggy, it doesnt matter which you press on. to tend to your crops you have to till and water the ground to plant seeds then water them each day for them to grow. when theyre grown you can harvest and sell them to frebeca. when you have animals theyll start out as babies and you have to feed them for 2 days until you can start to get artisan goods from them when you feed them. fishing is always available for some quick cash in case you need a bit more money to fill up your crop space or something. when you have 4 iron or gold ore from mining the rocks on the bottom of the screen you can combine them with some money in the second to last shop menu to get bars and upgrade your tools on the next menu. you can also sell them if you want or if your tools are maxed out. on the menu where you get bars you can also spend 500$ to upgrade your multipliers on crop, animal, fish, and mining output. i was thinking 1000$ might be better so let me know. i hope you have fun:)
update 1: i wanted to change the tiles so i used a free tileset on itchio called pico rpg forest tileset, the same one villager used i thought that game was really pretty and was happy to learn its sprites were free. i also made all the stuff fit on the main screen after realizing when i added seasons you could only buy 4 crops at a time so the farm plot only needed to be 4 3x3 squares if you ask me. also the shops are combined. i think it turned out really nice
update 2: the tool icons move better when you press and you can hold down to use them as well and itll go the the beat of the music. i also added a bunch of polish and qol stuff but the coolest part is defintely that the game can save everything except your planted crops now. have some money, seeds, crops, goods, ore, and bars in your inventory and theyll save as well as all your animals whenever you sleep pretty cool stuff you can also reset your save whenever you like on the main screen.
upgrade 3: you can buy crop,good,fish, and mining multipliers now with 4 iron and gold bars so the endgame progression is more balanced:)
here for game 2 in the lumpy tiny games pack we have a little f1 simulation i made for my wife because shes really into racing and i think its cute tbh. you can change your cars color by pressing x/o and you control it with the arrow keys. thats all there is to it really its just a tiny little game with 8 tracks i drew based on real life f1 tracks. i thought it was really fun so i hope you enjoy:)
now with an itch page for the exe
https://lumpycamel123.itch.io/tiny-balls-space-pool
patch 1.1 - added endless modes for ultimate, pool, co-op ultimate, and co-op pool! when you have less than 8 balls left 8 more will spawn leaving you with the original 15 and also it swaps between the team colors for prettiness:)
patch 1.2 - ball trails added as well as the balls wrap around the screen now to make the last parts of time modes less boring/frustrating. you can also swap to the pico 8 second palette if you press o on the main menu too:)
ive finished the full version of my first game spaceballs, going with the theme of my lumpy tiny game pack i want
to call it tiny balls lol. in this version theres 2 new vs modes where you can play a classic turn based
version of pool with a friend or space hockey! it still has the original ultimate, space pool and co op modes but i just wanted to squeeze more into it until i reached the token limit. i thought it was a lot of fun so i hope you enjoy:)
patch 1.3 - tweaked particles and physics to make things less chaotic and more enjoyable
final version 1.4 - you can toggle wall collision in real time in the pause menu:)
my first game, spaceballs!
controls-
x- select
o- back
x- use move(ingame)
a highly addictive space pool simulation with multiple modes and co-op
you can enjoy being the white ball and ramming the little balls into the goals or use the launch move to
simulate a more poolcue-like experience
i hope you enjoy i thought it was super fun so tell your friends!
patch 1.1 notes-
screenshake is scaled based on ball speed/direction, goals are smaller for difficulty,
and balls bouncing off goals when their speed is over 2 pps is fixed now,
as well as a menu selection bug
patch 1.2 notes-
added music, game is finished:)