Space Invaders

Screen shot of Space Invaders Game

Download

An arcade classic. In fact one of the most played games ever therefore requires very little introduction.

Quite simply the aim of the game is to defeat waves of aliens with a laser cannon to earn as many points as possible. It was originally released in Japan in 1978. This is my attempt at recreating it.

Top score brags welcome.

Continue Reading...

Cluedo

Based on the murder mystery board game by Parker

Download

Cluedo represents my first attempt to build a fully functional game which incorporates a Graphical User Interface, and having done so with no guidance from a textbook. Admittedly, I may have borrowed a couple of graphics, but the code at least is 100% my own.

The game tries to replicate the murder mystery board game of Cluedo. I looked up the rules online and found various flavours; therefore the game play may vary slightly to what you are used to if you’ve played the game before, i.e. Do you normally roll the die again if you threw a six? (not in this one you don’t).

It basically allows the user to play as any game character, against 2 – 5 computer controlled opponents. There are 6 characters, 6 weapons and 9 rooms in all. Each are represented by a card, and one of each of these cards are selected at random at the start of the game. These 3 cards represent the murder details – A room, a suspect, and a weapon. By process of elimination it is your job to identify all 3 cards before one of your opponents does. To do this, you move your character around the game board into the various rooms, and then you make a suggestion on a room, suspect and weapon at each turn. An opponent will show you a card matching your suggestion if they have one in their hand. Your opponents play the game in the same way; they will control their own movement around the board and choose which cards to suggest for their own investigation. You in turn will be required to show your opponents a card from your own hand when requested.

The winning player is the first to identify who committed the murder, where, and with which weapon.

Technical Issue:
(Only read on if you’re interested in the programming details)

All is not perfect though… There is a small but noticeable problem which I’ll elaborate on and hold my hands up to.

If you play the game, you will probably notice that there is a small flicker in the game board image each time a token moves around on top of it. This problem basically results from the way that images are ‘redrawn’ on the screen every time the token changes position. Further, this problem is the result of the approach I’ve used to build the application. That is i’ve done so with a heavy use of ‘Controls’ – namely the ‘Picture Box’ control which is used for the game board and for all that moves around on top of it.

Now admittedly, part way through the development of this game (while doing my studying), I learnt a wealth of knowledge about the ‘Graphics’ class and its ability to draw images on the fly to the screen, and using pre-scaling techniques to speed the whole process up. A far better method than using the Picture Box controls if objects are moving around on the screen. One bonus result being no more flicker!

Now I did actually start to re-write a significant part of the application to make use of these superior programming techniques. However, after a couple of hours of re-coding, I discovered that this was a much bigger effort than I first anticipated. Pretty much the entire way I had written the program would have had to be changed. So, part way through I asked myself was it really worth it? Well, probably not. The game isn’t being produced for a client and won’t be sold as a commercial product. Fortunately I had backed up my work before tinkering.

I therefore take this as a learning experience; and when in the planning stages of my next application I am now armed with the knowledge that graphical animation requires a different approach to pull off. Furthermore when I build Halo 4 on behalf of Microsoft, you can sleep at night with the assurance that it will be flicker free :-)

Continue Reading...

Portfolio Page Completed

Hey, just a quick update to say that I’ve updated the Portfolio page which now contains a brief synopsis and a download link for each application I’ve developed so far and going forward every application/program I develop will be available here including the less significant ones which I won’t put on the blog.

That done, I’ll get back to working on Cluedo tomorrow night :)

Continue Reading...

Battleships v1.0

My first proper game: Battleships

Download

(To install, unzip the download and run setup.exe – give me a shout if you need any help)

Now then… a game you can actually play…my re-creation of a child-hood favourite called Battleships. You the commander of a fleet of 5 sea vessels and you are pitched against the computer; your objective is to find and destroy the computers ships before it sinks yours. Simple.

As with the previous application, this is written using the text-based Console Window so again there are no fancy graphics and you must control all game interaction using the keyboard. So please bear in mind that I can only do so much to make it look good. That said; I’m sure you’ll agree that this is much better than my last effort thanks to a little work with colours, cursor positioning and a  touch of ASCII Art.

The game starts  by allowing you to choose from some options. You can set up a basic profile or retrieve an existing one; and you can choose whether you want to position your own ships or not. If you let the computer position the ships for you then you still get the chance to be picky and ask for some new positions.

Your then flipped back and forth between your battlegrid and the computers while you take shots at each other. You can see your own ships on your battlegrid, but your firing blind at the computer. The display feeds back each shot as a hit or miss as each takes their shots. If you hit then you get another go. When a sink is sunk the opponent confirms this to be the case. Straight forward enough. Once one player has sunk all their opponents ships the game  is over.

