Any tips on designing a layout?

Hi, may i ask about layout?
1 . what size should i use to create button sprite, character sprite, etc? i am confuse to determine the size before the game will be scaled to other screen resolution.
2. Any tips to easy to know the cordinat to place my sprite? I want to put near " x sprite " but do not know the distance
3. Is there any layout preview for cocos2d-x?
4. Any tips guys? :slight_smile:
Thank you :smiley:

Hi!

It depends on many factors.
Target platform. Orientation of the screen. Multi-resolution policy. How many resource sets you want to have.

I advise you to read about the Multi-resolution support first.

How I do this -
I choose the orientation (portrait or landscape) ->
choose the Multi-resolution policy ->
choose the platform (android or iOS, since there are some differences, I prefer to work with this separately) ->
do some calculations to understand how this will work on different screens ->
correct Multi-resolution policy if necessary ->
start drawing graphics.

You can see an example here, although I do not pretend to the best solution.

There are 2 ways.
Use constant coordinates. If you set the position of the sprite (320, 240), then this is its coordinates in your Design resolution. If your Design resolution is (640, 480), then the sprite will always be in the center of the screen.
The problem here is that the Design resolution may be recalculated or not fully visible depending on which policy you have chosen. Well you can use relative coordinates in this case. See how it’s done in Hello World.

No. You can use the Cocos Creator though.
But if you plan to use C ++, then I wouldn’t advise it.

The search option on this forum can be very useful. :wink:

Good luck!

1 Like