Make a city builder game, where to start?

Hi,

I’m new to mobile apps development and to Corona SDK. My goal is to make a city builder type of game, but really simple.

I first looked into Corona Isometric Map Template but that’s probably too complex for me and it doesn’t seem to work with the latest version of Corona. I’m now looking into Ponytiled but I am not sure what I want to do  is achievable.

I’m aiming at a game looking like Assembly Line (see here) but Ponytiled seems to be used to create the map only, I cannot find a way to add elements to the map (the buildings, roads…).

So far I don’t have much code, mostly a mix of Ponytiled and the Corona’s example.

I guess my questions are:

  • Is Ponytiled adapted for such game?
  • How can I (with Corona) add objects (buildings, roads…) to a map/scene? Basically I want to add a button “build house” and be able to define the location of the building on the map…
  • How can I save the scene locally on the phone (or with the simulator in the first place)?

Any direction to the right tools/documentation would be appreciated. I haven’t found anything so far.

Thanks!

Since I have no idea how to build a city builder app; if I were creating it, I would take the following approach:

  1. Separate all the different elements of such a game.

  2. Start building demos for each of those elements. 

  3. If I ran into a small problem with some of those elements, I would post whatever code I have an issue with to the forums.

  4. If it was a big issue then I would probably hire somebody here like Remaining Gamer to make me a working demo of the element.

Your questions:

1. PonyTiled can be used for some sort of city building game. Not sure what you have in mind so no idea if it does or doesn’t.

  1. To add building / roads to a map look at some of the tutorials, templates or even some old youtube videos online.

  2. Save a scene locally: search these forums this question has come up multiple times.

