Question: So I'm making a game using love2d where the player will find himself in an zombie infested city but I don't want the city/map to be just the same all the time, so I want to create a random map/city generator, but I don't know where to start, I maybe can make my own but the result would probably be not what I wanted, as I don't want tiles getting placed all over the place messily(it won't look like a city then), I want random set of tiles getting placed in the world/map like buildings get placed randomly throughout the world/map, I hope someone can help me with this as this is really hard for me...

Answer: 
There are simple ways to generate cities, depending on your needs.

Some time ago, I wanted to generate cities for a fantasy setting, so I started [playing with a generator](http://rpg20.com/cityGen.php?imgStyle=3&citySize=very_large). Like I said in [another SE post](https://rpg.stackexchange.com/questions/57695/modern-floorplan-generator/59603#59603): "rough on the edges" is an understatement. But it suits my needs (it may meet your needs too).

**This is what it looks like:**
[![Generated city](https://i.stack.imgur.com/jEOXQ.png)](https://i.stack.imgur.com/jEOXQ.png)

Some terms I use internally:

* A tile is the smallest unit I handle; on the image one of the small houses fills almost a full tile.
* A block is a group of NxM tiles.

**And this is how I generate it:**

First I generate a central feature, such as the block with the "fountain" (let's call this block a town square). I decide its width and height and place it near the center.

Then I try generating "blocks" for as long as I can:

1. Generate a block size (somewhere between 2x2 and 5x5).
2. Iterate through the image and decide where to place it. For this a weight is assigned depending on adjacency to other blocks (similar to what I explained on [this post](https://gamedev.stackexchange.com/questions/82059/algorithm-for-procedureral-2d-map-with-connected-paths/87569#87569)).
3. Place the block if a suitable location is found. When no suitable location is found, go on to the next step.

Once all blocks have been placed, I can add houses and buildings for each block. I took care of leaving a gap between blocks and another between houses. Some buildings use four tiles (2x2).

Finally, I do the actual drawing in an image.
You should do some research about l-systems, they allow you to specify some basic rules and then procedurally generate the map.

You could for example specify that every building must be surrounded by roads, and every road must continue in a straight line or eventually end, and every road is surrounded by buildings or empty space. Then, the algorithm will start "substituting" a building with a building surrounded by roads, a road piece with a full road... until you have a complete city.

Read the answer to this question for a more detailed explanation: [Using L-Systems to procedurally generate cities](https://gamedev.stackexchange.com/questions/86234/using-l-systems-to-procedurally-generate-cities)