Tuesday, January 31, 2012

Video Update

Just thought I'd post a quick video of Squares Vs Circles: TD.

Sunday, January 29, 2012

More Progress

It's been a while since my last post. I have been quite busy with the game and with my college work but I though it was time for another progress report.

Since my last progress report I have been mostly working on Squares Vs Circles TD. Working on removing game breaking bugs and you know other small things like that. It's very close to moving out of alpha and into beta. Here are a few screens.
This is the main menu screen. I changed the logo from the original Squares V Circles. This one looks much nicer and suites the game better. I don't have anything going on in the background yet but I have something in mind.
Here is a random level from the game. Some levels will not allow you to have some guns and some won't allow you to upgrade your guns. The blank rectangle at the top of the screen is reserved for ads.

As you hopefully can see I have started to add the first coat of polish(the first of many if I have the patience). 

I haven't really made that much progress I know(one of the reasons might be that I have gotten addicted to Terraria lately) but every step to the finished product counts. I also hope to have more XNA tutorials up soon so check back regularly.

Friday, January 20, 2012

XNA Tutorial: Sprite Rotation

When I was learning XNA this was one of the things I always wondered how to do. Since then I have learned how to do it and thought it was about time I shared my knowledge. For this tutorial I'm going to show you how to rotate a texture, how to rotate it to point towards another point and how to move the sprite towards that point.

Here is the image I used
First things first open up visual studio and start a new windows game project. Next copy the image above or get your own and add it to your project. Its important to note that the orientation of the image is important. The front of your object should be pointing towards the right.

Next go to your Game1.cs file just below where the spritebatch is declared and declare the variables you will need.
Now go to the LoadContent method and initialize the variables. The speed variable will be used later.
Next up is the Update method. In this tutorial I'm going to use the mouse position as the point the sprite will rotate towards. So lets get the state of the mouse. Were going to use the mousePosition variable to hold the X, Y position of the mouse. Next were going to get the direction vector. We do this by subtracting the mousePosition from the position of our sprite. But we can't use this yet we need to normalize the direction to turn it into a unit vector. We can now use this to find the rotation by using the Math.Atan2 method. I have no idea of the maths behind this method but it works.
Math.Atan2 works on doubles so remember to cast to direction y/x to doubles and also as this method returns a double, remember to add another cast but this time to a float.

Finally we get to the Draw method. One thing to note here is to make sure you have the origin set to the center of your image. So here I'm dividing the width and height of the image by 2 and setting that to be the origin. It is possible to set the origin to be anywhere on your image and the image should rotate around that origin.
If you run this the rocket should point towards your mouse cursor. If you can't see your cursor go to the Initialize method and write: this.IsMouseVisable = true.

Now to make your rocket move towards your mouse cursor at a constant speed. Go to the Update method and just after you set the rotation write the following.
To get this effect you simply multiply the speed you want your rocket to go by the direction vector we calculated earlier and then add this to the position of your rocket.

If you run the project now you should see the rocket follow your mouse cursor no matter where it is.


This is how it should look.

And there ends my first XNA tutorial. If you see any errors or have any questions please leave a comment below.

Thursday, January 19, 2012

Progress Report

It's been a while since my last post. Since then progress has been slow, there are too many distractions at home. Despite this I have been working. In my last post I told you that I had updated Sparks and it now contains ads. I have also now done the same to Squares V Circles. Which took much longer to integrate than in Sparks(damn my horrible habit of hard-coding screen coordinates). I have noticed a slight increase in the download numbers for Sparks since the update, very slight but still worth noting.

I've put Cubes Vs Spheres on hold for a little while and started working on another project. A tower defense game. I love tower defense games they are my favorite genre of mobile games so I thought I try my hand at one. Squares Vs Circles TD will be path based i.e. the enemies follow a particular path through the level. There will be a number of waves in a level. Screenshot time.
Pre-Alpha Gameplay
In the screenshot above you can see the easiest enemies in the game appearing at the beginning of the track and disappearing at the end. The gun turret simply shoots the nearest target, the rocket seek its nearest target and the slow turret slows the nearest enemy. This screenshot is missing a few layers of polish which I will add when I get all the basic game mechanics working but I'm very happy with the progress I've made so far. I hope to finish it up in about 2 weeks. So keep an eye out for it in the windows phone marketplace in the future.

Tuesday, January 10, 2012

App Downloads

There seems to be a lack of information about the amount of downloads apps are getting on windows phone marketplace(apart from over at the occasional gamer. Those download numbers are amazing). I did not market any of my games and I think the download numbers reflect that but I'm pretty happy with them.

Click to get a better look
Here you can see all 2.1 of my apps(0.1 being the BMI Calculator). The BMI app I made and released just to developer unlock my phone. The first tiny spike is the release of the BMI app. The first large spike is the release of Sparks. The first day it had around 300 downloads. Within a week it had dropped completely off the radar and after that averaged around 3 or 4 downloads a day. The next large spike is the release of Squares V Circles. First day it had around 200. and again like Sparks dropped off within a week for what I hope is the same reason. I had hoped that Squares V Circles would receive more downloads because it was actually a game unlike Sparks which is essentially a particle sim. Total downloads for all the apps is 2,103.

One thing I learned from releasing these apps is that you can't just release your apps and expect them to get tons of downloads beyond the initial release. To this end I have started to experiment with AdDuplex. AdDuplex Gives you 8 free adverts for your app for every 10 you show. Its only been a week and I will have an update in the future on whether it has helped or not.

Sunday, January 8, 2012

New Blog

Welcome to my new personal blog. Hopefully I will be letting you know about all my games and apps I am or will be developing in the future and maybe some general posts about windows phone and XNA.

I have had so many game ideas lately and no time to do any of them. I finally made a decision to do one of them. I'm going to make a sequel to a game of mine that I have developed for the windows phone, Squares V Circles. I was pretty happy with that game although I think it gets boring after a while. I seen some of my friends playing it and there completely glued to it and I have no idea why. The game was endless i.e. you could play it for as long as you want or until your battery runs out. It never became difficult or interesting.

For Squares V Circles 2 or should I say Cubes V Spheres I plan to do a fully 3D top down vertical scroller with lots and lots of particle effects (people seem to love particle effects). I haven't started yet and will be posting updates every few days hopefully so check in every now and then. I have filled a OneNote document with ideas for this and I can't wait to get stuck in to the development.