puzzle help

Game Editor comments and discussion.

Re: puzzle help

Postby foleyjo » Sat Jul 23, 2011 10:34 am

Well Nykos if your working with the code that I used we are both at the same point with this.

I honestly don't know how to do this type of game yet and am still trying lots of different ideas.
I too noticed the issue with the colourmatch++ not working from the start. There was also an issue with the new ball colliding in the middle of 2 balls of the same colour(not sure if I fixed this in that last upload)

What I'm struggling with is how to check all the balls out of sequence. I think a get all actors in collision is the way to go .

I'll try some more things over the next few days and post any positive results.


A few other points -
setup actor when used correctly will be used to place the balls in there correct locations too. Rather than having 100's of clones on screen that you may have to delete at some point. Planning levels on paper and using arrays will probably be the best option here. But this is not needed yet

checker actor : I think I got rid of in the latest build I'm working with so it's not too important.

The Ball Checker animation isn't quite right. It needs to be a bigger version of the ball so it can correctly identify which balls are in the collision. However I just made it quickly in paint and it's not the correct shape so it sometimes misses out collisions.


Your image appears to have the balls floating. For what I'm looking at any ball not attached to the top bar directly or through the colliding balls, will fall. If you do not need this feature then you can remove the top bar.
KISS -Keep It Simple Stoopid
foleyjo
 
Posts: 275
Joined: Mon Jul 09, 2007 1:15 pm
Score: 15 Give a positive score

Re: puzzle help

Postby foleyjo » Sat Jul 23, 2011 6:00 pm

Latest version --

Updates
Got rid of checker
Added new actor border. All game balls (except for the new one) need to be inside this actor for checks
Fixed an issue where when a ball was fired off screen 2 new balls would be created after the next collision
Fixed an issue where it was not comparing the colours of the ball actors at startup.

Next on list to do
Make ball fall when not colliding with balls that are connected with the top bar in some way
Make Collision actor check animation better
Attachments
ballgame.ged
(9.39 KiB) Downloaded 89 times
KISS -Keep It Simple Stoopid
foleyjo
 
Posts: 275
Joined: Mon Jul 09, 2007 1:15 pm
Score: 15 Give a positive score

Re: puzzle help

Postby Nykos » Tue Jul 26, 2011 4:32 pm

Well, i hate to see you do all the work Foleyjo... :) So i keep on trying different things with hum, not much success... :(

I tried an alternative method to ColourMatch at the beggining of the game. I think it could work but i must have made mistakes or it misses something.
Anyway here it is:
When balls are created they create a timer of 20 milliseconds,
then in the timer code:
Code: Select all
if(timervar==BallNumber)
{
    ChangeAnimation("Event Actor", "checker copy", FORWARD);
    if(collide.colour==colour)
    {
        ColourMatch+=1;
        collide.ColourMatch+=1;
    }
    timervar+=1;
}


timervar is set in View's create event to 0 and there is an animation finish event on balls to make it take it's initial sprite back.

The problem is that when in game mode, it apears that some of the balls keep their checker sprite, some of them even destroy themselves. Any idea on how to make it work? Or will this method be unseccessful?

Another thing i was thinking, but once again, it's all new to me and i really want to learn so please don't laugh :D :
About the bals falling when not connected to any ball , i thought of a code but i'm unable to write it with the good syntaxe but it would look like that:
Var1=getallactorsincollision(eventactor,n)
Var2=actorcount(Var1)
if(Var2<=0)
{
fall=1;
}

if(fall==1)
{
yvelocity=10;
}

Honnestly it's more to see if my idea would be good than to give it to you, i think you already thought of it but i want to know if i'm beggining to understand all of it.
Nykos
 
Posts: 110
Joined: Sun Dec 19, 2010 11:11 pm
Score: 6 Give a positive score

Re: puzzle help

Postby foleyjo » Tue Jul 26, 2011 8:56 pm

At the moment I'm trying different things that all don't seem to work.

Haven't got time to try your suggestions yet but when I get chance I will go through and see if they work well.

At the moment I'm looking at using functions for both the colour check and the falling.

I've done away with the setup colour check and instead when the fired ball collides with another ball it checks all the actors in the collision. If it finds a match then the next ball checks all the balls in the collision and so on. If there are 3 or more matches in the collision then the balls will pop.

For the falling balls the top bar checks all the balls colliding with it which in turn check all the balls colliding with them and so on till all the colliding balls have been checked.

I realised this might be a good method when I found at that a function can call itself.

Implementation is not too good at the moment. Lots of strange effects happening.
KISS -Keep It Simple Stoopid
foleyjo
 
Posts: 275
Joined: Mon Jul 09, 2007 1:15 pm
Score: 15 Give a positive score

Re: puzzle help

Postby Nykos » Wed Aug 10, 2011 9:35 am

Yo, back to work after a little time off.
Foleyjo:
I found another way to have three ball coliding explode.
I have two diferent kind of ball actors:
_ one with colourmatch = 0.
_ and one with colourmatch = 2.
the only thing is that you have to place the balls one by one to make your level... if you want 2 balls with the same colour, just place two balls with colourmatch=2, then when another ball collide with one of them, it just explodes as it should. It's a bit longer, but it works realy good.

I managed to make a ball fall if it isn't in collision with another ball, but i don't see how to make an entire group fall. Have you found out?

PS: Good holiday to everybody :).
Nykos
 
