Multiplayer game Split Screen in Corona SDK

I made a simple game in corona sdk. Now I want to make a multiplayer split-screen game. I want to use my single player game as a single game. Then I want to run two different devices in two parts of the same device.

But I could not find an effective way to do this.

Any idea?

+4
source share
3 answers

You can try to create two display groups and set your x, y properties to place them where you want on the display. Then you can write code to manage objects in any display group. Right now, I'm working on a game in Corona sdk that has four display groups. This gives me the flexibility to move all objects in a group by changing the x, y properties of a particular display group. In addition, you can insert display groups inside other display groups, so there are all sorts of options. In my game, background scrolls. Since all the objects for the background are in the display group, I can scroll all the objects at the same time, instead of scrolling them individually.

0
source

There is no easy way to do this, you need to reorganize your code.

First you need to make the code a multi-player game, since I assume that there will be interaction between the two screens / players.

Secondly, I would suggest creating it as a whole, without trying to get two screens with two “introductory” user zones. But this is just my suggestion.

0
source

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

0
source

Source: https://habr.com/ru/post/1391834/


All Articles