Page 1 of 1

Remove _tile with Bounding Box

Posted: Wed Mar 30, 2016 5:23 am
by haazet
Im using a Clone of the number puzzle game 2048, but mixing in a bit of NES/SNES Warios Woods. Ive got the basic game down
- 2048 Puzzle/ Works great using tiles
-Wario Woods/ background works great player is able to Move/Pickup/Throw Enemys/Bombs/Jump/Heath/Animation

Im using a simple bounding box script and calling collisions like this

if CheckCollision(Bomb.x, Bomb.y, Bomb.sprite:getWidth(), Bomb.sprite:getHeight(), Player.x, Player.y , Player.sprite:getWidth(), Player.sprite:getHeight())
and love.keyboard.isDown("b") then //etc




Id like to have whatever tile in the puzzle that touches Bomb.sprite get eliminated or merge with another card(any) and delete the bomb as well.

Ive down a shooter before and I used "table.remove" with the bounding box, but is not working here. Sorry for my incomperhension. A example game that deletes a similar tile would be great.


Heres a picture to help understand. It plays like Threes! on mobile or like 2048 and other varients

https://love2d.org/imgmirrur/xbQlcya.png

Here is my Main.lua. (291 is add_tile and 199 is tile_merge) and my game is very rough in the grid_draw(433)/update(313)
http://hastebin.com/eyujoqajop.lua