Posts: 110
Joined: Sun Dec 19, 2010 11:11 pm
Score: 6 Give a positive score

Re: puzzle help

Postby foleyjo » Thu Aug 11, 2011 10:19 am

Hey Nykos

I haven't looked at this for a while. Just been working on a couple of other projects. Will get back to it soon though. I like to swap between projects to keep interested.
KISS -Keep It Simple Stoopid
foleyjo
 
Posts: 275
Joined: Mon Jul 09, 2007 1:15 pm
Score: 15 Give a positive score

Re: puzzle help

Postby Nykos » Thu Aug 11, 2011 10:26 am

I totaly understand, i dothe same thing :)
Nykos
 
Posts: 110
Joined: Sun Dec 19, 2010 11:11 pm
Score: 6 Give a positive score

Re: puzzle help

Postby foleyjo » Thu Aug 11, 2011 1:56 pm

Did you see this thread?

viewtopic.php?f=2&t=10819
KISS -Keep It Simple Stoopid
foleyjo
 
Posts: 275
Joined: Mon Jul 09, 2007 1:15 pm
Score: 15 Give a positive score

Re: puzzle help

Postby Nykos » Fri Aug 12, 2011 5:16 am

Yes I saw it, but this is of no help to me.
_3-ball destruction is done
_lonely ball falling is done.
the only thing i miss is a lonely "group of balls" falling
Nykos
 
Posts: 110
Joined: Sun Dec 19, 2010 11:11 pm
Score: 6 Give a positive score

Re: puzzle help

Postby Nykos » Sun Aug 14, 2011 9:38 pm

I've been trying to add this to the game: when there is no red ball anymore , no more red balls will be created. and so on with other colours.
So I created a variable for each color and when a ball is destroyed, it sustracts -1 to the variable. (green-=1;)
so at the beggining, i had something like that:
Code: Select all
if(colour==0)
{
    if(red>=1)
    {   
        animpos=0;
    }
    if(red<=0)
    {
        colour=rand(8)
    }
}


But it didn't work. So I tried some other things without much more success.
Code: Select all
colour=rand(9);


if(colour == 0)
{
    if(red>=1)
    {
        animpos=0;
    }
    if(red==0)
    {
        int type;
        type=rand(8);
        switch(type)
        {
            case 0:
            colour=1;
            break;
            case 1:
            colour=2;
            break;
            case 2:
            colour=3;
            break;
            case 3:
            colour=4;
            break;
            case 4:
            colour=5;
            break;
            case 5:
            colour=6;
            break;
            case 6:
            colour=7;
            break;
            case 7:
            colour=8;
            break;
        }
    }
}


doesn't work neither.
the balls don't have the good colors.

I think the best way would be the first one i described, but I don't know how to relaunch "colour=rand" command without the first value.
Would you have any idea how i could do this or maybe another simpler way?
Nykos
 
Posts: 110
Joined: Sun Dec 19, 2010 11:11 pm
Score: 6 Give a positive score

Re: puzzle help

Postby foleyjo » Mon Aug 15, 2011 10:20 am

You could have the balls have seperate actors that inherit from 1 main ball actor. Then you could use an actorcount to see if there are any of the coloured balls. If not then redo the rand check
KISS -Keep It Simple Stoopid
foleyjo
 
Posts: 275
Joined: Mon Jul 09, 2007 1:15 pm
Score: 15 Give a positive score

Re: puzzle help

Postby Nykos » Mon Aug 15, 2011 1:20 pm

okay i will try this, but how do I redo the rand check?
Is it like this?:
if(something<=0)
{
colour=rand...
}

or do I have to rewrite everythiong like this:
if(something<=0)
{
colour=rand...
switch(colour)
{
case 0:
animpos=0;
break;
etc....
Nykos
 
Posts: 110
Joined: Sun Dec 19, 2010 11:11 pm
Score: 6 Give a positive score

Re: puzzle help

Postby Nykos » Mon Aug 15, 2011 9:34 pm

that's good my friend, i made it work.
Nykos
 
Posts: 110
Joined: Sun Dec 19, 2010 11:11 pm
Score: 6 Give a positive score

Re: puzzle help

Postby foleyjo » Thu Sep 15, 2011 8:09 am

Hey Nykos how is this project going. Havent noticed any updates for a while
Attachments
arg.rar
(10.14 KiB) Downloaded 86 times
KISS -Keep It Simple Stoopid
foleyjo
 
Posts: 275
Joined: Mon Jul 09, 2007 1:15 pm
Score: 15 Give a positive score

Re: puzzle help

Postby Nykos » Sat Sep 17, 2011 5:54 pm

Hi my friend, i think I've been as far as I could with this, but it still misses the "group of ball uncolliding with the others" falling thing. I can't figure out how to do it. And i'm wondering how i could make the balls stick a sort of grid but that's not really something i want, i'd just like to know how it works. would you like me to send you one of my levels to show you what i did?

Ho and what is the ged you put in your last post, i did something like that with a superman last week :)
Nykos
 
Posts: 110
Joined: Sun Dec 19, 2010 11:11 pm
Score: 6 Give a positive score

PreviousNext

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest