Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

9 years ago by DaveVoyles

I'm trying to add touch controls to my Win8 game, which I wrote with Impact.

The problem I'm running into however, is that if I check for a mouse down point for my joystick, then I cannot detect another click for my hardcoded buttons (A,B,C). I can either move my ship on screen, or fire bullets, but cannot perform both actions at the same time.

Do any of you know how I can resolve this issue? Is there an alternative approach?

As it stands, my joystick is only being updated and drawn if the player touches the left half of the screen. The buttons however, are always drawn and remain on the right side of the screen.

Here's a link to my joystick code, which I acquired from Jesse Freeman:
https://github.com/DaveVoyles/SuperRawrType/blob/master/lib/bootstrap/plugins/touch-joystick.js

And here is my current implementation for it:

http://pastebin.com/TsbAdgMv

9 years ago by coreysnyder

I was actually just getting ready to do the same thing so I was searching around to see if anyone figured this one out. If you touch both sides of the screen, does it ONLY register the first click? Or does it alternate between the two?

Also check this out: http://impactjs.com/forums/code/multitouch

I'm very interested in if this works for you before I invest a bunch of time in it.

9 years ago by Joncom

@coreysnyder: I've used that plugin in this game and it worked great! To see it in action though, try playing the game in iOS Safari or similar.
Page 1 of 1
« first « previous next › last »