Tag Archive for xna

Sudoku

I made this little program to test my sudoku-solving algorithm around the christmas time. I used XNA to draw the puzzle, and solving algorithm works in a separate thread (included below). This is not the best algorithm since it can’t solve “hard” puzzles. But it can logically deduct numbers (no guessing) and put them in the right place.

sudoku

SudokuSolver.cs:

VM Warfare

VM Warfare

VM Warfare is a multiplayer/singleplayer deathmatch game that won the Best Multiplayer Game award at GamesFleadh 2013. I created it together with Viktor Zolin, who made map editor and tile engine, while I mad emost of the game itself.

You are a soldier defending the Earth against alien attack. To help you with this, helicopters will randomly drop fuel supplies and toolboxes around the map – pick them up to replenish your fuel and health. But be careful! Aliens will want to collect them too!

Some info about the game:

  • Won the Best Multiplayer Game award
  • AI is clever, it will not go into obstacles, it will run away looking for health boxes if they’re low on health
  • Apart from health, you need to mind your fuel bar or you will be immobilized
  • Fuel and health boxes are dropped by helicopters
  • Explosions are dynamically generated from particles
  • Multiplayer mode allows for up to 4 players – each player needs to connect with an xbox controller and 1 can use the keyboard.
Typical gameplay

Typical gameplay

You can invite friends over and enjoy the award winning split-screen multiplayer experience, or face hordes of aliens by yourself.

Multiplayer mode allows up for 4 players

Multiplayer mode allows up for 4 players

Project in Visual Studio

Project in Visual Studio

Download VM Warfare
Download source code (Game only, no tile engine)

Conway’s life

This is a Life simulator based on Conway’s Game of Life. It uses a Camera class, so user can pan around and zoom in and out to enlarge the cells. My fevourite feature is “genetics”. Cells start with random colours and as new cells are created, they inherit color from their parents (average RGB value). One can also spawn predefined life forms (crawlers, oscillators etc) and load/save the state as a bitmap file. File can be adited using MS Paint and loaded into program.

Conway's life

Tank Command

tankcommand

An idea popped into my head one day to create a tank game. It’s not like any other 2d tank game. To play this one, players will not use gamepads, or keyboards… sort of. In this game, tanks are controlled completely by typing commands. Each player connects to the server via telnet and after typing their name they can start sending commands to move their tanks, aim and shoot.

Each player’s tank is different color. There are dummy tanks spawned at random locations and bunkers, which players can hide behind. Bunkers are very durable, but will give way after heavy fire and explode, damaging everything near by. This is my first game to actually have sounds. The tank engine idles when stationary, and revs up when moving or turning depending on the speed. Even turret makes sound when it turns.

 

It’s very raw so far, but it works! Available commands are go, turn, aim, fire. Obviously players who type the fastest will win but some luck is involved too. All players watch the game on one screen and need to be able to connect via telnet on port 8787. Commands allow them to go forward/back, turn around by any angle, aim the turret – it can be moved independently to the tank body. Players can rotate the tank/turret by typing angle in degrees. Negative values allow them to rotate/go in the opposite direction. Future versions may allow players to watch the game on their own screen, but so far this solution works well, because nobody needs to install any software to play it – the Windows terminal suffices.

 

DEMO, tank controlled by keyboard:

Tank controlled by telnet commands:

Pong

XNA Pong

I made this game in C# using XNA. It’s the second pong game I made and the first one to feature multiple balls. This game is very difficult to work on, because it’s very addictive and therefore debugging it takes hours.

It supports two players and AI. Number of balls and score threshold can be selected before the game starts.