Remove _tile with Bounding Box

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
haazet
Prole
Posts: 8
Joined: Fri Jan 01, 2016 12:45 pm

Remove _tile with Bounding Box

Post 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
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests