4

I made a simple game in corona sdk. Now I want to make it a split screen multiplayer game. I want to use my single player game as an unit game. Then I want to run two different unit in two part of same device.

But I couldn't find any effective way to do this.

Any idea?

Till
  • 27,559
  • 13
  • 88
  • 122

3 Answers3

0

There is no simple way to do this, you have to refactor your code.

To start with you have to make the code a multi-player game, since I am assuming there will be interaction between the two screens/players.

Secondly, I would suggest building it as one unit, not trying to get two screens with two user input 'areas' to function. But thats just my suggestion.

nycynik
  • 7,371
  • 8
  • 62
  • 87
0

You might try creating two display groups and set their x, y properties to position them where you want on the display. Then, you can write code to control objects in either display group. Right now, I am working on a game in Corona sdk that has four display groups. It gives me the flexibility of moving all the objects in a group by changing the x, y properties of a particular display group. Also, you can insert display groups inside other display groups, so there all kinds of possibilities. In my game, the background scrolls. Since all the objects for the background are in a display group, I can scroll all the objects at once, instead of trying to scroll them all individually.

Jerry Adkins
  • 148
  • 1
  • 19
0

Regarding the space double the height pixel size in config.lua. Then you can put the whole game in one function and then copy paste your code in another function and assign each function to one player so all your variables are local to that function.