here's a challenge

SAMmanSAMman Member Posts: 228
edited November -1 in Working with GS (Mac)
Hey guys, so I am trying to make a tetris type game, as an experiment to use the rules in another game, and I am stumped. So far I have piece that looks like a tetris piece, and when I click on the screen it rotates just fine. it is made of 3 blocks 24X24. the next step is to move it to the other side of the screen, that works too. now I am trying to make it so that when it's position.x = 480, 3 new pieces are spawned, or they are spawned when it collides with one of the other pieces.

that is where is gets tricky. I can't seem to get it to spawn correctly when it hits the other pieces. I have it set up to move to x=480, and then I changed the "move to" to position.x-24 when it = 480 or hits another piece. that only sort of works, and only when it collides with one block, not the other 2. when I have too many collide rules on the same rule it messes things up big time, sometimes gamesalad just crashes from it. any help would be greatly appreciated at this point.
Thanks.
SM

Comments

  • old_kipperold_kipper Member Posts: 1,420
    I would wait for arrays and at least non 4 sided rectangular collision areas, and then I wouldn't probably bother with collisions but to it with arrays and positional data. Even if you get your current problem sorted it's going to be very tough to build a system to monitor the shape of the bottom stack build and receive the dropping shape, and do the drop shunts. And a constant spawning may also cause you problems. Better to recycle.

    I do wish you luck and let us know your progress. If you go on with this you will learn a lot.

    kipper
  • SAMmanSAMman Member Posts: 228
    thanks, are they planning on putting arrays in gs?
  • old_kipperold_kipper Member Posts: 1,420
    yup! its on the road map.
  • SAMmanSAMman Member Posts: 228
    that would be cool. how do I recycle a spawn?
  • old_kipperold_kipper Member Posts: 1,420
    just flip the alpha or reposition the actor offscreen between usage.
Sign In or Register to comment.