Dwarfsoft [GPA]

XNA

XNA on the Second Day

by on Mar.05, 2009, under Game Development, XNA

Breakout after XNA on the Second Day

Breakout after XNA on the Second Day

So I started attempting to write a game within a Day and blogged about it in “XNA in a Day… Almost“. Firstly I feel the need to explain some of the decisions that were made: I really didn’t have any preparation time, no prior experience with the Framework or the Language. I came in hacking things together instead of planning what I was going to do. I tried not to refactor code too much once it was in place.

The reason for this was that no matter how bad the game ended up, it would do mostly what it was told, and in the process I would have completed the project and have gained some valuable insight into both my own programming methodology, and into the XNA framework from start to finish.

(continue reading…)

6 Comments :, , , , , more...

XNA in a Day… Almost

by on Mar.03, 2009, under Game Development, XNA

A screenshot of Breakout during development

A screenshot of Breakout during development

So, after starting my look into XNA under the guise of “Forays in XNA”, I was able to determine that the core code for developing a Breakout clone was achievable within a day. Considering that I work full time, and currently my wife is heavily pregnant, the fact that I can achieve this within a day should motivate the rest of you to do the same, or at least work harder ;).

My fantastically crafted White Block

My fantastically crafted White Block

So, the first thing I did was I went out and created my images. I used the template from the previous image, which was created by creating some shapes in MS Paint, and then making the background transparent and saving as a PNG using The GIMP.

My fantastically crafted White Ball image

My fantastically crafted White Ball image

My fantastically crafted White Paddle image

My fantastically crafted White Paddle image

I have also created a blank project as before and from the main project Window in C# I create a couple of classes. The first class is called Sprite.cs, the second is Wall.cs, and the third is Collision.cs. The biggest issue I had out of the creation of my Breakout game was the Collision detection. I used some primitive collision detection algorithms that just failed to rebound the ball correctly when it hit the side of an object, and as I am also using blocks with transparencies (and the ball has transparencies as well) the collision detection needs to account for that also.

(continue reading…)

6 Comments :, , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!