How to CREATE a GAME like

How to create games whose player pan across a large world.
There is a big 2D world where player is standing at one place at some spot in some small region.
Now, I want to go to North-East direction, so I am using my controllers on the screen to go there.
And now, I want to rome around the world and then I may even return back to places which I have visited a long time back or recently. So, obvious is that I need to keep almost a large piece of that world in my memory!! WHAT ALL THINGS I NEED TO TAKE CARE!! Please help as I am targetting some simple game which requires this but I’ve no idea to start with.

Or any external resources/book which might help me to understand this?

Note: please don’t discuss infinite platform running game because it isn’t what I am talking about because it goes in one direction. But if you still have interesting to discuss then please do so.

Eagerly waiting…

Thanxxx :smiley:

1 Like

so you are thinking something like the original Legend Of Zelda overworld?

I would think this would work pretty well.

1 Like

Tiled is damn good.

@slackmoehrle
@mannewalis

Hi.
Thanks for a quick reply.
(Additionally my entire game would be top down and not some angle or isometric view)

legend of Zelda!!
Yes, if you’re talking about 2D version. But there things look like I am putting as a tiles which makes obvious that I’ll use tilemap edior that @mannewalis suggested. Well, I’ve not decided my levels yet, but I don’t want my world to look like tiles in actual…

Yes, I think better approach will be to use TileMap editor… I’ll try it…
Okay… but this is just one point in all what I need to know.
There are few things like WorldToNodeCoordiates I saw in cocos APIs but not sure whether they will be used or how they will be used here.
Because I’ve problem with multi resolution practical implementation and I wonder how will I manage tile editor entire map which doesnot even fit at the screen at once :smiley: :smiley: :frowning:

Is there any book or something that can guide me uptil any point of knowledge?

Thanxx
:smile:

And I am not sure about how will I integrate physics on the tiles if they have multiple graphic content are not, I mean something like where I want player to move on mud but not enter on green area which is grass.
And more complex is that I also don’t want my player to enter blue area which is water !

We have a Programmers Guide

Hi,
but Tile Map is a small part in the guide !

What basically, I am planning to do us create this game independent of the multi resolution trouble. I mean according to my device but not with coordinates hard coded but relative to screen size. And then after game completion I’ll take care of multi resolution. Is it fine, if I do it this way?

And next thing is that, I guess you’ve given me programmer’s guide link also because I’ve mentioned something about WorldToNode Coordinates. But I am not sure about how to handle it. I mean I am not clear about how to use this concept.

Have people worked on it previously, especifically integrating tiles map with cocos2dx. Not just integrating, I am further ahead.

And can you throw some light on physics integration to my tile map!!
I think it is not same as what is mentioned in programmer’s guide… Right!!

Thanxx :smile:

Also, further concepts that I need to take care like.

Whether the whole world of tilemap is to be shown and what portion should be removed while its data should be saved in order to reuse it if player comes again at the same place nearby region !!

People are welcome to guide me.

Meanwhile I look at http://www.raywenderlich.com/39113/cocos2d-x-tile-map-tutorial-part-1 although it is v2.x but general concepts should be the same and post if I’ve problem

Thanxx :smile:

@slackmoehrle

Hi… could you please explain below

I am talking about link:
http://cocos2d-x.org/programmersguide/7/

Here somewhere at the bottom
It is written

paraNode->addChild(background,

so this background can only be node type layer? Or can it be map also which is created using below

auto map = TMXTiledMap::create("TileMap.tmx");

I am not able to locate the code it is talking about in the last

I am not able to find the code that I can see?
Where is that on git?

It is on git.

http://cocos2d-x.org/programmersguide/

Yes, a map can work too.

Thanxx :smile:

@code_game_chef
check out this link
I hope this will help you in some way…

Ya think you are trying to make a game like zelda link to the past. Each map is called a room in this case. When you move left, right, top or bottom the code will check if you are at the edge of the room. If you are it check which side you were and generates a room. You will need to specify which room is to the top, bottom, left and right to a room. This can be done using tiled.

Check out some tutorial on Game Maker they use this concept to make a of games. Maybe you can adopt some similar princicples and generate your code for room transition.

So you go room to room in the game like levels but it is not called level as a level is like a one section of the game but since in this case it is one continuous process instead of levels they are called rooms.

A very long time ago I started with this tutorial, it worked well enough that I now have several finished games.

We use TileEd to build all of our maps (tech trees, world maps, region maps, etc) and render them with CCTMXTiledMap.

This game is an example: https://play.google.com/store/apps/details?id=com.tresebrothers.games.heroesofsteel

When you are using TMX, the first step is to design your map format. This means defining a set of layers for tiles and objects, which you will parse and treat differently inside of your collision, physics, lighting and game logic code.

For example, our TMX maps consist of Background, Foreground, Decoration, Effects, Lights and Collision tile layers. We have Object Layers for Triggers, Particle Effects and Monsters.

Our engine treats each TMX as a single map, and provides stairways, doors, and so forth to allow the players to move between the different TMX maps. Going north off of TMX #1 puts you into the south end of TMX #2.

Thanks a lot for the advice.

How to use physics integrated with tile?
Read my 3rd comment from the starting where I’ve posted one tile and expressed my doubt about physics!!
Also, link of this comment is below in case you don’t find it

I’ll try to return asap as soon as I learn from the resources/external links which I came across in this post.
Looking forward for more help from experienced people like @corytrese

Thanx a lot…

@siddharthshekar

Yes, actually this one was the main thing I was looking for because I am not aware what to do when the player is on the edge of the screen. I mean do I need to move complete room which is currently available manually or what!!

I think I have to see a lot of tutorials for that and as you suggested game maker’s tutorial

You mean each room is that portion of the entire map which is currently visible on the screen?
Or are you telling me to generate my map room wise instead of whole world together and put the rooms only when I am near the edges right!! If this is so then I feel its nice.
But in my case, I think since the speed of the game would be faster than zelda so I need to keep my room preloaded depending upon the prediction in which the player is going or I should preload all the rooms adjacent to the current room!!

By tiled, you mean tile mapeditor http://www.mapeditor.org/ Right?
Thanks for that, it could be useful…

Thanxx

By tiled, we mean this: http://www.mapeditor.org/

TileEd allows you to set a Property on a tile in the tileset. Each tileset is bound to a PNG and can be drawn into a layer.

We set properties on the tiles for things like which tiles the player can walk on, which tiles the player can see over, where projectiles can go, which tiles are treasure chests, which tiles are traps, which tiles are difficult terrain and reduce defense, etc.

Once you set these properties up for a tileset, then you can paint the tile layers as needed.

Different Properties mean (for us) different things in different layers. Our background tileset’s “can move” property is honored when that tile is painted into Background, but not when it is in Decoration.

In your physics code you will look at the tile map’s structure and data to calculate the results of different rules. If you are trying to shoot a projectile, you figure out where it starts, where it is going, and what path it will take. Then you look at the tile properties along that path to decide … does it hit something? does it hit a wall? a monster? You do that by checking properties on objects and tiles (usually you’ll cache them for performance as well.)

This is fine but did you see the image(tile) I attached in the 3rd post?
It is having multiple texture, and which is where I am stuck at thought