@Janette5 i could probably do his version, but i dont think the player will have a problem with the button going to the far left, i tested it on my phone and i never really made it past the joystick base
Printable View
@Janette5 i could probably do his version, but i dont think the player will have a problem with the button going to the far left, i tested it on my phone and i never really made it past the joystick base
I guess it depends on what you're used to. I would prefer something like the example I just posted up.
I did struggle on my phone to move the player to the left and I would personally prefer the arrow keys as you had it before, but then this is not a type of game I would normally play, so I'm not sure what's popular / normal.
The other problem with the controls is that it obscures things that are happening - like your fruit pops up behind it - by not having visible controls at all, you don't have that problem.
@Janette5 yeah i wouldve kept the arrow keys but theyre kinda hard to control with. they werent bad but i could already see people complaining that i was hard to move around with them. the way you suggested was good but it wouldnt work for this type of game since enemies move around the screen and its hard to make it align with the enemy and shoot them. and i did make the controls transparent so you could see better. tbh i dont think ill find the perfect controls, but i am trying to make it as close to the pc version as possible, and the joystick function is pretty much identical.
Actually you can make the container completely invisible - it's necessary for the code to work but since the player can now drag the button away from it, the container serves no purpose for them.
But it's not a good idea to make the android version as close to the pc version as possible - the pc version should be optimised for play on a pc. The Android version should be optimised for the play on a touchscreen device. Playing on a large monitor is very different to playing on a small handheld device.
In any event, the Android stores are flexible, you can change something if it doesn't work and release an update as often as you like.
c'est pour ça que mon joystick est parfait pour android, car la base n'est pas fixe, des qu'on pose le doigt sur l'ecran, nimporte ou, ça devient le point de depart du joystick
@fredetmumu Je ne l’aime apparaître où vous le voulez, mais je personnellement l’aime juste rester dans un endroit lol
@Janette5 i didnt even think about that lol, i might actually do it. yeah i just like the controls better on pc but want it to kinda act the same on mobile. i did figure out how to make the joystick work tho and its perfect now. but the shooting is kinda weird when im moving diagonally it shoots in a different direction then where im looking at. how do i fix it?
game file: Attachment 29561
example vid: https://www.youtube.com/watch?v=54tlJ5HwSqY
Fix attached.
It was because you put the angle calculation on an "always" event - so when the button snaps back to its default position, then it reset the direction. I changed it to only calculate the angle when the button is being touched, then it will remember the last direction.
Also you had multiple commands for shoot, I don't know why, you only need 1.
Edit: I couldn't really see a problem on your video - not sure if what I fixed, was what you were asking.
@Janette5 oh i was just showing how the laser was going in the wrong direction. like when im going up but walking to the left the laser shoots diagonally too instead of shooting in the direction the player is looking in.
Well, what I fixed was that if you released the button then the direction was reset. If you accidentally released it also in the game the direction would be reset. Now the direction will only change if the player changes it. But by me, the player always shoots in the direction he is moving unless he's too close to the edge and the lasers are destroyed as fast as they're created.