Question about a maze game.

ServontiusServontius Member Posts: 6
edited May 2013 in Working with GS (Mac)
Working on a simple maze game, and had a question about what i assume might be considered "pickups" or reversing them. Basically i have an actor i want to be controllable with touch, but instead of picking up items as you move through the maze, the actor leaves a trail behind him. In essence I'm thinking pac man but reversed so instead of eating the dots, he more of..... pooping them out, lol. Any help would be greatly appreciated as far as what rules i should be looking into, thanks in advance!!

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    One way to do that would be to spawn a dot (or whatever your player is pooping out) ever X seconds while your moving. BUT if you were going to end up with a lot of dots you could start to degrade performance.

    Is the trail going to be long, as in lots of dots? In-order to not have too many dots on screen at once you could fade them out and destroy them after a set time...

    Just one way of doing it.
  • lewisonelewisone Member Posts: 48
    My thought would be if the character had a set path (like in pacman) you could set the poop on the stage then have the alpha set to zero in the beginning. Then when the actor overlaps the invisible poop, it would turn the alpha to 1, thus giving the appearance of being placed there. This would also eliminate the problem of spawning poop that isn't consistently spaced if the speed of the actor changes or if he stops. I like the new trail techniques, but they are intended to fade away like jamie_c said.

    -LewisOne (My Website, FB, Twitter, IG, YT)

  • BoomshackBarryBoomshackBarry Member Posts: 712
    I think I'd make floor tiles to fill the maze, then have an alternate image of the tile with the dot on it. Then when the actor collides with the floor tile change the image to show the dot. it uses quite a few actors for each floor tile, but no more than spawning multiple dot actors.
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    If you're interested I did a quick demo using the method I mention above. Move the white box around using the arrow keys and he'll leave a trail of green boxes. The trail is set to fade out after 5 seconds so you don't get too many actors spawned on screen at once.
  • ServontiusServontius Member Posts: 6
    Hey, thanks all for the advice. I'll do some experimenting and see what i can come up with. I really appreciate everyones time and advice!!
Sign In or Register to comment.