Tomorrow in the programming lecture we’re going to learn how to make binary files from the files that we have and package them. Since we’re going to release Fly or Die! on Desura, I want to have that packaging done to the game that we want to ship. I mean the assets are already there, so all we need is a menu and I can package the files and get it working into the game and we can finally release the thing and don’t really look back.
Also I want to add an executable that allows us to utilize the cellphone controls. Of course that is if the King of the Thrill group really allows us to do that, however I’ve mentioned it to some of their team members and they didn’t seem to mind at all. What we gotta do though is to get the cell phone controls to have a fly or die logo or the colours of Fly or Die. Primarily though it will be released with xbox controls, but I need to modify the joystick input files first, because as it turns out the connection is polled every so often, and it should really just update if there’s a change, otherwise it shouldn’t update. That said however it’s not that big of a deal, once a Joystick is connected the problem somehow disappears.
In any case, we’re not too far away from releasing the game, first I need to get through tomorrow’s lecture and understand how we can wrap the assets into a big file and then in turn read those file back into the memory without losing any data. Once I get how to do that, it’s the menus next and finally getting the game to read and use the settings file. That’s all that is needed. We could have cleaned up the code and done some minor debugging, but as it stands the game is fairly stable, there are some bugs in the game, one in particular that I really hate, but as it is now I don’t know a good way to actually fix the bug without rewriting a lot of the code. To make a long story short, we made a shortcut, limiting the frame rate to 60fps.
It doesn’t sound so bad, however if you run the game and want to record it for instance, let’s say you use Fraps, what happens is that if you record in 30fps, the software doesn’t interpolate between the missing frame and the characters move around choppy. It creates a really weird effect which doesn’t look any good. One solution is of course to record it in 60fps, but you then get twice as much data as you normally would need. Now that’s just one specific problem, another problem arises if the computer that want to run the game isn’t strong enough and can’t run the game in 60fps, the game is slowed down a lot, because the whole buildup is based on the game running in 60fps. Unfortunately we discovered this problem a while into development, and were forced to continue developing the game with that limitation. What we should have done though was to make the game loop run in 25 frames and then had a functionality that could predict where the characters are. 25 Frames pr second for the main game loop is enough anyway, 25 updates and then the graphical loop should be ran as fast as it could. Lesson learned! Using the built in frame limitation from the software is not a good idea. Don’t get me wrong, it works, but at least for my part won’t use that solution again unless I have to.
Programming
Current assignment in programming is a nice one, we have to make a dynamic array, linked list and a binary search tree, which is an interesting assignment that I’ve already learned a lot from. That said, curse you binary search tree! I really hate the remove one Node which is used part, other than that it has worked quite well. Recursion is something that I’ve kinda had a problem struggling with, I know what it is, but what has been problematic is figuring out what exactly it does. What does it execute and when, today I found out more or less how it works and recursion seems to be a very nice way of handing certain problems, but I do see how it can be problematic as well. In essence you are calling the method or function over and over, once you get to the point where the recursion ends you continue in the function from the last to the first again.
What I did like a lot with the assignment is that you really need to sit down and think about what you’re doing, you do need a plan of attack so to speak. Of course if you’ve done it a lot, probably something that you know how to do and recognize the pattern instantly, however for me which has around 1 year of experience in programming, it’s something that I need to figure out. Sitting down writing the search tree, where the values should be, what the action should be when removing something. That said, it’s fun to figure that out, and luckily if I get stuck there’s a lot of resources out there that can help out, maybe not with the solution directly but with how you can think in order to solve the problem, and to be honest if you are copying something directly you’re not really learning from the experience and then there’s no point to the assignment. Programming is very much learning by doing, testing, failing and trying again.