greenwayz's Forum Posts

  • 2 posts
  • thanks for the ideas. I really want to make it work with arrays, cause I think it's the best way to do this. I'am trying to implement a cartesian map with each cell a data like (x,y). Put for eache piece instants variable that link them to the array. And then put all the conditions through the array itself. But for now, for obscrue reasons, the arrays don't take all my pieces into account.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I made a couple of games already. But this one is the first to make me in real troubles. I am not even sure how the final rules of the gameplay will be, but I can't mane anything work. Here is what I want to do :

    It's kind of connect four (http://en.wikipedia.org/wiki/Connect_Four), but when you connect four, the associated pieces are deleted and you keep on it until your table is full. And obviously there would be more than 2 colors. I am working with 5 colors right now. So I made a sprite with 5 frames to differenciate the colors.

    My basic proble is that I can't use that kind of code (for example) :

    If frame of objectx = frame of objectx,

    and objectx.X = objectx.X+40,

    and objectx.Y = objectx.Y

    Then delete objectx

    It's more complicated than this but what I mean is that, I can't tell the game when pieces of the same color are align. Cause the he can't differenciate the different instances of the same object.

    I have tried to work with arrays, but I'm not sure exactly how to do.

    I'm not asking for a complete example, I'm just asking for an hint.

    Also, for making things easier, I have make another object invisible following every tick the different pieces. I made it larger than the visible object so it get in collision with pieces on the side. But as a result, if there are 100 pieces on the screen, there are 100 other pieces to overlap them everythick. It makes it laggy on mobile phones. But I'm sure there is a better solution than working with invisible trigger object.

  • 2 posts