hello, I'm making a game of "JawBreaker" in love2d.
I have done only the rows and columns of the balls.
Now, I can not remove the balls close to the selected ball.
as I can do this in love2d.
here I leave the code that I have, so far
File:
help, how to make a game "JawBreaker" in love2d
- luislasonbra
- Citizen
- Posts: 60
- Joined: Sun Jun 24, 2012 1:57 pm
Re: help, how to make a game "JawBreaker" in love2d
The removing-mechanic consists of three steps: 1. find all balls of the same color, that touch a certain ball, and mark them for removal, 2. remove all marked balls, 3. move all other balls downwards.
At which part do you have problems?
For the first step you will need a flood fill algorithm.
At which part do you have problems?
For the first step you will need a flood fill algorithm.
Check out my blog on gamedev
- luislasonbra
- Citizen
- Posts: 60
- Joined: Sun Jun 24, 2012 1:57 pm
Re: help, how to make a game "JawBreaker" in love2d
hello.micha wrote:The removing-mechanic consists of three steps: 1. find all balls of the same color, that touch a certain ball, and mark them for removal, 2. remove all marked balls, 3. move all other balls downwards.
At which part do you have problems?
For the first step you will need a flood fill algorithm.
the problem is in the first method.
Would not know how to find the balls of the same color who are around?
Re: help, how to make a game "JawBreaker" in love2d
As I said, the algorithm you need, is a flood-fill algorithm. Try to read the wikipedia-article, that I posted (and see the language version in your language).
I also found the Roland did a Floodfill project. I don't know if this is appropriate for your case, though.
I also found the Roland did a Floodfill project. I don't know if this is appropriate for your case, though.
Check out my blog on gamedev
- luislasonbra
- Citizen
- Posts: 60
- Joined: Sun Jun 24, 2012 1:57 pm
Re: help, how to make a game "JawBreaker" in love2d
hi thanks for the help, but I think I decided to start with a difficult game?micha wrote:As I said, the algorithm you need, is a flood-fill algorithm. Try to read the wikipedia-article, that I posted (and see the language version in your language).
I also found the Roland did a Floodfill project. I don't know if this is appropriate for your case, though.
Re: help, how to make a game "JawBreaker" in love2d
I don't know your background, but I'd say this algorithm is of medium difficulty. If you are willing to try something a bit more difficult, then I suggest you try it. In the worst case you still learn a lot. But if you only want to finish a game, then you might be faster with a different idea.
Check out my blog on gamedev
- luislasonbra
- Citizen
- Posts: 60
- Joined: Sun Jun 24, 2012 1:57 pm
Re: help, how to make a game "JawBreaker" in love2d
thanks anyway, I think I will make a breakout game.micha wrote:I don't know your background, but I'd say this algorithm is of medium difficulty. If you are willing to try something a bit more difficult, then I suggest you try it. In the worst case you still learn a lot. But if you only want to finish a game, then you might be faster with a different idea.
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests