hy,
I am trying to develop a puzzle game in lua, someone knows some nice examples, or could someone explain what the best aproach to do this.
thks in advance. [import]uid: 92107 topic_id: 15442 reply_id: 315442[/import]
hy,
I am trying to develop a puzzle game in lua, someone knows some nice examples, or could someone explain what the best aproach to do this.
thks in advance. [import]uid: 92107 topic_id: 15442 reply_id: 315442[/import]
just start doing and post ur doubts… we will be happy to help you out… [import]uid: 71210 topic_id: 15442 reply_id: 57103[/import]
i am already displaying the bubbles and have them in a matrix like this:
0-0-0-0-0-0
-0-0-0-0-0-
0-0-0-0-0-0
-0-0-0-0-0-
Made a bublle shoot also, but now i need to resolve collision with the other bubbles, and i dont know how , and i havent found very much on google yet
Only thing i have is when bubble hits other bubble he stops lool, he should move to between the two bubbles and check for bubbles of the same type. [import]uid: 92107 topic_id: 15442 reply_id: 57110[/import]
will give some food for your thoughts…
are you using physics ?
so probably your physics environment have a -ve gravity. so that bubbles always stick to the top. u should put static objects around the screen coordinates so that bubbles won’t go up. so how far did you reach with these ?
you should consider adding all bubbles to an array so that they can be individually identified.
for deleting bubbles of same type i think its better to check the type of bubbles which are touching to each other. collision won’t be a good solution here as the bubble can collide with one bubble on the way and can go and rest in another position. so when you shoot a bubble once it settles somewhere you should check all bubbles touching it and bubbles touching to those bubbles also (this should continue). put all those identified bubble in to a new array and pop it… [import]uid: 71210 topic_id: 15442 reply_id: 57115[/import]
hey again, and thks for the replys
I have put all bubbles in a array, and i am popping the bubbles of the same type, now i am trying to remove the leftovers(the ones that are not connected with the uppers bubbles anymore), i check if the bubble has a neighborn, if not he falls.
My new problem is when there are a few bubbles connected with each other but not with the top ones. [import]uid: 92107 topic_id: 15442 reply_id: 57579[/import]
i already solved it
just putted a flag connected true/false in each bubble.
all bubbles at the top have connected = true, after that i check all bubbles connected to the top, and so on.
At the end all bubbles who have not been checked(connected = false) , fall down. [import]uid: 92107 topic_id: 15442 reply_id: 57593[/import]
hy again,
i have the game almost done now, i just have a problem,
when there are bubbles falling down, and i shoot a new bubble, they collide, they shouldnt collide, because they are “lost bubbles”, how can i do a filter, that they can have physics to fall down, but dont collide with the bubble that i shoot.
thks, [import]uid: 92107 topic_id: 15442 reply_id: 60130[/import]
Easier way is to set the isSensor property to tre.by this other objects will just pass over it but won’t bounce.but it will register collision and collision event will be called.another method is to use collision filter.
I think it’s better to use the first method. Cannot give you any examples as am not at my desk. [import]uid: 71210 topic_id: 15442 reply_id: 60135[/import]
Easier way is to set the isSensor property to tre.by this other objects will just pass over it but won’t bounce.but it will register collision and collision event will be called.another method is to use collision filter.
I think it’s better to use the first method. Cannot give you any examples as am not at my desk. [import]uid: 71210 topic_id: 15442 reply_id: 60136[/import]
i used the second example,collision filters.
found the “Helper Chart” and made it work :D.
Now the game is almost finished, thks for your help, will be making more stuff, so i will most certainly post more questions :D. [import]uid: 92107 topic_id: 15442 reply_id: 60152[/import]