Merge pull request 'update' (#2) from gnawmon/ballsoffline:main into main

Reviewed-on: #2
This commit is contained in:
mertoalex 2024-04-27 19:18:14 +00:00
commit b1ed5b3991
19 changed files with 128 additions and 45 deletions

View File

@ -15,4 +15,4 @@ echo '{"username":"'$USER'","color":"DEAD00"}' > account.json
## Credits
[guessy](./guessy4.ttf) is made by dottych
[guessy](./guessy4.ttf) and sounds are made by dottych

BIN
assets/font/carlito.ttf Normal file

Binary file not shown.

1
assets/maps/0.txt Normal file
View File

@ -0,0 +1 @@
0000000000455000000000000000000110000000000000000000000000000000004000040045500444444444444440011004433440443344044334404433440000000000004550040000000000000001100400004040000404000040400004000400000000455004040444440404400110040000404000040400004040000400000040040045500404040004040400011004000040400004040000404000040000000000004550040404040404040001100442244044224404422440442244000000000000455004040404040404000110000000000000000000000000000000000000000045500404040404040400011111111111111111111111111111111100000000404550040404040404040001111111111111111111111111111111110040000000455004040404040404000110000000000000000000000000000000000000000045500404040404040400011004422440442244044224404422440000000004004550044404040404040001100400004040000404000040400004000000000000455000400004000404000110040000404000040400004040000400004000000045500440444444440400011004000040400004040000404000040000000000004550000040000000040001100443344044334404433440443344000000000000455004444444444444004114000000000000000000000000000000000400040045500000000000000000411444444444444444444444444444444400000000004555555555555555555541145555555555555555555555555555550000000000455555555555555555554114555555555555555555555555555555000000000045500000000000000000411400000000000003000003000000000000400040004550000000000000000041140000000000000300000300000000000000000000455000000000000000000110000000000000033000330000000000000000000045500000000000330000011000003300000000000000000000000000000000404550000000000355300001100003553000000000000000000000000400000000455000000000355553000110003555530000000000000000000000000000000045500000000035555300011000355553000000000000000000000000000040004550000000000355300001100003553000000000000000000000000000000000455000000000003300000110000033000000000000000000000000000000000045500000000000000000311300000000000000000000000000000000004000004550000000000000000031130000000000000000000000000000000000000004444440000000000000334114330000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110000000004444440000000000000334114330000000000000000000000000000000000000005500000000000000000311300000000000000000000000000000000400000000550000000000000000031130000000000000000000000000000000000000000055000000000003300000110000033000000000000000000000000000000040005500000000003553000011000035530000000000000000000000000000400000550000000003555530001100035555300000000000000000000000000000000055333000000355553000110003555530000000000000000000000000000000005500300000003553000011000035530000000000000000000000000400000000550000000000033000001100000330000000000000000000000000000000400055000000000000000000110000000000000000000000000000000000000000005500000000000000000011000000000000004400000044000000000000000000550030000000000000001100000000000000400000000400000000400000040055333000000000000000110000000000000000040040000000000000000000005500000000000000000011000000000000000044004400000000000004000000550000000000000000001100000000000044000000000044000000000000000055000000000000000000110000000000000400000000004000000000000000005500000000000000000011000000000040000000440000000400055555555555550000000000000000001100000000004400000044000000440005555555555555000000000000000000110000000000000044000000440000000000000000005500000000000000000011000000000000004400000044000000000000000000550000000000000000001100000000004400000044000000440000000000000055000000000000000000110000000000400000004400000004000000000000444444000000000000000011000000000000040000000000400000011111111111111111111111111111111100000000000044000000000044000001111111111111111111111111111111110000000000000000440044000000000000000000444444000000000000000011000000000000000004004000000000000000000000550000000004000000001100000000000000400000000400000000000400000055000004000000400000110000000000000044000000440000000000000004005500000000000000400011000000000000000000000000000000000400000000550040000000040000001100000000000000000000000000000000000000000055000000000000000000110000000000000000000000000000000

1
assets/maps/1.txt Normal file
View File

@ -0,0 +1 @@
5555555555555000000000055555555555555555555555555555555555555555555555555555550555550555555555555555555555555555555555555555555555555555555555055555055555555555555555555555555555555555555555555555555555555505555505555555555555550555555555000000055555555555555555555555550555550555555555000000000000000005555505555555555555555555555555055555055555555555555505422455550005550555555555555555555555555505555505555555555555550540045555550555000055555555555555555555550555550555444444445555054004555555000555505555555555500000000000055555055540004004555505400055555555055550555555555554424455555505555505554000200455550544420000000000000055555555555411145555550555550555400444455555055550555555555555505555555555531114555555055555055542245555555505555055555555555000005555555553111205555505555505555005555555550555505555555555005550055555555311120555550555550555500555555555055550555555555505555505555555531114055555055555055550055555000000000000000555550544550555555554111405555505555505555005555505555555555555555555040044055555555444440555550555550555500555550555555555555555555503000305555555555555055555055555055550055555055555555555555555550400030555555555555500005505555505555005555505555555500005555555054004055555555555550555550555550555500555550555555550550555555505404505555555555555055555055555055550055555005555555055055555550540450555555550000005555000555505555000000000000000000500555555054045055555555055550000005000000555500555500505055400045005555505404505555555505555555555555555055550055555050000540004550555550540450555555550550555555555555505555005555505555054000455005555054045055555555055055555555555550555500555542455505400045550055504424405555555505500000000000055055550055540004550540004555505550000000555555550000555505555505505500000054000450054000455550055555055555555555555555550555550550000433400000045055400045555505555505555555555555555555055555055000043340000002005554245555550055550555555555555555555505555505505500000054000450554000455555505555055555555555555555550555550000555500555400045055400045555550055505555555555555555555055555055055550055540004505540004555555505550555555555555555555505555555505555005555424550554000455555550055055555555555555555550555555550555500555550555055400045555555500505555555555555500000000005555055550055555055505543334555555555050555555555555550555505550555505555005555505550555555555555555500055555555555555055550555055550555500555550000055555555555555555555555555555555505555055505555055550055555555505555555555555555555555555555555550500000000555505554224555555550005555555555555555555555555555555050550555555550554000045555555050000005555555555555555555555555505055050000555055300003555555505555550000005555555555555555555550505505055055505544004455555550555555055550555555555555555555555050550505505550555544555555555055554405555055555555555555555555505055000000555055555555555555505554110555505555555555555555555550505555055555500000000000000000000111145550555555555555555555555000555505555550555550555555555055411110000055555555555555555555555555550000055055555055555555005541111455055555555555555555555555555555555505505555505555555505554111455505555555555555555555555555555555550550555500055555550555540455550555555555555555555555555555555555055055550505555555005555055555055555555555555555555555555555555505505550000000005550000505555505555555555555555555555555555555550550555055504340555505000000050555555555555555555555555543455555055055505550414055550555555500055555555555555555555555554145555505505550555042405555055555555555555555555555555555555554111450550550555055500000555505555555555555555555555555555555555311120055055055505555000555500555555555555555555555555555555555541114505505505550555550555550555555555555555555555555555555555553111450550550555055555055555055555555555555555555555555555555555411145055055055505555505555505555555555555555555555555555555555554145505505505550555500000000055555555555555555555555555555555555434550550550555000050505505555555555555555555555555555555555555555555055055055505505000550555555555555555555555555555555555555555550000000000000050005000055555555555555555555555555555

1
assets/maps/2.txt Normal file
View File

@ -0,0 +1 @@
4444444444444444444444444444444444444444444444444444444444444444400000400000000000000000000000400000000000000000000000000000000440555040000000000000000000000040000000000000000000000000000000044054504444004444444004004444444004444004444444444444004004004004405550400000400000400400400000400400000400000000000400400400400440000040000040000040040040555040040000040000000000040040040040044004004004444004444004004054504004004444004444444004004004004004400400400400000000000400005550400400000000000000400400400400400440040040040000000000040000000040040000000000000040040040040040044444004004004004004444444444444004444444444444444004004444004004400000400400400400000000000000000000000000000000000000000400000440000040040040040000000000000000000000000000000000000000040000044004444444004444004004444004444444444444444444444444444444444004400400000000400000400400400400000000000000000400400000000000400440040000000040000040040040040000000000000000040040311141113040044004004444004004444004004004004444444004444444004015553555104004400400400400400000400400000400000000400000000000401555355510400440040040040040000040040000040000000040000000000040155535551040044004004004004004004004444444444444004444444444004043334333404004400000400000400400400000000000000400000400400000401555355510400440000040000040040040000000000000040000040040000040155535551040044444004004444444004004444444444004444004004004004015553555104004400400400400000400400400000000400400400400400400403111411130400440040040040000040040040000000040040040040040040040000000000040044004004004444004004004444004004004004004004004004444444004444004400400400000000400400000000400400400000400000400000000000400000440040040000555040040000000040040040000040000040000000000040000044004444004054504444444444004444004444004444444444444444444444004400000000405550400000000000411111111400000000000000000000000000440000000040000040000000000041111111140000000000000000000000000044444444004444444004444444444111111114444444004444444444444444444400000400400000000400000000011100111000000400400000400000400000440000040040000000040000000001110011100000040040000040000040000044004004004004444444004444444111111114444004004004004004004004004400400400400000000000400000411111111400000400400400000400000400440040040040000000000040000041111111140000040040040000040000040044004004004444444444444444004444004444004004004004444444444444004400400400000000000000400000400400400000400400400000000400000000440040040000000000000040000040040040000040040040000000040000000044444004444004444004004004004004004004444004004444004004004004444400000000000400000400400400000400400400000400000400400400400400440000000000040000040040040000040040040000040000040040040040040044004444444444444004004004444444004004004444004004444004004444004400400000000000400400400000000000000400000400400000000400000000440040000000000040040040000000000000040000040040000000040000000044444004444444004444004444444004444444444004004004004004004004004400000455411400000400400000000400000000000400400400400400400400440000045541140000040040000000040000000000040040040040040040040044004444554114444004004004444444004004444444004004004004004004004400455555411111400400400400000000400400000000400400400400400400440045555541111140040040040000000040040000000040040040040040040044004554444444114004004004004444444004004444444004004444444004004400455411455411400400400400000400400400400000000400000000000400440045541145541140040040040000040040040040000000040000000000040044004554444444114004004004444004004004444004444444444004004444444400455555411111400400400000400000400000000400000000000400000000440045555541111140040040000040000040000000040000000000040000000044004444554114444004004444004444004004444444004004004444444004004400000455411400000400400000000400400400000000400400400000400400440000045541140000040040000000040040040000000040040040555040040044444004444444004444004444444004004004004444444004004054504004004400400000000000000000400000000000400000400000000400005550000400440040000000000000000040000000000040000040000000040000000000040044444444444444444444444444444444444444444444444444444444444444444

1
assets/maps/3.txt Normal file
View File

@ -0,0 +1 @@
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

1
assets/maps/4.txt Normal file
View File

@ -0,0 +1 @@
0000000040000000000000000000000000000000000000000000000000000000000044000000400000004400000000000000000000000000000000000000000000004400000000004440440000400000022200000000000000000000000000000000000000444000444000000000000022222000000000000000000000000000040000000444440044000044400000002242200000000000044000000000000000000400444444000000044444000000222220000000000044400000000000000000000004444000000004444000000002220000000000004400000000000000044000440000000000000044000000000000000000000000000000000000000004440044400001111111100000000000000000000011111111000000000000000444000000011111111111111111111111111111111111111110000000000000000000000011111111111111111111111111111111111111111100004400000000000400011111111111111111111111111111111111111111111000440000000000000001111111100000001111111111111111111000011111110000000000000440001111111000000000000000111100000000000000011111100000000000044000111110000000000000000011110000000000000000111110000000000400000011111000000000000000002222000000000000000001111000000000000000001111000000005555555555000055555555500000000111110000000000000000111100000005555555555522225555555555550000011111100000000000000111100000055555555555550000555555555555000001111110000000000000011110000005555444445555222255554434455550000011111000000000000001111000000555400400455500005554000004555500001111100000000000001111100000555400020004552222554000000045550000111110022200000000111110000055540004000455000055400444004555000111111022222000000011111000005554424400044422224440044400355500011111002242200000000111100000555400000004110000114004440045550001111100222220000000011110000055540000000214400011200000004555000111110002220000000001111000005555400000211440001112000004555500011111000000000000000111100000555554444211110000111124444555550001111122200000001111111111000055555554111111000044411145555555000111122222000001100001111100005555555411444100004441114555555500011112242200000100000011110000555555541144400000444111455555550001111222220000010044001111000055555554114440000001111145555555000111112220000001004400111100005555555411444000000111114555555500011111000022200100000011111000555555541111100000011441455555550001111100022222011000011111100055555554111111000011144145555555000111110002242200111111111110005555555411111100001111114555555500011111000222220000000011111000555554444211114400111124444555550001111100002220000000000111100055554000002111440011120040045555000111111000000000000000011110005554040004021100001120002000455500011111122200000000000001111000555400000004110000114000400045550001111122222000000000000111100055530004000444222244442444244555000011112242200000000000011110005554000000045500005540004000455500001111222220000000000001111000555404000404552222554000200045550000111112220000000000000111100005554000004555000055540040045555000011111000000000000000111100000555544344555522225555444445555500001111100000000000000011110000005555555555550000555555555555500000111110022200000000001111000000555555555555222255555555555500000111111022222000000000111110000000055555555500005555555550000000011111102242200000000011111000000000000000002222000000000000000011111000222220000000000111110000000000000000111100000000000000011111100002220000000000011111100000000000000011110000000000000001111110000000000000000000111111111100000000001111000000000000001111110022200440000000000011111111111111100011111111110000000111111111022222044000222000000111111111111111111111111111111111111111111002242200000222220000000111111111111111111111111111111111111111000222220040022422000000000011111111111111111111111111111111111000002220000002222200000000000000000011111111110001111112221110000000000222000022200022200000000004000000000000000000002222200000000000222220000000022222000000000000044000000000000000224220000000022222422000000002242200000040444004400000000000000022222000000022222222200000000222220000000044440000000000000000000222000000002242222200000000002220000000000440000000000000000000000000000000222220000000000000000000000000000000000000000000000000000000000002220000000000000000000000000000000000000000000000000000000000000000000000

1
assets/maps/5.txt Normal file
View File

@ -0,0 +1 @@
4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444000000000000000000000000000004400000000000000000000000000000444400000000000000000000000000000440000000000000000000000000000044440000000000000000000000000000044000000000000000000000000000004444000000000000000000000000000004400000000000000000000000000000444400004444444440000444444440000440000444444440000444444444000044440110433333334000043333334000044000043333334000043333333401104444011043333333400004333333400004400004333333400004333333340110444400004444444440000444444440000440000444444440000444444444000044440000000000000000000000000000044000000000000000000000000000004444000000000000000000000000000004400000000000000000000000000000444400000000000000000000000000000000000000000000000000000000000044440000000000000000000000000000000000000000000000000000000000004444000000000000000000000000000000000000000000000000000000000000444400000000000000000000000000000000000000000000000000000000000044440000444333444000044000044334444443344000044000044433344400004444000044433344400004400004433444444334400004400004443334440000444400000000000000000440000000000440000000000440000000000000000044440000000000000000044000000000044000000000044000000000000000004444000000000000000004400000000004400000000004400000000000000000444400000000000000000444444400000440000044444440000000000000000044444444444444000000044444440000044000004444444000000044444444444444444444444400000004400000000004400000000004400000004444444444443333333333440000000440000000000000000000000440000000443333333333333333333344000000044000000000000000000000044000000044333333333333333333334400000004400000000000000000000004400000004433333333334444444444440000000440000444422222244440000440000000444444444444444444444444000000044000044442222224444000044000000044444444444444555555550000000000000004411111111114400000000000000055555555444455555555000000000000000331111111111330000000000000005555555544445555555500000000000000033111111111133000000000000000555555554444555555550000000000000003311111111113300000000000000055555555444455555555000000000000000441111111111440000000000000005555555544445555555500000000000000044444444444444000000000000000555555554444444444444400000004400004444444444444400004400000004444444444444444444444440000000440000000000000000000000440000000444444444444333333333344000000033000000000000000000000033000000044333333333333333333334400000003300000000000000000000003300000004433333333333333333333440000000330000000000000000000000330000000443333333333444444444444000000044000044334444443344000044000000044444444444444444444444400000004400004433444444334400004400000004444444444444400000000000000000000000000000440000000000000000000000000000044440000000000000000000000000000044000000000000000000000000000004444000433444004444400000000000000000000000000004444400444334000444400043344400444440000000000000000000000000000444440044433400044440000000440000000000000000000000000000000000000000004400000004444011000033000000000000000000000000000000000000000000330000110444401100003300000000000000000000000000000000000000000033000011044440000000330000000004400044333444433344000440000000003300000004444444400044000000000440004433344443334400044000000000440004444444444440004400000000044000000000440000000004400000000044000444444440000000000000000004400000000044000000000440000000000000000004444000000000000000000440000000004400000000044000000000000000000444400000000000000000044000000000440000000004400000000000000000044440000000000000000004400000000044000000000440000000000000000004444000044333344333344444333400004400004333444443333443333440000444400004433334433334444433340000440000433344444333344333344000044440000000000000000000000000000000000000000000000000000000000004444000000000000000000000000000000000000000000000000000000000000444400000000000000000000000000000000000000000000000000000000000044440000000000000000000000000000000000000000000000000000000000004444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444

1
assets/maps/6.txt Normal file
View File

@ -0,0 +1 @@
3333333333333333333333333333333333333333333333333333333333333334311111111111111111111111111111111111111111111111111111111111111431111111111111111111111111111111111111111111111111111111111111143000000000000000000000000000000110000040040400404004040040400404344333444333444333444333444333411000004004040040400404004040040431400040400040400040400040400041100033444434444344443444434444343140004040004040004040004040004110003000000000000000000000000004314000404000404000404000404000411444400440000000110000004400000431442440442440442440442440442441100040044000000011000000440440043140004040004040004040004040004110004000000440001100044000044004314000404000404000404000404000411444400000044000110004400000000431400040400040400040400040400041100030000000000011000000000000043111111111111111111111111111111114444333333333331133333333333334311111111111111111111111111111111000400000000000110000000000000430000000000001100000000000000001100041111111111111111111111111043444444444444114444444444444440114444111111111111111111111111104340000110000411401010101010104011000311444444444444444444444110434000011000041140101010101010401144441140000440000444400004411043400001100004114010101010101040110004114000040000003300000041104340000110000411400000000000004011000411200002000000330000004110434000011000041140000000000000401144441120000200000033000000411043400001100004114000000000000040110003114000040000003300000041104340000110000411400000000000004011444411400004400004444000044110434004011040041140110000000000401100041144444444444444442244411043444401104444114411444444444440110004111111111111111111111111104300000110000011001100000000000011444411111111111111111111111110431111111111111111111111111111111111111133333333333330034444444443111111111111111111111111111111111111113444444444443003333333333344434443444344434443444344433311333311340000400004300000000000334040404040404040404040404040031130031134000040000430000000000033404040404040404040404040404001111003333444424244443333333333333311111111111111111111111111111111111111111111111111300000000000331111111111111111111111111111111111111111111111111130000050005033011404040411144404441144411001111000115442444244503003000050003301140404041110040400114001144411333011540004000450300300000000330114443444111444044411444114001111301104000400040030030033333333011111111411100444001130011444111130110444444444003003000000003301111111141110040400114441130011444011000550550000300300005000334040404444111004040011400114441100401111111111111130000050005033404040411411111111111144411400114440111111111111113000000000003344434441141111111111113001144411003011333333333333300333333333331113111111111533333333333113001144401100000000000000000000000033111311111111153444344434443444110040110505050505050505050505003311333333333333340404040404040011444011000000000000000000000000331100000000000034040404040404441100301100505050505050505050505033110550055005503111111111111111114440110000000000000000000000003311055005500550311111111111111111004011050505050505050505050500331100000000000033333333333333331144401100000000000000000000000033111111111111111111111111300000110030113333333333333333333333333311111111111111111111111131110011444011333333333333333333333333331100000000000000000000113000001100401144444444444444444444440033110555555555555555555011311100114440114000000000044004444000003311555555555555555555551130000011003011400000000004400444400000331155555555555555555555113111001144401140044444444440044000040533115555555555555555555511300000110040114004444444444004400004053311555555555555555555551131110011444011400004400004400440044400331105555555555555555550113000001100301140000440000440044004445033110000000000000000000011311100114440114440044440044004400004503311433404334043340433401130000011004011444004444004400440000400331140040400404004040040113333331144401140000004400440044440040533114004040040400404004011000000110030114000000440044004444004053311111111111111111111111111111111444011000440000000000000000400331111111111111111111111111111111100401100044000000000000000040033333333333333333333333333333333334443334444444444444444444444333

1
assets/maps/7.txt Normal file
View File

@ -0,0 +1 @@
3333333333333333333333333333333333333333333333333333333333333333355555555555555555555555555555555555555555555555555555555555555335333333333333333333333333333333333333333333333333333333333333533530000000000000000000000000000000000000000000000000000000000353353044444004444444440044444444400444444444004444444440044444035335304000000000040000000000400000000004000000000040000000000403533530400010010004000100100040001001000400010010004000100100040353353040001001000400010010004000100100040001001000400010010004035335304011111111040111111110401111111104011111111040111111110403533530000010010000000100100000001001000000010010000000100100000353353000001001000000010010000000100100000001001000000010010000035335304011111111040111111110401111111104011111111040111111110403533530400010010004000100100040001001000400010010004000100100040353353040001001000400010010004000100100040001001000400010010004035335304000000000040000000000400000000004000000000040000000000403533530444440044444444400444444444004444444440044444444400444440353353040000000000400000000004000000000040000000000400000000004035335304000100100040001001000400010010004000100100040001001000403533530400010010004000100100040001001000400010010004000100100040353353040111111110401111111104011111111040111111110401111111104035335300000100100000001001000000010010000000100100000001001000003533530000010010000000100100000001001000000010010000000100100000353353040111111110401111111104011111111040111111110401111111104035335304000100100040001001000400010010004000100100040001001000403533530400010010004000100100040001001000400010010004000100100040353353040000000000400000000004000000000040000000000400000000004035335304444400444444444004444444440044444444400444444444004444403533530400000000004000000000040000000000400000000004000000000040353353040001001000400010010004000100100040001001000400010010004035335304000100100040001001000400010010004000100100040001001000403533530401111111104011111111040111111110401111111104011111111040353353000001001000000010010000000100100000001001000000010010000035335300000100100000001001000000010010000000100100000001001000003533530401111111104011111111040111111110401111111104011111111040353353040001001000400010010004000100100040001001000400010010004035335304000100100040001001000400010010004000100100040001001000403533530400000000004000000000040000000000400000000004000000000040353353044444004444444440044444444400444444444004444444440044444035335304000000000040000000000400000000004000000000040000000000403533530400010010004000100100040001001000400010010004000100100040353353040001001000400010010004000100100040001001000400010010004035335304011111111040111111110401111111104011111111040111111110403533530000010010000000100100000001001000000010010000000100100000353353000001001000000010010000000100100000001001000000010010000035335304011111111040111111110401111111104011111111040111111110403533530400010010004000100100040001001000400010010004000100100040353353040001001000400010010004000100100040001001000400010010004035335304000000000040000000000400000000004000000000040000000000403533530444440044444444400444444444004444444440044444444400444440353353040000000000400000000004000000000040000000000400000000004035335304000100100040001001000400010010004000100100040001001000403533530400010010004000100100040001001000400010010004000100100040353353040111111110401111111104011111111040111111110401111111104035335300000100100000001001000000010010000000100100000001001000003533530000010010000000100100000001001000000010010000000100100000353353040111111110401111111104011111111040111111110401111111104035335304000100100040001001000400010010004000100100040001001000403533530400010010004000100100040001001000400010010004000100100040353353040000000000400000000004000000000040000000000400000000004035335304444400444444444004444444440044444444400444444444004444403533530000000000000000000000000000000000000000000000000000000000353353333333333333333333333333333333333333333333333333333333333335335555555555555555555555555555555555555555555555555555555555555533333333333333333333333333333333333333333333333333333333333333333

1
assets/maps/8.txt Normal file
View File

@ -0,0 +1 @@
5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555553333333333333333333333333333334433333333333333333333333333333355300000000000000000000000000000440000000000000000000000000000035530444444444444444444444444444244244444444444444444444444444403553040000000000000000000000000004400000000000000000000000000040355304011111111111111111111111111441111111111111111111111111104035530401000000000000000000000000044000000000000000000000100010403553040104444444000000000000000004400000000000000000000010000040355304010400000400000000000000000440000000000055500055500055553035530401040000040000000000000000044000000000055555055555055555303553040104000004000000000000000004400000000005555505555505555530355304010400000200000000000000000440000000000555550555550555553035530401040000440000000000000000044000000000005550005550005555303553040104444240000000000000000000000000000000000000000010000040355304010000000044444444444444444444444444444444444400001111104035530401000000004000000000000000000000000000000000040000000010403553040104400440400444444444444444444444444444444004044444001040355304010000000040440000000500000500000000500000440404000000104035530401044004404040000050000050000000050050000004040400000010403553040100000000404000005000005000005005000000000404044444001040355304010440444040400000000500000500500000000000040400000000104035530401000000004040000044444444444444444444000004040444440010403553040104400440404000044555555555555555555440000404040004001040355304010000000040400054555555555555555555554000040404444400104035530401044004404040055455555555555555555555400004040400040010403553040100000000404000545555555555555555555540000404000000001040355304010440044040450004555555555555555555544000040404044400104035530401000000004045500455555555555555444444500004040440000010403553040111111110404555045555555555555445555500000404041111111040355304000000001040455004555555553333545000000000040401000000004035530444444440104045000455555555400454500000000054040104444444403553044444444010404000044555555540045450000555554404010444444440355304000000001040400005444444554003545000544444400401000000004035530401111111104040005000000445400354500544000000040111111110403553040100000000404000050000004440045450054400000004000000001040355304010000000040440000005500044004545000544444400400000000104035530401000000004004400000050004400354500005555544040000000010403553040100000000400044444444000440035450000000005404000000001040355304010000000040044000000500044004545000000000040400000000104035530401000000004044000000550004400454455555000004040000000010403553040100000000404000055000004440035544444450000404000000001040355304010000000040400005000004444003555555544000040400000000104035530401000000004040000444444444422444444444400004040000000010403553040100000000404000000000010101101000000000000404000000001040355304010000000040400000000000010110101000000000040400000000104035530401000000004040000000000101011010000000000004040000000010403553040100000000404400000000000101101010000000004404000000001040355304010000000040044444444444334224334444444444400400000000104035530401000000004000000000000000011000000000000000040000000010403553040100000000444444444444443342243344444444444444000000001040355304010000000000000000000000000110000000000000000000000000104035530401000004444404444404444400011044444444444444444444444010403553040100000400040400040400040001105050505050505050505050501040355304010000040004040004040004000111111111111111111111111111104035530401000004000404000404000400011050505050505050505050505010403553040100000442440442440442440001104444444444444444444444401040355304010000000100000100000100000110000000000000000000000000104035530401111111111111111111111111111111111111111111111111111110403553040000000000000000000000000000000000000000000000000000000040355304444444444444444444444444444444444444444444444444444444444035530000000000000000000000000000000000000000000000000000000000003553333333333333333333333333333333333333333333333333333333333333355555555555555555555555555555555555555555555555555555555555555555

1
assets/maps/9.txt Normal file
View File

@ -0,0 +1 @@
0000000000000000000000000000000000000000000000000555555550000000000000000000000000000443334444444444444444444444055555555044401000000000000000000000045000540000000000003000000405555555004040100000000000000000000004000004011111111000301005040055555000444010000000000000000000000300400301000010100040100004005555500000001000000000000000000000030040030105501011112010440400055550004440100000000000000000000004005004010550101000400000040005555500404010000000000000000000000400500401055010100044444444005555550044401000000000055555550000030040030105501010003000000400555555500000100000000055555555500003004003010550101000301005040555555550040010000000005555555550000400000401000010100040100004055555550000001000000005555555555500040000040111111011112010440405555555011111100000000555555555550003004003010000101000400000040555555500000000000000555555555555000300400301055010100044444444055555500100000000000055555555555500040050040105501010003000000405555550000000000000005555550005550004005004010550101000301005040555555501000000000005555550000000000300400301055010100040100004005555550000000000000555555000000000030040030105501011112010440400555555010000000000055555000553334444244424010000101000400000040055555500000000000000555000555550000400000401111110100044444444005555551000000000000000000555555000040000020000000010003000000400555555100000000000000000005555011112000002111111111000301005040005555511000000000000000000003001000400000200000000100040100004000555551100000000000000000000300100040000040000000011112010440400055555111000050000000000000040010004440444000000000000400000040000555511100055000000000000004442444554045544444444444444444444000055551115005550000000000000400000455404554000004000000000000400000555111555555000000000000040555044442444405550400000000000040000005511155555500000000000004055500002020000555020000000000004000000051115555550000000000000405550444404444055504000000000000400000000111555555000000000000040000045540455400000400000000000040000000011155555500000000000004444444554245544400444433333333424000000000015555550000000000000000000000000000040040000000000000000000000010055505000000000000000000000000000004444000000000000000000000000000000500000000044444444444440100000000000000000000000000000000100000050000000004000000000004011111111111111111111111111111111110000005000000000400000000000401000000000000000000000000000000000000005500000000040000000000040103010301030103010301030103010301000000550000000004424342434244010401040104010401040104010401040100000055000000000000000000000001000000000000000000000000000000000000005500000000000111111111111111111111111111111111111111111111100000550000000000010000000000010000000000000000000000000000000000000055000000000000000000000001010101010101010101010100000101010000055500000000000100000000000101010101010101010101010555010101000005555000000000000000000000010000000000000000000005555000000000555555550000000001000000000000000000000000000000005555000055550005555555500000000000050000005500000000000000005505555555555550055555555555005555010005550005500555000000000000055555555555555555555555555555500000000005555555555550055000550055555555555555555555555555555555555155555555555555555500000005555555555555555555555555555555555555515555555555555555555555555555555555555555555555555555555555555551555555555555555555555555555555555555555555555555555555555555551115135555555555555555555555555555555555555555555555555555555555111555555555555555555555555555555555555555555555555555555555555511151355555555555555555555555555555555555555555555555555555555555155555555555555555555555555555555555555555555555555555555555555111513555555555555555555555555555555555555555555555555555555555511155555555555555555555555555555555555555555555555555555555555551115135555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555

Binary file not shown.

Binary file not shown.

BIN
assets/style_dark.rgs Normal file

Binary file not shown.

158
bf.go
View File

@ -2,8 +2,12 @@ package main
import (
"fmt"
"math/rand"
"os"
"runtime"
"strconv"
gui "github.com/gen2brain/raylib-go/raygui"
rl "github.com/gen2brain/raylib-go/raylib"
)
@ -11,16 +15,20 @@ const (
screenWidth = 1280
screenHeight = 720
ballRadius = 12
debug = false
squareSize = 128
debug = false
)
var (
ballpos = rl.Vector2{X: 400, Y: 225}
ballColor = rl.Black
speed = 3
squareSize = 100
squares = []rl.Vector2{{X: 640 - float32(squareSize), Y: 315}, {X: 640, Y: 315}, {X: 640 + float32(squareSize), Y: 315}, {X: 640, Y: 315 - float32(squareSize)}, {X: 640, Y: 315 - float32(squareSize)*2}}
paints = []paint{}
speed = 3
ballPos = rl.Vector2{X: 4096, Y: 4096}
cameraPos = rl.Vector2{3500, 3800}
ballColor = rl.Black
squares = []rl.Vector2{{-200, 500}, {X: 640 - float32(squareSize), Y: 315}, {X: 640, Y: 315}, {X: 640 + float32(squareSize), Y: 315}, {X: 640, Y: 315 - float32(squareSize)}, {X: 640, Y: 315 - float32(squareSize)*2}}
paints = []paint{}
chatBoxText = ""
inputText = ""
loadedMap = ""
)
func main() {
@ -29,22 +37,57 @@ func main() {
ballColor = convertHex(userData["color"].(string))
rl.InitWindow(screenWidth, screenHeight, "balls offline")
guessy4 := rl.LoadFont("guessy4.ttf")
rl.InitAudioDevice()
rl.SetTargetFPS(60)
guessy := rl.LoadFont("./assets/font/guessy4.ttf")
carlito := rl.LoadFont("./assets/font/carlito.ttf")
notification := rl.LoadSound("./assets/sound/Notification.ogg")
chatMessage := rl.LoadSound("./assets/sound/ChatMessage.ogg")
gui.LoadStyle("./assets/bf.rgs")
chatBoxText = userData["username"].(string) + " joined the game."
rl.PlaySound(notification)
rawMap, Error := os.ReadFile("./assets/maps/" + strconv.Itoa(rand.Intn(9)) + ".txt")
loadedMap = string(rawMap)
check(Error)
for !rl.WindowShouldClose() {
rl.BeginDrawing()
rl.ClearBackground(rl.NewColor(128, 128, 128, 255))
drawSquares()
drawMap(loadedMap)
drawPaint()
drawPosition(ballpos, rl.Vector2{X: 10, Y: screenHeight - 20}, guessy4)
drawBall(ballpos, ballColor, rl.White)
drawBall(ballPos, ballColor, rl.White)
moveBall()
drawTextShadow(userData["username"].(string), rl.Vector2{X: ballpos.X - ballRadius - 24, Y: ballpos.Y - ballRadius - 40}, guessy4)
usernamePosisiton := rl.Vector2Subtract(ballPos, rl.Vector2{ballRadius + 24, ballRadius + 40})
usernamePosisiton = rl.Vector2Subtract(usernamePosisiton, cameraPos)
var spacing int = 21
drawTextShadow("Balls Offline", rl.Vector2{10, 5}, carlito)
rl.DrawLine(10, 33, 120, 33, rl.White)
drawTextShadow("Version: 0.0.0", rl.Vector2{10, float32(2*spacing + 1)}, carlito)
drawTextShadow("Platform: "+runtime.GOOS, rl.Vector2{10, float32(3*spacing + 1)}, carlito)
drawTextShadow("Client ID: none", rl.Vector2{10, float32(5*spacing + 1)}, carlito)
x := strconv.FormatFloat(float64(ballPos.X), 'f', -1, 64)
y := strconv.FormatFloat(float64(ballPos.Y), 'f', -1, 64)
drawTextShadow("Position: "+x+" | "+y, rl.Vector2{10, float32(6*spacing + 1)}, carlito)
drawTextShadow(userData["username"].(string), usernamePosisiton, guessy)
if rl.IsKeyPressed(rl.KeyEnter) && inputText != "" {
rl.PlaySound(chatMessage)
chatBoxText = chatBoxText + "\n" + userData["username"].(string) + ": " + inputText
inputText = ""
}
gui.TextBox(rl.NewRectangle(screenWidth-screenWidth/4, 0, screenWidth/4, 220), &chatBoxText, 100, false)
gui.TextBox(rl.NewRectangle(screenWidth-screenWidth/4, 220, screenWidth/4, 20), &inputText, 100, true)
rl.EndDrawing()
}
@ -65,7 +108,7 @@ func drawPaint() {
if paintI.time > 1 {
paints[index] = paint{time: paintI.time - 1, location: paintI.location}
rl.DrawRectangleV(paintI.location, rl.Vector2{X: ballRadius - 2, Y: ballRadius - 2}, rl.NewColor(ballColor.R, ballColor.G, ballColor.R, uint8(paintI.time)))
rl.DrawRectangleV(rl.Vector2Subtract(paintI.location, cameraPos), rl.Vector2{X: ballRadius - 2, Y: ballRadius - 2}, rl.NewColor(ballColor.R, ballColor.G, ballColor.R, uint8(paintI.time)))
continue
}
paints = removePaint(paints, index)
@ -75,11 +118,11 @@ func drawPaint() {
func drawSquares() {
for index, element := range squares {
debugLog(debug, fmt.Sprintln(index, element.X))
rl.DrawRectangleV(element, rl.Vector2{X: float32(squareSize), Y: float32(squareSize)}, rl.LightGray)
rl.DrawRectangleV(rl.Vector2{element.X - cameraPos.X, element.Y - cameraPos.Y}, rl.Vector2{X: float32(squareSize), Y: float32(squareSize)}, rl.LightGray)
}
}
func draw() {
paintedPaint := paint{255, ballpos}
paintedPaint := paint{255, ballPos}
paints = append(paints, paintedPaint)
}
@ -87,44 +130,37 @@ func moveBall() {
if rl.IsKeyDown(rl.KeyLeftShift) {
draw()
}
if rl.IsKeyDown(rl.KeyS) {
speed += 2
if rl.IsKeyDown(rl.KeyRight) && !checkCollision(rl.Vector2{X: ballPos.X + float32(speed), Y: ballPos.Y}) {
ballPos.X = ballPos.X + float32(speed)
cameraPos.X = cameraPos.X + float32(speed)
}
if rl.IsKeyDown(rl.KeyRight) && !checkCollision(rl.Vector2{X: ballpos.X + float32(speed), Y: ballpos.Y}) {
ballpos.X = ballpos.X + float32(speed)
if rl.IsKeyDown(rl.KeyLeft) && !checkCollision(rl.Vector2{X: ballPos.X - float32(speed), Y: ballPos.Y}) {
ballPos.X = ballPos.X - float32(speed)
cameraPos.X = cameraPos.X - float32(speed)
}
if rl.IsKeyDown(rl.KeyLeft) && !checkCollision(rl.Vector2{X: ballpos.X - float32(speed), Y: ballpos.Y}) {
ballpos.X = ballpos.X - float32(speed)
if rl.IsKeyDown(rl.KeyUp) && !checkCollision(rl.Vector2{X: ballPos.X, Y: ballPos.Y - float32(speed)}) {
ballPos.Y = ballPos.Y - float32(speed)
cameraPos.Y = cameraPos.Y - float32(speed)
}
if rl.IsKeyDown(rl.KeyUp) && !checkCollision(rl.Vector2{X: ballpos.X, Y: ballpos.Y - float32(speed)}) {
ballpos.Y = ballpos.Y - float32(speed)
}
if rl.IsKeyDown(rl.KeyDown) && !checkCollision(rl.Vector2{X: ballpos.X, Y: ballpos.Y + float32(speed)}) {
ballpos.Y = ballpos.Y + float32(speed)
if rl.IsKeyDown(rl.KeyDown) && !checkCollision(rl.Vector2{X: ballPos.X, Y: ballPos.Y + float32(speed)}) {
ballPos.Y = ballPos.Y + float32(speed)
cameraPos.Y = cameraPos.Y + float32(speed)
}
}
func drawBall(pos rl.Vector2, color, outline rl.Color) {
rl.DrawCircleV(pos, ballRadius+1, outline)
rl.DrawCircleV(pos, ballRadius, color)
rl.DrawCircleV(rl.Vector2Subtract(pos, cameraPos), ballRadius+1, outline)
rl.DrawCircleV(rl.Vector2Subtract(pos, cameraPos), ballRadius, color)
}
func drawPosition(pos, textPos rl.Vector2, guessy4 rl.Font) {
x := strconv.FormatFloat(float64(pos.X), 'f', -1, 64)
y := strconv.FormatFloat(float64(pos.Y), 'f', -1, 64)
drawTextShadow("X:"+x, textPos, guessy4)
drawTextShadow("Y:"+y, rl.Vector2Add(textPos, rl.Vector2{X: 90, Y: 0}), guessy4)
}
func drawTextShadow(text string, textPos rl.Vector2, guessy4 rl.Font) {
func drawTextShadow(text string, textPos rl.Vector2, font rl.Font) {
var textShadowPos rl.Vector2 = rl.Vector2{X: textPos.X + 2, Y: textPos.Y + 2}
rl.DrawTextEx(guessy4, text, textShadowPos, 20, 1, rl.Black)
rl.DrawTextEx(guessy4, text, textPos, 20, 1, rl.White)
rl.DrawTextEx(font, text, textShadowPos, 20, 1, rl.Black)
rl.DrawTextEx(font, text, textPos, 20, 1, rl.White)
}
func checkCollision(newPos rl.Vector2) bool {
if debug {
rl.DrawLineV(newPos, rl.Vector2{X: newPos.X, Y: screenWidth * 2}, rl.Green)
rl.DrawLineV(newPos, rl.Vector2{X: newPos.X, Y: 0}, rl.Green)
@ -145,16 +181,16 @@ func checkCollision(newPos rl.Vector2) bool {
}
}
if newPos.X > screenWidth-12 {
if newPos.X > float32(64*squareSize) {
return true
}
if newPos.X < 12 {
if newPos.X < 0 {
return true
}
if newPos.Y < 12 {
if newPos.Y < 0 {
return true
}
if newPos.Y > screenHeight-12 {
if newPos.Y > float32(64*squareSize) {
return true
}
return false
@ -185,3 +221,37 @@ func convertHex(hex string) rl.Color {
return rl.NewColor(uint8(decimal), uint8(decimal2), uint8(decimal3), 255)
}
func drawMap(mapRaw string) {
var lines []string
for i := 0; i < len(mapRaw); i += 64 {
end := i + 64
if end > len(mapRaw) {
end = len(mapRaw)
}
lines = append(lines, mapRaw[i:end])
}
for y := range lines {
for x := 0; x < len(lines[y]); x++ {
fmt.Println(lines[0][0])
switch lines[y][x] {
case 48: //air
case 49: //path
rl.DrawRectangleV(rl.Vector2{float32(x*squareSize) - cameraPos.X, float32(y*squareSize) - cameraPos.Y}, rl.Vector2{X: float32(squareSize), Y: float32(squareSize)}, rl.NewColor(133, 133, 133, 255))
case 50: //door
rl.DrawRectangleV(rl.Vector2{float32(x*squareSize) - cameraPos.X, float32(y*squareSize) - cameraPos.Y}, rl.Vector2{X: float32(squareSize), Y: float32(squareSize)}, rl.NewColor(112, 122, 112, 255))
case 51: //glass
rl.DrawRectangleV(rl.Vector2{float32(x*squareSize) - cameraPos.X, float32(y*squareSize) - cameraPos.Y}, rl.Vector2{X: float32(squareSize), Y: float32(squareSize)}, rl.NewColor(144, 144, 144, 255))
case 52: //wall
rl.DrawRectangleV(rl.Vector2{float32(x*squareSize) - cameraPos.X, float32(y*squareSize) - cameraPos.Y}, rl.Vector2{X: float32(squareSize), Y: float32(squareSize)}, rl.NewColor(170, 170, 170, 255))
case 53: //liquid
rl.DrawRectangleV(rl.Vector2{float32(x*squareSize) - cameraPos.X, float32(y*squareSize) - cameraPos.Y}, rl.Vector2{X: float32(squareSize), Y: float32(squareSize)}, rl.NewColor(205, 205, 205, 255))
}
}
}
}

1
go.mod
View File

@ -6,5 +6,6 @@ require github.com/gen2brain/raylib-go/raylib v0.0.0-20240418150228-9548fadb54e6
require (
github.com/ebitengine/purego v0.7.1 // indirect
github.com/gen2brain/raylib-go/raygui v0.0.0-20240421191056-278df68f40bb
golang.org/x/sys v0.19.0 // indirect
)

2
go.sum
View File

@ -1,5 +1,7 @@
github.com/ebitengine/purego v0.7.1 h1:6/55d26lG3o9VCZX8lping+bZcmShseiqlh2bnUDiPA=
github.com/ebitengine/purego v0.7.1/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ=
github.com/gen2brain/raylib-go/raygui v0.0.0-20240421191056-278df68f40bb h1:rL+CF2bsLRFjV/x/nRQTXVVFpsZzLXuRErMTsd6kVVs=
github.com/gen2brain/raylib-go/raygui v0.0.0-20240421191056-278df68f40bb/go.mod h1:Ra1zgJP7vnGst+STvzPPiVJhjicklFWONCz5nu6MnOM=
github.com/gen2brain/raylib-go/raylib v0.0.0-20240418150228-9548fadb54e6 h1:mNKFgLZIU0eEHKHjb7Uk9ZuSy65DdgmEf2xxum0Tof4=
github.com/gen2brain/raylib-go/raylib v0.0.0-20240418150228-9548fadb54e6/go.mod h1:P/hDjVwz/9fhR0ww3+umzDpDA7Bf7Tce4xNChHIEFqE=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=