2014-02-04
|
Hello world, This was (to be honest) a pretty not-so-very-good day. I started off with making the clouds move more credibly as the camera was moving, which went ok and did not take up too much of my time. But other than that I got stuck with a problem that kept me busy for several hours and in the end, without me showing any result. What I wanted to accomplish was to include the library SFML in my State Manager program so that I could try out the different states by making them output things and actually proof that they were really working. The first problem was that I did not remember how to include SFML in a project. I did get help from a more experienced programmer in my class who told me that I should look at a program where I had already included SFML in order to see exactly where in the Settings I had to do the changes. I also had to copy some SFML files from the old program to the new one, where I had to create the correct folders to put them in. There, first problem solved, I had learnt how to include SFML in a project. This was when I realised that I were missing the specific main cpp’s (files) within the project that I would normally get by picking the “right” choises when creating the project from the beginning. For some reason I did not try to create these by myself – I figured that I would just move the entire State Manager-program into the old program which had SFML included from the beginning as well as containing the main-files that I needed. I did this by creating new .cpp and .h files and then just copy-paste the code into the new files in the old project (I am doing my best to describe this pedagogically, believe it or not). However, half way through my super effective copy-paste process the programmer I mentioned earlier was kind enough to show me how I could transfer the files outside of the program (using “my documents”) by copy-paste the files in the right folders and then pressing some buttons inside of the program to apply them into the project. I am sure it is effective but to be honest, I absolutely do not remember exactly how we did that. I think I will stick to my way in the future. So, there it was. My State-manager(s) in a project that included SFML and everything else I needed. There was only one slight problem left now – this project had a name wich were spelled with an “ö” which accordingly to all of my programming teachera and mentors and co-workers and classmates was a big NO. It is not ok to use Swedish letters in a program. Some people claims that there will occur errors when using the program on some computers or with some programs or whatever, and some say they have no idea if it effects anything in some way, and some say that it is just because it is ugly and that it might be diffuse for possible international co-workers to use that program later on. Simply put – I had to rename my project. Now, for those who does not code it might not seem like a big deal to rename a program. But when you create a program it includes loads of files that will have the same name as the one you gave the program, and all these files will link information between each other in all possible directions. Now, you could try to just rename the first file or folder you see with the name of your project, but this would not mean that every other file in the program corrects itself after that one change. At this point, the programmer who had helped me earlier was laughing at me. To rename a project/program is a long and complicated process which he had tried a couple of times earlier(with help from guides) but never got it to work. Despite knowing this, we started the process of renaming my project. After doing a secure copy of it first, or course. I will not describe what we did, because I am still not sure myself since we did so many name changes in so many different places of the projcet – both inside of the program and from the outside. During this time, other classmates(many of them experienced programmers) started to flock around us, scratching and shaking their heads and smiling at the fact that we actually were to try to change the name. And, after a good while, I gave up. I figured that it would be a lot easier to just create a new project from scratch with the necessary premade settings and then again copy-pasting my State-managers into the new one. After these hours of stuggles I was so sick of struggling with codes and projects and names that I decided to fix the problem the next day instead, and call it a day for now.
|