Advertisement Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

I know C#-fu!

Sign in to follow this  


Well, OK, I'm an amature but I've got code which looks clever, compiles and looks like it works which is a step in the right direction [grin]

Tonight I took about 3h to write the core code for Atom, which infact consists of a CellManager class, a Cell class and a IGameStateQueryable interface (needed as my CellManager is a generic class, the idea being I can drop it into anything which can hook a UI to it and provide it with a couple of support functions).

The game is infact pretty easy logic wise;

- You select a tile
- If the tile was empty or one of yours then an 'atom' is added to it
- If the atom count in that title goes over the limit then you reset your count to 1 and tell the manager to update your neighbours
- You then signal 'end of turn'

The manager then performs it's updates by working threw a queue of cells to update until it is empty.

This condition was needed as chain reactions can build, so each cell checks it's state and if it has gone over it's limit it queues it's neighbours for updates and so on.

Thinking about it, this could lead to a big infinite loop so there probably needs to be some kinda check/tracking of which player owns which tiles, so when all the tiles are in play and all belong to one player than player can be declared the winner.

The keypoint however is the basic logic and board seeding is in place, the above might need a slight recode to deal with it but other than that I feel good about todays progress.

One thing I couldn't help but wonder however, is there code already in existance in the .Net framework which would have allowed me to find the neighbours for each cell easier than my bruteforce/loopy method I hacked up earlier? I think I'll check...

Hopefully I'll have some kinda alpha of this game done by next weekend.. infact, I'm hoping before thursday as thats when I go back to college.. inital version might even be Pocket PC 2003 based so I can show people it running on my phone [grin]
Sign in to follow this  

1 Comment

Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!