Showing posts with label 2d. Show all posts
Showing posts with label 2d. Show all posts

Wednesday, September 30, 2015

Squares Vs Circles now out on Android

I've been spending my time recently recreating and upgrading my Squares vs Circles game that I originally released on Windows phone. 

It's actually been on the play store for a little while now. That has given me plenty of time to find and fix any lingering bugs. Upgrades and leader boards are brand new features for the android version as well as many small graphical upgrades. 

It's been an interesting time, developing this game that is. It's made using the unity engine. I have been spending my time learning the engine since I left college and I love it. It's much quicker to get to the actual game mechanic scripting side of things with Unity as the engine is already there. With XNA you had to pretty much create your engine before you had any fun, but with unity you just get straight to it.

Anyway here's a link to the game. Give it a go and maybe give me a rating if you can.

Saturday, January 26, 2013

Random 2D Terrain in XNA

I've been messing around with xna again recently after a brief spell with the UDK. I have been a long time fan of Terraira and was wondering how they managed to create the random terrain for their game. I searched around and came across this. The midpoint displacement algorithm. I tried doing this for a while to no avail. I was confident that I could get it to work given enough time however since going back to college I have very little time for side projects. This got me thinking, there had to be an easier way to do this. Instead of starting off with one line and then breaking it up into smaller and smaller ones, why not just start off small and use a similar technique to randomise the height of the next small line. This was the result.
The white line is the random terrain. I started off by stating the total map width. This is in pixels. Then I stated how detailed I want the map by giving a total number of points to be generated. I then  calculated how far apart the points should be by dividing the width in pixels by the number of points. I then generated the first line. I used the end point of the first line as the start point of the next line and generated a random height for the end point of that line within a certain predetermined range. Repeat this for as long as you want and you get the result above. It is also possible to get a better result by increasing the random height range.
The result is kinda cool. I may post source code someday but for now I will continue my experiments.

Update: As requested here is the source code.