From a programming perspective, with this game I’d say there were two main challenges. The first was the display; creating a grid and allowing you as the player to easily interact with that grid i.e. position your ships and taking shots at the computer while ensuring that all was kept within the legalities of the game… i.e you cannot hide your Cruiser off the edge of the grid! (feel free to try though) and ensuring the feedback you receive from the game was easy to follow. The second challenge was the AI (artificial intelligence) of the computer. For the game to feel like proper it should feel like your playing a real life opponent and your opponent should be able to make decisions on where to aim their shots just as well as you can. This was achieved with fairly comprehensive logical programming which allows the computer to make calculations and decisions on every move. You’ll hopefully find the computer pretty competitive anyhow.

I think it’s pretty playable & I hope someone out there enjoys playing it

Continue Reading...

Dart Score Calculator

My First Program beyond Hello World!

Download

Ok, I’ve put this up purely to help demonstrate where I’ve come from… you need to see the early work to appreciate progress I guess. I think I finished this version during November 2011. I started learning how to program with C# around August. There were 3 ever more basic versions just before it which I’ll list under the portfolio in case anyone cares to see v 1.0

Firstly, this app, as with some that will follow, uses the Windows Console Window to run. That means there are no graphics, no mouse clicks…its text only which means it will never be overly pleasing on the eye. I’ve thrown in the odd use of colour, but graphically that is about as exciting as it  gets. You can do a little more as my Battleships game will  show, but honestly, it is very limited.

Why program it to run in a Console Window then? Well, at this stage I’m trying to learn the language and how to program; learning how to create graphical displays comes a little later. If you can get the code to work, adding a fancy graphical user interface on top isn’t too complicated… the core and complexity of the program is in the code so that’s  why a few programs will be made in this fashion. (sorry).

So, moving on… this application would only be useful to somebody while actually playing a game of darts. Makes sense right? Most people take their laptops to the pub for a pint and game of darts don’t they? Ok, well, maybe not… the point of this for me was to learn some basics of programming: being to allow a user to put data in (dart scores), do something with it (basic math), keep track of it call (memory/ variable storage) and present something back out (display stats). It does a little more than that i.e. various validation to make sure the scores entered are legal within the rules of darts, and it  can save and recall statistics for each player created. All pretty basic stuff now I look back on it, but I was quite pleased with it at  the time – this was my first program after all.

Continue Reading...

New Blog site up and running

Welcome to my new blog where from this day forth I’ll be charting my progress on the path to becoming a software developer… more on that soon.

I finally got round to reinstating a presence on the web after many absent years. I think it was around 2001/2002 when I took my much-loved Macromedia Flash (pre Adobe) website offline.  I’m not normally a fan of using templates to  be honest – hardly a way to showcase ones web design skills, but for now I’m dedicating my time and energy to learning programming, not HTML or web design so I welcome the convenience and time-saving attributes of WordPress Blog Template.  Please don’t judge me :-)

Moving on, take a look at the About Me blurb which puts this whole think into context – What I’m doing and Why?

Going forward, as and when I develop a new apps I’ll be making them available to download and then welcoming all praise and positive comments that  you wish to spoil me with :-)  Each application/ game I work on will be bigger and better and more feature packed than the last… certainly in programming terms anyhow.

My intent for now at least is not to become a game developer; but most apps I create will probably be games since they will be a little more fun to work on, a bit easier for me to create a specification for, and lets face it, people are not likely to have too much to say about a Warehouse Stock Management System are they? A likely project for a real world scenario maybe, but hardly the most entertaining thing for people to test or for me to unleash my programming creativity upon.

Anyway, thanks again for reading, if you use or play with any of the applications I work on please let me know what you think – good  and bad or tell me if you find any bugs where something doesn’t quite work as it should – it’s the best  thing you can do to help me learn and reach my goals.

Best Wishes.

Mark

 

Continue Reading...

  • Next Project

    Simulator Game

    Some may remember games such as Theme Park; Rollercoaster Tycoon; Sim City etc. They are all simulator style games where you manage a setting, you construct buildings, provide facilities; and aim to keep your guests or population happy as they wonder around the world you create for them.

    I'm not sure 100% of the setting yet though it will probably an Attraction Park theme like a theme park or a Zoo. The player will build the attraction as they please and then the game will simulate guests, income, natural disasters etc. The objective of the player will be to build the attraction as they see fit, make it sustainable, have as many guests as possible; make their guests as happy as possible, all while maintaining the world they create against the challenges that are thrown at them.

    This is the basic idea I’ve got in mind for my next project - Basically an automated world which the user can shape and influence.

    However, I'm going to take some time to dive back into the text books for now. Therefore all being well I'm going to anticipate starting this game during April or May.

  • Recent Posts
  • Archives
  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.