@SGS who built and continues to build and update the ‘Designer City’ series (https://coronalabs.com/stories/designercity/) may have something to say about this, but let me give my input anyways.

Read what @SGS says in that link above.  Pay particular attention to the fact that he says it took him (and his team) a year to implement his first releasable version of the first game.  Also read what he says about practicing.

  1. There is no recipe for this kind of game.  It is very much a DIY / figure it out yourself mechanic.

2.  This kind of game is not a beginner’s: ‘first game I ever made’ kind of project.  You need to have some serious chops or be willing to sink hours, days, weeks, months … into learning:

  • Corona SDK Guts - You need to clearly understand how to use Corona with regards to many topics
    • display object types and their usage.
    • layering as a function of layers and order
    • camera math and concepts
    • blending, shading, particles
    • touch processing and how to extend a 2d touch system to accommodate or fake 3d-esque casting.  While the depth of your ‘city’ may be faked, you still have to account for it to some degree and this includes touching, dragging, and placing items.
    • Loading and unloading textures and other resources.
    • … 
  • Math 
  • Dynamic occlusion of moving objects. Ex: Cars moving on the road of your city need to be layered to show up in front of some objects and behind others.
  • Isometry and related visual design concepts.
  • Optimization techniques, both Corona specific and general.
  • The list is so long …
  1. If you’re new to Corona I’d suggest making something way simpler and working your way up.  

Note: You don’t have to abandon the idea.  Instead, lay out your game idea, then breakdown the individual parts.  Now that you have a parts list, practice making just those parts.

  1. Finally, I would suggest you entirely abandon the idea of making a isometric-style city builder and instead make a super-tiny top-down one instead.

If you are planning on creating something similar to Assembly Line, then you’ll have an easier time steering clear from isometric style and related tile systems. Creating a simple X by Y grid of object tiles that you can interact with, like in Assembly Line, can easily be achieved without any fancy plugins or such.

For loading and saving data, as @agramonte already said, there’s a recent thread on the forums where it’s discussed in quite a lot of detail: https://forums.coronalabs.com/topic/73786-saving-levels-only-help/.

For the record, Qiso is designed to allow you to add/remove tiles in real-time and has single-line functions to enable camera panning and zooming, so should work well as the engine to this kind of a game. However there’s still a LOT that would need building over the top to make a reasonable city builder - algorithms to figure out where power line tiles are in relation to buildings, water supplies, pollution spread, how connected the road network is, and so on. Creating isometric graphics is in itself time consuming too.

Like the other responses I’d advise learning Corona with something simpler. I built a simple side scrolling infinite runner to teach myself Lua and how images and sounds work in Corona, how to position elements, and so on.

I’ve broken the mould a little with Corona, but usually when learning a new language I start with outputting a Hello World text and using it to learn how to do things like timed events, movement, duplication, etc. Then I move on to building simple variations of the 3 classics - Tetris, Space Invaders, and Breakout. You don’t have to build complete games - there are too many released already - but building the main mechanics teaches you a lot about how a language works, how to handle collisions, how to spawn multiple instances of the same sprites, etc.

You’ll know when you’re ready to start on something bigger like a city builder, because you’ll know where to start with it.

I echo what Richard says, if you don’t know where to start, you’re not ready. The specific questions you asked are difficult to answer because each developer would do it a completely different way, in their own style.

Do you have coding experience in general? If so then it’s a case of getting to know the Corona API, and how it fits in with your coding style.

Thank you everyone for your answers! I problably should have mentioned city builder because then people start thinking about sim city or designer city…
My aim is to write something like Assembly Line, much simpler :slight_smile:

I will look into making my own X by Y grid and add object tiles which I can interact with.

Qiso seems good but it might be too complex from the start and I would like to stay away from isometric for the beginning :slight_smile:

I absolutely wouldn’t advise starting with isometric, but for future reference Qiso aims to simplify this for you by doing all of the grunt work behind the scenes. It’s intended really for character based games, and it’s expected that you create maps in Tiled and import them in, in which case you define things like which tile types can be walked on to/from each direction within Tiled itself, just as custom attributes, and then Qiso handles all of the path-finding and whatnot for you. It doesn’t take much at all to actually set up a basic isometric map in Corona using Qiso and Tiled, but turning that into a proper game and actually creating the graphics is another story.

When you’re ready, if you want to give isometric a go and like the look of Qiso, feel free to PM me and I’ll help get you started.

Thanks Richard! Really appreciated! I will keep it in mind for my next game or maybe version 2.0 :slight_smile:

Since I have no idea how to build a city builder app; if I were creating it, I would take the following approach:

  1. Separate all the different elements of such a game.

  2. Start building demos for each of those elements. 

  3. If I ran into a small problem with some of those elements, I would post whatever code I have an issue with to the forums.

  4. If it was a big issue then I would probably hire somebody here like Remaining Gamer to make me a working demo of the element.

Your questions:

1. PonyTiled can be used for some sort of city building game. Not sure what you have in mind so no idea if it does or doesn’t.

  1. To add building / roads to a map look at some of the tutorials, templates or even some old youtube videos online.

  2. Save a scene locally: search these forums this question has come up multiple times.

@SGS who built and continues to build and update the ‘Designer City’ series (https://coronalabs.com/stories/designercity/) may have something to say about this, but let me give my input anyways.

Read what @SGS says in that link above.  Pay particular attention to the fact that he says it took him (and his team) a year to implement his first releasable version of the first game.  Also read what he says about practicing.

  1. There is no recipe for this kind of game.  It is very much a DIY / figure it out yourself mechanic.

2.  This kind of game is not a beginner’s: ‘first game I ever made’ kind of project.  You need to have some serious chops or be willing to sink hours, days, weeks, months … into learning:

  • Corona SDK Guts - You need to clearly understand how to use Corona with regards to many topics
    • display object types and their usage.
    • layering as a function of layers and order
    • camera math and concepts
    • blending, shading, particles
    • touch processing and how to extend a 2d touch system to accommodate or fake 3d-esque casting.  While the depth of your ‘city’ may be faked, you still have to account for it to some degree and this includes touching, dragging, and placing items.
    • Loading and unloading textures and other resources.
    • … 
  • Math 
  • Dynamic occlusion of moving objects. Ex: Cars moving on the road of your city need to be layered to show up in front of some objects and behind others.
  • Isometry and related visual design concepts.
  • Optimization techniques, both Corona specific and general.
  • The list is so long …
  1. If you’re new to Corona I’d suggest making something way simpler and working your way up.  

Note: You don’t have to abandon the idea.  Instead, lay out your game idea, then breakdown the individual parts.  Now that you have a parts list, practice making just those parts.

  1. Finally, I would suggest you entirely abandon the idea of making a isometric-style city builder and instead make a super-tiny top-down one instead.

If you are planning on creating something similar to Assembly Line, then you’ll have an easier time steering clear from isometric style and related tile systems. Creating a simple X by Y grid of object tiles that you can interact with, like in Assembly Line, can easily be achieved without any fancy plugins or such.

For loading and saving data, as @agramonte already said, there’s a recent thread on the forums where it’s discussed in quite a lot of detail: https://forums.coronalabs.com/topic/73786-saving-levels-only-help/.

For the record, Qiso is designed to allow you to add/remove tiles in real-time and has single-line functions to enable camera panning and zooming, so should work well as the engine to this kind of a game. However there’s still a LOT that would need building over the top to make a reasonable city builder - algorithms to figure out where power line tiles are in relation to buildings, water supplies, pollution spread, how connected the road network is, and so on. Creating isometric graphics is in itself time consuming too.

Like the other responses I’d advise learning Corona with something simpler. I built a simple side scrolling infinite runner to teach myself Lua and how images and sounds work in Corona, how to position elements, and so on.

I’ve broken the mould a little with Corona, but usually when learning a new language I start with outputting a Hello World text and using it to learn how to do things like timed events, movement, duplication, etc. Then I move on to building simple variations of the 3 classics - Tetris, Space Invaders, and Breakout. You don’t have to build complete games - there are too many released already - but building the main mechanics teaches you a lot about how a language works, how to handle collisions, how to spawn multiple instances of the same sprites, etc.

You’ll know when you’re ready to start on something bigger like a city builder, because you’ll know where to start with it.

I echo what Richard says, if you don’t know where to start, you’re not ready. The specific questions you asked are difficult to answer because each developer would do it a completely different way, in their own style.

Do you have coding experience in general? If so then it’s a case of getting to know the Corona API, and how it fits in with your coding style.

Thank you everyone for your answers! I problably should have mentioned city builder because then people start thinking about sim city or designer city…
My aim is to write something like Assembly Line, much simpler :slight_smile:

I will look into making my own X by Y grid and add object tiles which I can interact with.

Qiso seems good but it might be too complex from the start and I would like to stay away from isometric for the beginning :slight_smile:

I absolutely wouldn’t advise starting with isometric, but for future reference Qiso aims to simplify this for you by doing all of the grunt work behind the scenes. It’s intended really for character based games, and it’s expected that you create maps in Tiled and import them in, in which case you define things like which tile types can be walked on to/from each direction within Tiled itself, just as custom attributes, and then Qiso handles all of the path-finding and whatnot for you. It doesn’t take much at all to actually set up a basic isometric map in Corona using Qiso and Tiled, but turning that into a proper game and actually creating the graphics is another story.

When you’re ready, if you want to give isometric a go and like the look of Qiso, feel free to PM me and I’ll help get you started.

Thanks Richard! Really appreciated! I will keep it in mind for my next game or maybe version 2.0 :slight_smile: