Saturday, January 16, 2010
Download
I was deceived
It was actually an interesting fault - it proved the usefulness of a testing team for one! :D It also shows what is true about the plan - I have been using it heavily in the beginning, but later I depended on my head more and more until I stopped using it. I also stopped putting changes into it, as they just all happened in my head (and here). Finally, once I finished I did not go through it and check that I've done everything, and because I've changed many things, it wouldn't be perfect either. In projects bigger in scale such approach would probably not work since it would be too hard to keep all the info fresh in the mind (as the situation showed, even at this scale wrong-do's happened).
Now the game is officially tested and finished :)
Thursday, January 14, 2010
Work officially finished!!!! ... or is it?
Even the final changes did cause me some problems, but I managed to overcome them and now the game is completely finished. I've also added a bar on the right which shows whose turn it is. I also added a bonus! When the up arrow is pressed, the color of the white field -> It gets more and more bright, until it reaches perfect white. If it is pressed again it "skips" to complete black and then gets lighter and lighter, circulating as above. This bonus took me about 4 minutes to make and it is an example of how I am going to keep this project "live".
Now that I have finished the whole game, I will not have as much time for programing and will not be able to make such big projects for quite a while. But I will be able to teak this game and play around with it, adding functionality and appearance to it! This is a great way of keeping the learning going even after the project.
Final thoughts:
I am really glad I managed to do this project because it certainly was very challenging! Although I have changed some things from the initial design, some ideas I had to throw out, I am really happy with it and in fact I didn't really expect it to be much more than what it is. This has been a huge leap in my programing skills and I hope to keep up the development (although not as rapid) in the manner described above.
Wednesday, January 13, 2010
work almost done
results. I have added turn system which makes the game almost
complete. I even thought so and i went to another computer to make
sure it will wort everywhere. It worked well there with the only
exception of the wrong note message.
Anyways the code is not yet complete, as I found/remembered commu
thing that needs to be added - the ability to do continuing captures
in one move. When i started implementing that, I've felt the reality
of a thought i had a few days ago; that my and does not have enough
functions. That it has to much code just thrown into it instead of a
neat division into "working units". For what i was doing now, such the
functions did not only structure the code, making it easier to follow
and edit, but also came to be pretty much essential!
Therefore i am right now in the midle of restructuring a part of the
code. Then I'll look up one more concept (overloading functions) which
will be handy here and will be a good practise use. I simply need to
remind myself what the notation in this case is.
The structure of the code is a perfect example of a case job. The
better is done, no matter the amount of effort, the easier the further
work is (just like the design was)
Sunday, January 10, 2010
Another step forward
So I made a windows message box come up. I was reluctant to do it - I think it's a bit too disturbing - but it actually came out alright. Although now that I thought about it, I think there might be a way to make the writing stay for a few seconds if I make the program simply wait. I'll research functions that could help me to do that and I'll see which solution I like more.
UPDATE [16:12]
I managed to do what I wanted with a very simple Sleep() function. Unfortunately the text is quite small and somehow I didn't manage to change that, even though theoretically I should be able to. But never mind that - I placed it in the middle and make the colors visible making it quite noticeable and at the same time not too disturbing.
Today's work
What was even more frustrating about all this, was that i all that confusing code I made a small mistake in th begining, very careless. Then, once I finished writing, the whole moving mechanism broke. It took me a long time and a lot of trouble to figure out what was wrong. This problem fixing was not exciting like many before - this was mainly frustrating.
Saturday, January 9, 2010
Small changes
Back to work again
I am using different IDEs on the home computer and the computer I was using in Poland, which was virtually the entire time I programmed until now. When I moved the code there were a few errors which were not there on the laptop, but I managed to overcome them (the previous practice was very useful here). Some of the problems I kind of know where they are coming from, but I'm not sure why. But I managed to get rid of all of them and now can keep working on the actual program.
Sunday, December 27, 2009
Solved!
Problems solved, come back twice as bad.... :/
Unfortunately, the breaking mechanism somehow broke. I found out EXACTLY which line of code makes it break, but I have NO idea why it does so and how to fix it. The weird part is that I have not changed this mechanism between it working and it breaking. I have added other things, but this part was not changed. I'll probably have to ask for help with this one, because I really don't know what is wrong with this.
Wednesday, December 23, 2009
The Pieces are Moving!
UPDATE [15:50]
I found the mistake! What's interesting is that the new bits were (in most part) correct and it wasn't these that caused the problem. Once I went through them over and over and was sure that they are correct, I started looking back and found the mistake in the set up of the board. It was just a wrong list given in one spot that didn't influence anything until this spot.
UPDATE [18:55]
I kept improving the code and right now all the pieces move well - only diagonally by 1.
However some of the things which I have implemented don't work yet - the pieces don't beat yet and I have to see what is wrong there.
Lastly there are some things which I simply didn't put into the game - for example the pieces move backwards as well as forwards at the moment.
I think I am well on at least 30% with the game. The following is a quick list of what I still have to add (not strictly ordered):
- Beating Pieces and further movement restrictions (as above),
- Kings,
- algorithms for the program to make sure the game is run properly (so the program can "see" if there is a piece that can be beat etc.)
- the order of the game - start and finish, checking if ended (won), turn system.
Monday, December 21, 2009
Keep on working
Yesterday and today I kept working on the code. I realized that I get so much fun from the challange. Every problem I solve leads me to a next one. But only sometimes I feel frustrated - that's when I have no idea what is wrong. But when they are all a series of problems that I keep moving through (that doesn't mean that they're easy!!) then it all really does bring me joy (especially once I solve something particularly difficult ;) ).
UPDATE - found out the problem, it came from the fact that I am building the program slightly differently than I saw and practiced before. I needed a good description of a Windows message WM_PAINT and I found it easily on MSDN as well as more functions which let me solve the problem.
So now this stage is completely done and I can move on to the interaction stage - adding the implementation of functions that will let me move the pieces. Then algorithms that will serve as rules.
Sunday, December 20, 2009
Code work kicked off!
Right now I am stuck on one quite big problem - I want to create the two classes of Field and Piece which both point to one another. The problem is that the second function in the code can recognize the function that comes before it. However the one that is first can not point to the one that comes afterwards because at that point the compiler doesn't know that it exists.
Thursday, December 17, 2009
The actual change was that I will start with the frame of the program - the Windows' protocalls which actaully create the program in Windows' "memory". This way I will be able to run the program at early stages of development to test the components as I add them. Another advantage is that the Windows' functions are mostly the same for all programs, so they are not really the hard part of the coding.
So the coding in terms of time will look somewhat like this (latter parts might change):
- Windows "frame"
- Basic graphics (The board)
- Classes (pieces, fields)
- Movement graphics
- Structure of the game
- Final improvements, fixes, etc.
Thursday, December 10, 2009
December update
Now I have 1.5 month to finsh the game. I believe I can finish the game in this time, although with quite a big effort. I will use the winter break to its full extent for this. However, even if it so happens that I do not manage to create the full game, it should not hurt my PP, because my goal is to learn from the creation, not to create. I will finish the game anyways, weather it will be within PP or already afterwards.
I figured that when I have a problem with my code, it would be a great help to have someone I can actaully physically come up and talk to - online tutorials and such are good, but when there's a specific problem this kind of help would be much much better. I have contacted an IT teacher, Mr. Vitaly, who has some experience with C++ and making games. He is happy to help me if find any obstacles that I don't know how to tackle.
Saturday, November 21, 2009
Code work started
Tuesday, November 17, 2009
Notebook update - ready for Programing
I can't post the notebook contents here, because of some things saved as images. It would also interfere with the blog's width. So I've put it up as a Google doc, here is the link. It took quite some working around, but its there :D. Oh yeah - there is a bunch of hyper-links there - i use them to ease the navigation around the notebook. They won't work here, so don't try. :)
Just a quick note on the way I have kept my notes. I am the only writer of the program, so I am the only one who needs to understand these notes :). Of course it is a good thing to keep them coherent and make them make sense, but since it is a small project (in terms of programing, not school :)) I could make them a little... spontaneous. Most of the notes will not be understandable to someone without programing/C++ knowledge and much of it won't be understandable to anyone but me. But there they are. I'll probably include them in an appendix to my essay.
Friday, November 13, 2009
Design Update
Once I'll have done enough design to start the creation I will post all my notebook pages here. I am glad to see that the designing process is in fact taking me just about the amount of time that I wanted it to and planned for it, despite the fact that it was a fairly unprecedented thing for me to plan for :).
PS sorry for the bore but it is a really important point for my reflection - this is the kind of learning experience which I can't get without making and is so valuable. :)
Tuesday, November 10, 2009
Initial design brainstorming
Those, of course, are only a part of all the classes, variables, functions and algorithms that will make up the game, but they are a good start. I should try and design most of them before starting to write the code yet. As I have now, I should be using OneNote for that. I will create a page in the OneNote notebook for each object/group and connect them with hyper-links for the easiness of use, which is essential since it is something that I should be using throughout the coding, not just a beginning step.
I will keep updating the pages in the notebook as I think of new things, also during the course of writing the program - it is a help tool, not a strict plan I cant adjust. It is all very flexible and similar to the design cycle from D.T.

