in the near future i want to work on a multiplayer game for iPads.
Since the information on mobile platform development is scattered over the whole board, i was thinking of creating a game step by step and discuss every problem i will face during this process.
I decided to go for a four player local multiplayer battle where each player has it's own joystick in the appropriate corner.
it should more or less look like this.
The first decision i had to make was for the screen size and resolution.
Since the iPhone screen is to small to play with 4 players, my target platform is only iPad gen 1-3.
I read that it would be best to pick the best possible resolution with the same aspect ratio for all devices, which is 2048, 1536 (iPad 3Gen)
For the "Fullscreen in Browser" i chose "Letterbox Scale" because it's said to be the best for mobile devices.
For more information have a look at
as said in this topic, the performance won't be a problem if scaling the screen down in a lower resolution. for example ipad 1
the second problem i had to face, were the 4 different fingers touching the iPad at the same time.
i played around with touchID's and invisible sprites and came up with this:
here's a live Demo
test it on an iPad to move both at once
and this is the capx file.
I am right now facing something, which is not really a problem but it would be great to know a solution.
Because i have four players, i have 4 different controls, player characters and bullets.
right now i repeated exactly the same events for every player.
can i create something like:
"on touch of Control_Left.ID(2), move Player.ID(2) to the left"
like 3 events for left, right and to define somehow to pick the player with the same ID as the controls have.?
is there another way to achieve this?
I've been discussing this topic in this thread:
Here's a quick view on my events:
<img src="https://www.scirra.com/images/articles/players.png" border="0" />
and here's the latest version of the capx
the second problem which i'm facing is the combat. it's a bit similar. I have 4 different player characters and four appropriate bullets. now i want the bullet 1 to destroy p2,3 and 4 on collision but not p1. And bullet 2 i want to destroy p1,3 and 4 ... and so on.
i tried a lot of things with families and instance variables but i was not comfortable with it.
Of course as soon as i know how to do these things i will write it down here because i want it to be like a full report on what problems i faced for you as a tutorial. I will constantly continue to develop my game.
as you might have noticed, there aren't any nice sprites in it and so on. My graphic support is working on it and i will let you guys have a preview as soon as possible.
For next steps are planned:
- Power UP's
- Combat Engine (Bounce of Walls, Teleports, Time, Respawn ... and so on)
I haven't got the time right now to commentevery step but i will post problems and solutions here and maybie comment everything like a tutorial when the game is finished.