Monday, February 21, 2011

Chapter 3

Completed chapter 3.  There are some exercises left, but they involve some modifications of bitmaps, which isn't what I'm trying to learn.  This was a very involved chapter, a lot of code, some new concepts, interesting over all.
Once again, had to debug on two occurrences, once to find a missing 'using' statement - C# just took over at that point, and "fixed" up (changed basically) what I was typing by changing the name of the class to a similar name.  I was looking at the book not paying attention to the screen, and ended up with wrong class names, which don't have same constructors/methods.

Looking into the future, I'm thinking of getting OGRE 3D 1.7 Beginner's Guide
It seems to be the same type of a book (a tutorial of a kind), concentrating on 3D-development.

Tuesday, February 15, 2011

Sudoku enhanced

Updated my rather bland text output of Sudoku to also print out data in a more graphical way.  It isn't yet capable of taking input, yet displaying updated boxes in color helps find which boxes need updating.

The display was a copy from my attempted Minesweeper clone.

The logic was further enhanced to solve hard mode of  Unfortunately it cannot yet crack the 'Evil' mode, as the second screen-shot shows.  (all boxes with multiple values aren't solved, they list possible values)

Saturday, February 12, 2011


Sudoku is a fun game to play.  I wanted to write a program to solve sudoku for a while now.  Took some time and wrote up one today.  It can solve easy and medium puzzles off  I'm aware of a few limitations in it, so I don't expect it to solve all types of puzzles, but it does a lot.
I can always add brute-force for some extra hard puzzles, but I'd like to add as much smarts into it as I can before going down that road.

For now, I'm happy with the project the way it is, I give it this type of input file:

And this is the output:

I'm not a very graphical person, and haven't made a gui for it.  That can be done later, hopefully I'll be back to my book tomorrow.

Tuesday, February 8, 2011

Chapter 2. This one had a lot of code to type in. The game seems a lot more advanced as well, and I'm not familiar with it. An interesting occurrence has happened, there's is a bug. I presume, the issue is a typo I did, not a problem in the book, but instead of checking all code line by line, I am about to debug the issue.
What works: The main screen comes up. The game-screen also comes up.
What does not work: Clicking around does nothing, I believe I'm trying to play it correctly, but nothing is happening.

After a couple of hours debugging various issues, and finding two typo's I have made, finally gave up and did a diff of supplied code and what I typed in. The issue was I put a plus instead of a multiply sign. The final screen-shot shows how the game should look like. The game is now operational.

It was quite a learning experience, I'm convinced that in future, to debug GUI programs I'll need to have text representations of them, in order to make sure that logic is working, and the issue is in display. It's possible that with experience these things will become easier though.

Sunday, January 30, 2011

Been procrastinating a bit, finally went through chapter one.
Ended up with a little game, the chapter went through it step by step, explained the whole thing very well. The number of lines to write the game is surprisingly small. So far so good.

Wednesday, January 19, 2011

Starting on XNA

I have recently ordered a book "XNA 4.0 Game Development by Example: Beginner's Guide"

For a while I wanted to start on game development, but approached it by trying things in java and C++. However this time my approach will be to take advice from a book dedicated to game development, and apply my knowledge of programming to what I learn.

The book seems to be mostly a 2D book. For my first project of a real game, that is good. It will let me work out on 'game' aspects, and leave the worrying of how to do 3D game for the next phase.

Ultimately I'd like to finish a 2D game based on this book, and follow it up by learning 3D game-programming techniques.