Menu Screenshot


Note: if you are running from source and have speed issues please run the game using the -O flag


These are old links that correspond to my entries for pyweek newer versions can be found HERE


The aim of citySquare is to match up the tiles from the tray on the right on the grid as best as is possible in a given amount of time. Points are awarded for completed cities (the somewhat poorly drawn orange bits) and roads. They are however taken away if the city or road is incomplete.

Also note that scoring is skewed to give more points to large cities, so you should really be trying to make your cities as large as possible within the time limit. Finally, ensure that all of your tiles match up, and that any tiles touching the edge of the grid are grass, any invalid ignored for scoring purposes, don't waste those tiles!

Incidentally the easiest grid in the game is 3x3 meaning 9 tiles. And goes up to the nightmarishly difficult end of the spectrum where you will have a 9x9 grid. (yes it did drift from the theme a bit)


The controls are fairly straightforward, click a tile to pick it up click again to drop it. Dragging and dropping will not work, you actually have to click and let go.

Tiles can be rotated by right-clicking them or by by picking up a tile and scrolling. All of the tiles currently on the grid can be shifted around using the arrow keys. To view a breakdown of your score so far you can press hold tab.

And finally the pause menu can be accessed by pressing escape while in game


Give this entry an award


Ratings (show detail)

Overall: 2.7
Fun: 2.5
Production: 2.7
Innovation: 2.9

4% respondents marked the game as not working.
Respondents: 20


File Uploader Date
Binary distribution for windows
Hugoagogo 2011/04/10 03:41
A mac binary for those who want it
Hugoagogo 2011/04/10 00:42
source: Final version for pyweek
Hugoagogo 2011/04/10 00:07
Menu Screenshot
Hugoagogo 2011/04/09 12:42
Now with a working tray
Hugoagogo 2011/04/06 12:02
FInaly have it generating the tiles to fill a board
Hugoagogo 2011/04/05 10:38

Diary Entries

Coming up with a concept

Of all of the possible themes to be chosen 9 times was by far the most difficult for me to come up with a game concept because of which my game might not be the most original, but is more a mash together of a few different games that are currently out there.

Well anyway eventualy i came up with the idea for citySquare. In citySquare the user will be given 81 tiles and will have a certain amount of time to arrange them on a 9x9 Grid.

Each of the tile's edges can be either grass, road or city. The player has to place and arrange the tiles to gain as many points as possible.

Points will be awarded when time runs out for completed cities and roads but subtracted for any that are unfinished, with a bonus if all of the tiles are used to make a "perfect city"

The scoring system will reward players for bigger cities much more than for smaller ones, e.g. a city spanning 4 tiles would be given more points than 2 cities spanning 2 tiles.

If I have time I would like to add an additional game mode that just allows you to time how long it takes you to arrange your tiles to make a "perfect city"

All opinions or critiques are welcome

Add a comment

Days 1-2

Progress got off to a flying start and i was making excellent headway until a few uncrushable bugs started to work their way in.

Finally i got to a point where it was much easier to just ditch the offending objects and recode them. Many hours latter and i was still running into the same bugs of tiles not being rotated correctly, sometimes. Eventually the offender was tracked down, it turned out to be one of the first functions i had written, a simple little function to cycle a list forwards or backwards, and it only worked going forwards.

def cycle_list(tlist,direction):
    tlist = tlist[:]
    for x in range(abs(direction)):
        if direction > 0:
    return tlist

So the tiny mistake of forgetting to pass 0 to pop cost me about 6 hours of programming time. Complaining aside it works now and can generate a full 9x9 board. I have added weighting so some tiles are more likely to be chosen than others to try and generate a less erratic board but if i have time i would like to add some heuristics to try and make it favor forming larger cities over many small ones.

By tomorrow i hope to have unused tiles sitting in a tray on the right (scaled down) and be able to drag and drop them around on the grid, and if i am going really well hopefully a good start on the scoring code too.

I have also managed to rope in a friend to attempt drawing up some nicer tiles for me.

I commend you if you have read this far though the haze of poor spelling and grammar.


citySquare: Day 3

Well i didn't get round to doing any scoring as i hoped i would, because of being bogged down and distracted by some minor frame rate issues (drawing 150 or so sprites in a batch should have no problem at 60 fps right?). I did however make it so you could move and rotate tiles ect.

Nothing else much to say really besides i hope i get around to setting up scoring tomorrow.

I do however have another screenshot to offer

As well as a download link to the current state of the project on github, see readme for controls
Note: stick with the tagged releases found under downloads because any commits are likely to be broken or not quite work properly

Add a comment

citySquare: Days[-1]

Well times running out and Pyweek is running to a close

I have made great progress in the past few days and implemented tons of stuff like proper scoring menu, and crushed many other subtle and rare bugs that seemed to wander through my code.

I am quite happy with the game i have come up with, even though it is a relatively simple game.

Tomorrow morning i will have a few hours to add in a scoreboard but then after the competition i will have more time to update and optimize some stuff as well as writing up a longer entry.

Before i crash i do have a screen-shot of my fancy new menus though

Add a comment

citySquare: Finished

Well i finally have my game finished, the final commit to git pushed right on the dot (hopefully bugless :s)

I have uploaded the a source copy and managed a mac binary. I still cant get windows binary complied though without it throwing some errors about sqlite3 not being a valid win32 application.

Ok im not sure if it is against the rules to have done it after the finish data but i have modified the library i used for high-scores to use pickle instead of squlite3. I think it was allowed as i changed none of MY code or fixed any bugs or problems with the game, i only changed it enough to complile.

Anyways i have updated the game's page and uploaded binary's for windows and mac as well as the source

Have fun playing

1 comment