Browse Source

bunch of demo coding stuff

pixelbath 1 year ago
parent
commit
a2fb398f4b
8 changed files with 92 additions and 0 deletions
  1. 5 0
      sizecode01.lua
  2. 42 0
      tcc-2022/README.md
  3. 0 0
      tcc-2022/tcc01.lua
  4. 0 0
      tcc-2022/tcc02.lua
  5. 0 0
      tcc-2022/tcc04.lua
  6. 0 0
      tcc-2022/tcc06.lua
  7. 25 0
      tcc-2022/tcc07.lua
  8. 20 0
      tcc-2022/tcc08.lua

+ 5 - 0
sizecode01.lua

@@ -0,0 +1,5 @@
+TIC=load's=math.sin t=t+.1v=s(t/9)*9 for x=0,11 do for y=0,135 do line(x*20,y,x*w+w,y,s(y/x+v)*16)end;end't=0w=20
+
+-- <PALETTE>
+-- 000:1a1c2c5d275db13e53ef7d57ffcd75a7f07038b76425717929366f3b5dc941a6f673eff7f4f4f494b0c2566c86333c57
+-- </PALETTE>

+ 42 - 0
tcc-2022/README.md

@@ -0,0 +1,42 @@
+# Lovebyte Tiny Code Christmas 2022
+
+The 12 Daily Challenges (of which I did 7 or 8):
+
+Day 0 - Getting Started
+* All you need to get ready for tomorrow!
+
+Day 1 - Making Shapes
+* Get to grips with the basics of TIC-80 and PICO-8!
+
+Day 2 - Snow `time()` Like the Present
+* Add some basic animation to your scene!
+
+Day 3 - Little By Little
+* Create a full-screen effect by manipulating each pixel individually!
+
+Day 4 - Sines of the Times
+* Create an animated plasma effect!
+
+Day 5 - Polar Express
+* Create an animated tunnel effect using polar coordinates!
+
+Day 6 - Hello, Demoscene!
+* Create an animated sine-scroller effect!
+
+Day 7 - Mix and Match
+* Show us what you got by combining effects!
+
+Day 8 - Round and Round
+* Create an animated tentacle effect by rotating circles!
+
+Day 9 - Shade the Bob
+* Create a classic shadebob effect!
+
+Day 10 - The Big Squeeze
+* Create a multipart effect and learn about packing!
+
+Day 11 - The Third Dimension
+* Create a spinning 3D voxel cube!
+
+Day 12 - Rockin' around the Christmas Tree!
+* Create a spinning 3D christmas tree!

+ 0 - 0
tcc01.lua → tcc-2022/tcc01.lua


+ 0 - 0
tcc02.lua → tcc-2022/tcc02.lua


+ 0 - 0
tcc04.lua → tcc-2022/tcc04.lua


+ 0 - 0
tcc06.lua → tcc-2022/tcc06.lua


+ 25 - 0
tcc-2022/tcc07.lua

@@ -0,0 +1,25 @@
+-- M=math
+-- R=M.random
+-- TIC=load'H=500t=time()/H for i=0,999 do x=R(239)-120y=R(135)-68W=(M.atan2(x,y)+M.pi)*2Y=999/(x*x+y*y+1)^.5G=(W/Y)pix(x+120,y+68, G+t)end for p=1,#T do print(T:sub(p,p),H-((t*50)+(p*9))%H,M.sin(t*4+p)*9+68,0,0,2)end'T="!emit rellorcs s'ti"
+
+M=math
+S=M.sin
+R=M.random
+T="rellorcs rehtona rof emit"
+function TIC()t=time()/500
+for i=0,999 do
+x=R(239)-120
+y=R(135)-68
+W=(M.atan2(y,x)+M.pi)*2.54
+Y=999/(x*x+y*y+1)^.5
+G=((W//1)~(Y//1))/5
+pix(x+120,y+68, G+t)
+end
+for p=1,#T do
+print(T:sub(p,p),470-((t*50)+(p*9))%500,S(t*4+p)*9+68,0,0,2)
+end
+end
+
+-- <PALETTE>
+-- 000:1a1c2c5d275db13e53ef7d57ffcd75a7f07038b76425717929366f3b5dc941a6f673eff7f4f4f494b0c2566c86333c57
+-- </PALETTE>

+ 20 - 0
tcc-2022/tcc08.lua

@@ -0,0 +1,20 @@
+
+t=0
+function TIC()t=t+.1
+	--cls()
+	for i=0,7 do
+		a=2*math.pi*(i/7)+t
+		x=math.cos(a)*40
+		y=math.sin(a)*40
+		circ(x+120, y+68, 5+math.sin(t)*6, t*10)
+	end
+	for i=0,4e4 do
+		x=i%240y=i/240
+		pix(x, y, pix(x+1, y))
+	end
+end
+
+-- <PALETTE>
+-- 000:1a1c2c5d275db13e53ef7d57ffcd75a7f07038b76425717929366f3b5dc941a6f673eff7f4f4f494b0c2566c86333c57
+-- </PALETTE>
+