Browse Source

cleanup, moving stuff

pixelbath 2 years ago
parent
commit
ead5c39c01
6 changed files with 20 additions and 9 deletions
  1. BIN
      blockbattle/blockbattle.aseprite
  2. 12 1
      drop.lua
  3. 0 0
      einhander/build.bat
  4. BIN
      tinyablo.aseprite
  5. BIN
      tinyablo/tinyablo.aseprite
  6. 8 8
      tinyablo/tinyablo.lua

BIN
blockbattle/blockbattle.aseprite


+ 12 - 1
drop.lua

@@ -41,6 +41,9 @@ launchLaserTimer = 0
 launchBalls = playerBalls
 launchBalls = playerBalls
 launchLasers = playerLasers
 launchLasers = playerLasers
 
 
+-- debug stuff
+freeze = false
+
 function generate_grid()
 function generate_grid()
   for row=0,num_rows-1 do
   for row=0,num_rows-1 do
     blocks[row] = {}
     blocks[row] = {}
@@ -105,6 +108,9 @@ function draw_balls_and_lasers()
     -- prune the fallen boyz
     -- prune the fallen boyz
     if ball.y >= ypos + 2 then
     if ball.y >= ypos + 2 then
       table.remove(balls, k)
       table.remove(balls, k)
+      if #balls == 0 then
+        
+      end
     end
     end
   end
   end
 end
 end
@@ -119,9 +125,11 @@ function check_ball_collisions(ball)
             if row * blockHeight - ball.y <= 1 or row * blockHeight + blockHeight - ball.y <= 1 then
             if row * blockHeight - ball.y <= 1 or row * blockHeight + blockHeight - ball.y <= 1 then
               ball.vy = ball.vy * -1
               ball.vy = ball.vy * -1
               blocks[row][col] = blockVal - 1
               blocks[row][col] = blockVal - 1
+              freeze = true
             else
             else
               ball.vx = ball.vx * -1
               ball.vx = ball.vx * -1
               blocks[row][col] = blockVal - 1
               blocks[row][col] = blockVal - 1
+              freeze = true
             end
             end
           end
           end
         end
         end
@@ -240,7 +248,10 @@ function TIC()
 
 
   draw_blocks()
   draw_blocks()
   draw_debug()
   draw_debug()
-  t=t+1
+
+  if not freeze then
+    t=t+1
+  end
 end
 end
 
 
 -- <TILES>
 -- <TILES>

+ 0 - 0
einhander/start.bat → einhander/build.bat


BIN
tinyablo.aseprite


BIN
tinyablo/tinyablo.aseprite


+ 8 - 8
tinyablo.lua → tinyablo/tinyablo.lua

@@ -6,8 +6,8 @@
 t=0
 t=0
 
 
 p = {
 p = {
-	x = 10,
-	y = 10,
+	x = -140,
+	y = -20,
 	spr = 0,
 	spr = 0,
 }
 }
 
 
@@ -19,9 +19,9 @@ skeleton = {
 map = {
 map = {
 	{ 2, 0, 0, 0, 0, 0, 0, 0 },
 	{ 2, 0, 0, 0, 0, 0, 0, 0 },
 	{ 0, 0, 0, 0, 0, 0, 0, 0 },
 	{ 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ 0, 0, 0, 0, 0, 0, 0, 0 },
-	{ 0, 0, 0, 0, 0, 0, 0, 0 },
+	{ 0, 0, 0, 2, 0, 0, 0, 0 },
+	{ 0, 0, 0, 0, 2, 0, 0, 0 },
+	{ 0, 0, 0, 0, 0, 2, 0, 0 },
 	{ 0, 0, 0, 0, 0, 0, 0, 0 },
 	{ 0, 0, 0, 0, 0, 0, 0, 0 },
 	{ 0, 0, 0, 0, 0, 0, 0, 0 },
 	{ 0, 0, 0, 0, 0, 0, 0, 0 },
 	{ 0, 0, 0, 0, 0, 0, 0, 0 },
 	{ 0, 0, 0, 0, 0, 0, 0, 0 },
@@ -29,7 +29,7 @@ map = {
 
 
 
 
 function handle_mouse()
 function handle_mouse()
-	mx, my, pl, pm, pr = mouse()
+	local mx, my, pl, pm, pr = mouse()
 
 
 end
 end
 
 
@@ -37,7 +37,7 @@ function map2screen(mapx, mapy)
 	return (mapx-mapy-1) * 8 - p.x, (mapx+mapy-1) * 4 - p.y
 	return (mapx-mapy-1) * 8 - p.x, (mapx+mapy-1) * 4 - p.y
 end
 end
 
 
-function update()
+function drawTiles()
 	for ky,yt in pairs(map) do
 	for ky,yt in pairs(map) do
 		for kx,xt in pairs(yt) do
 		for kx,xt in pairs(yt) do
 			xtile, ytile = map2screen(kx, ky)
 			xtile, ytile = map2screen(kx, ky)
@@ -58,7 +58,7 @@ function TIC()
 	local xtile = 0
 	local xtile = 0
 	local ytile = 0
 	local ytile = 0
 
 
-	update()
+	drawTiles()
 	t=t+1
 	t=t+1
 end
 end