Need help with understanding multi-touch

part12studiospart12studios Member Posts: 620
edited March 2012 in Working with GS (Mac)
Hi everyone,

I recently got some help regarding how to do multi touch and fundamentally i can get it to work using the example TSB provided, however now i'm trying to make it work in the context of my game and i'm having some issues..

you can play the game on itunes now for free http://itunes.apple.com/app/id511737976?mt=8 forgive the icon.. somehow it got mangled when i submitted it. 1.1 will fix that :) playing this i hope will help show how this is a little different than just a air hockey game...

the biggest issue is that it seems that the only way i can get multi-touch to work is to have one actor be split into several actors on stage.. however each player has unique stuff going on.. such as the tracer/wall effect as well as tracking energy usage..

i want the multi touch to work but i need the two actors to be independent.. is this even possible? it seems like it should be, but i just can't find a combination that works..

the way the draw feature currently works is that i have two actors that fill the left and right half of the screen. then based on where the screen is touched i spawn "paddle" objects very quickly till either they stop touching it.. or their energy runs out..

i could really use some help on this. the game is pretty solid currently, but the big achilles heel is that when playing 2 player.. if one player holds down on the screen on his side it makes it so the other player cannot act till the finger is lifted..

Thanks!
Caleb

Best Answer

  • mrglocklingmrglockling Posts: 258
    Accepted Answer
    Alright I'll try it out and see what I can help you with :)


Answers

  • mrglocklingmrglockling Member Posts: 258
    Do you have 1 or 2 "paddle" actors?
  • part12studiospart12studios Member Posts: 620
    here is the game. try it out (its free) http://itunes.apple.com/app/id511737976?mt=8 just so you can get an idea of why its a little more involved than just two paddles.. i "draw" the paddles and they are temporary.. but they are unique to each side..

    so what i currently do (not saying this is the best way) is have two large invisible sensors.. on each side of the stage.. there is a timer to spawn paddles at a rate of .05 sec.. you have an energy bar which gives you 10 paddles to spawn till you're out of energy.. so you can't just draw all day long.. your energy is restored to full when the other player touches the ball with his paddles..

    i could get the multi touch to work with one actor being copied out onto the stage.. but it seems like as soon as i make the 2nd actor unique.. so yea its a been a while ride.. i updated the game for now with a temp fix which is basically to have it where the player loses the round if their energy hits 0.. this discourages folks from cheating by deflecting the ball and holding their finger down preventing the other player to draw a paddle to deflect.. its not ideal.. but its effective.

    I have every intention of fixing this though as soon as i find a good solution. i have something to test, but i'm gearing up for the http://molydeux.tumblr.com/ game jam this weekend and of course game salad's going to be right there with me! :)

    Thanks!
    Caleb
  • mrglocklingmrglockling Member Posts: 258
    Downloaded it and tryed it but I can't seem to figure out the problem I'm going to PM you to help you get this fixed.

    -Max
  • part12studiospart12studios Member Posts: 620
    edited March 2012
    i'll look for the PM.. but here is how you find the issue.. play 2 player.. and draw the first line.. and hold your finger down.. then try to touch the other side.. still holding your finger down.. the 2nd player can't draw a paddle to deflect..

    doing 1 player is no problem because the AI isn't "touching" the screen. So the issue is really with 2 player games.. which personally is my favorite part of the game. the player 1 feature was mainly just to give someone something to do while waiting for another player to join.

    Cyball HD has been submitted as well as 1.1 of the iphone version. i would like to find a fix in the next week so i can submit another "final" build that incorporates multitouch as it should be.

    so its basically a cheat.. if people don't hold their finger down its no problem but we can't assume people will not do that.. either on purpose or unknowingly.

    Thanks!
    Caleb
Sign In or Register to comment.