How to CREATE a GAME like

Ya sure. He is quite good. check it out.

I think this is the best place to start making a tile based game in CC2d-x.

1 Like

Hi, recently I’ve come across a game Crossy Road.

I am not targeting this game and only focusing on just simple 2D tile game as in raywenderlich tutorial.

But I just wanted to know how is this created out of curiosity?
Is this also something like 3D tiled game and some software like ‘Tiled’ exists for this but in 3D?

Thanxx :slight_smile:

@corytrese
@siddharthshekar
and other guys

Hi please see to my previous post too…

Ok… I was following this


Still need to learn a lot and lot more but for the time being my very basic concepts are clear.

Now, I am going to follow this below tutorial.

@slackmoehrle
I need a suggestion !
So, I should use Follow Action on the player to follow it across the map or shall I move the entire map with the setPosition logic mentioned in the former tutorial ?

Thanxx :smile:

Waiting for the reply!

depends upon the game that you are making. I prefer moving the object by its position instead of action as I feel that I have more control of the movement of the player.

@siddharthshekar

But in any case it is about moving a layer or moving a player!
If I want to have better control won’t it be good if I move player and not the map.
And If I am moving my player and not map then I would have to use Follow action!!

Otherwise, if you move your map then is that according to similar logic as in setPosition function at

Can you please elaborate a little?
I don’t know what game I am making but I am just trying to make something?

Eaitherway you have to move the player or the layer. Wether it is through actions(CCActions) or incrementing the player position in update

@siddharthshekar

In your case, you’re actually moving the layer with follow action on the player… And infact player is moving.
But what I am saying that instead of moving the player the underlying entire tile map will move.

The effect will be same but this is the difference!!

@siddharthshekar
@corytrese
@slackmoehrle

Hi,

  1. how to make it muti resolution?

  2. Can you please write few steps for take into consideration?

  3. Or shall I focus first on programming with respective coordinate instead of actual coordinates and later I can add multi resolution thing ?

  4. Also, do I’ve to create different maps for different devices or what?

  5. I sometimes wonder, how people learn when such things aren’t available in detail on internet. Is it through trial and error or what? hahaha

Thanxx :smile:

I think the concepts here apply: http://www.cocos2d-x.org/wiki/Multi_resolution_support

@slackmoehrle

So, that means I would have to create different TMX map for the resolutions I am targetting?

I mean… Suppose, I talk about android. There is a common area in which all resolution fits so in this area I’ve to design my main things and other regions I can put extra which are not very crucial.
But if here I will put then the extra tiles will be seen which are actually outside the area in other resolutions!!

I think it is handled not the normal way as given in multi resolution wiki which is why I put up the question !!

(To further clarify, I don’t wish to show extra tiles for bigger resolutions because then what if my enemy is on the tile which is visible on one resolution screen while it is just outside in one of them. That will not just make me create assets for every resolution that exists but also I would have to care that game play is similar and the number of tiles which looks on one resolution should be same as the other resoltuion !!)

@corytrese
So what do you say?
Do, I first concentrate on one resolution and then later for different resolutions, I can make tiles of difference sizes, I mean in some as 32 x 32 and in some 64 x 64 but in some 32 x 48, so that number of tiles in width and height are same for every mobile!!

You will need diff tmx for each resolution set, i.e. if you are using tileset 100x100 for HD
than 50x50 and 25x25 for lower set OR
you can follow these thread,

Enjoy coding.

1 Like

I use the same TMX files for every resolution and every playtform.

@corytrese
@smitpatel88

(Read landscape wise orientation)

But did you notice that this way, I would end up having more tiles in, suppose, width as compared to other device which has lesser width to the former !!

Are you understand my doubt?

@corytrese

You mean that you used only one TMX map?
But you would have different graphic assets for different resolutions right?
If yes, then what to do for the setting in the starting which asks to set the resolution of the tile size !!
See, in below image I’ve 32x32 for my tile size of 32x 32.

And how can I have same TMX if I am having different sized graphic assets for different resolution?

As the game was made with Unity, I guess they used something like http://protilemapeditor.com

A 3D Tilemap(editor) is not any different to the isometric 3D version. The only difference are the assets, which are 3D objects instead of 2D shapes.

E.g. FEZ used an in-house editor, which was “3D based”, so you were able to rotate the planes and set the tiles for each of it. It’s called the “Fezzer”.
You can read how the scene/editor was used here:

For the impatient:

Bedard and Fish created their own editor for Fez, called the Fezzer, and designed what they deemed “trixels,” blocks like voxels but at 16x16x16, or as Bedard described it, four 2D views creating one 3D world. Instead of a standard 2D tile set, Bedard built 3D “triles” – 302 of them – in 17 trile sets. Fez will have 157 isolated levels, and these triles make up all of them.

The scene on the right is actually in 3D and you can draw/set the textures on the 3D blocks on the right.

Look at the PS plugins, to get an idea of how assets can also be created:


People often build their own tools:
http://forum.unity3d.com/threads/tilemap-3d-cube-editor.94193/

You can see a TileMap as a construct, which holds the coordinates for the placement of fixed-blocked assets.

1 Like

I use EXACT_FIT resolution policy :smile:

Yes, this is the solution to make number of tiles in width and height same for every resolution but it will ruins the graphics look on the screen by stretching/compressing !! :frowning:

The Show all policy is what you want. It will preserve the ratio and show all content. The cost of this is, that can you get borders on all sides.

1 Like

Ya, but on smaller devices whose resolution is high, I should infact use the screen, isn’t it.
Also, designing the game which will left the border on the screen is not a good strategy ! :frowning:

So, as of now, I am not able to think of any strategy except that to make 8 different tiles maps and 8 different graphics if I’ve 8 kinds of resolutions !! :frowning:

Show all uses the maximum of the device screen, needed to display all of your content. TileMaps are a little different to static screens, as you can pan around, so yes, you should use the complete screen. I was just referring to a static screen like a background, that should not be cropped.

It depends on your screen design. If you want the assets/screen design always display to the highest grade possible(e.g. keeping relative asset offsets or spaces between the assets) on all devices, its a very good strategy. You only get a 1:1 look and feel screen design by designing your game with borders. Some designers just don’t want to space out the UI differently, just because the device resolution is different to your design resolution.

There’s no need for that, as the TileMap itself is pannable anyway. Resolutions, that are not multiplies of your tiles, will just show parts of a tile at the border. Not a problem at all, except you want to make your TileMap static, and the character running around on the fixed map only consisting of full pixel-perfect tiles.

You have two possibilities for panning:
Static map and border-scrolling: The character can run around on the map freely and the time it reaches the border, the map would scroll. Eg. as in the Sonic the Hedgehog games or the Mega Man series.

Character always at the center and a dynamic map, which is moved.

1 Like