Archives for the month of: November, 2013

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.

Today Rasmus and I sat down to try and port the Cellphone controller mechanics with Fly or Die, after just 3.5 hours of messing with the old Fly or Die code we were able to actually get the controller to work. It’s not perfect, but it works as well as King of the Trill did with the same controllers. We tested it with 4 players and it works surprisingly well and not only that but we didn’t use that much time to be able to port it over.

Of course it’s not really that complete, I mean the web interface is still showing the King of the Thrill logo and the web interface isn’t really made for fly or die, however we were able to fly around and have fun. The controllers are a little bit wonky, on the cellphone that is. It seems to turn a little bit more than what it did with the joystick, however I think that’s more a latency thing. That said because of that, steering was a little bit easier. Now all we can do is wish King of the Thrill guys good luck when it comes to showing off the controls and hopefully be able to demonstrate that to whoever they want to demonstrate it to.

I know they are going to work on the game some more, but it was really interesting to see that we were able to fairly easy just port the controller over from the Xbox joystick input method to the cellphone input. I’d like to think that it was because of the input class that we had created for the project that made it easier. However realistically I don’t really think so, it would have been possible to do it straight into the code checks, it would have been more “painful”, but it would have worked. Next thing would be to get Joystick and Cellphone support, that would have been nice, unfortunately I had to disable the Joystick part in the code, so now it’s either Joystick or Cellphone, so we need 2 versions so to speak.

Also I discovered that the joystick code is badly written. Once I disabled the joystick code the game ran very smoothly, so I should take some time to fix my old utility class into something that works a lot better. It’s at least good to know that what I’ve done wrong is only Joystick related, once the Joystick code was out of the game it ran well. So there’s something with the Joystick input that is either checking too often, I mean you only need to check like every 5 or 10 seconds I suppose. Lesson learned so I’m going to re-write the class as I like having an input class that handles all inputs, even if it just wraps existing code into just one class, that I think is more easily manageable.

I see now that I haven’t blogged for a while. Reason for that is that I didn’t feel like I had anything to blog about. Still really don’t have anything to blog about except that we’ve started with c++ and math, and will have that for the next 9 weeks. At the first glance the math that we have now doesn’t look that terrifying, I thought that once you got to the calculating trigonometry that it would be difficult, I remember that I had problems with that before, although I’ve created my own way of remembering which is which and how to calculate it.

Turns out it wasn’t so big of a deal after all, I’m not saying that I got everything right on the first attempt, but at least I understand the principles behind it. I’m not going to bore anyone with the details, but it’s interesting to know why we’re working with 1 to 0 and to -1 as numbers. I didn’t know that before, yeah I know it’s not _the_ revelation in the world, but nonetheless, it’s new to me. When the teacher went through it was all so obvious, almost so obvious that I should have figured that out myself. Anyway, I didn’t and now I know, but that’s the reason why we are learn this, because it’s something that we probably didn’t know on beforehand.

Programming

Today we also had our first lecture in advanced c++, what’s kinda nice to know is that we’ve already touched a lot of what is considered advanced c++. Inheritance, dynamic memory allocation etc. One thing we did see today, however I didn’t really feel that I got the grasp of was the Friend class type, which I want to do some research on, from what I understood you just put two classes as a friend to each other and you merge them in a way. That said it would be nice to see some examples of that, but now that I know they exist I can always just Google it.

Another new thing that we had today was the method pointers, now this is fairly abstract and we didn’t really get any good examples of how to use it and when, but from what I understood, it is a way to call on an array of classes that all have the same method and have them create themselves so to speak. Instead of using enumerations and having an enumeration that tells what kind of object you’re dealing with. For instance if you create a class called GameObject, you can create a child class called Player, Enemy, Stone, Tracks, Bullets etc. All kinds of children to that GameObject class, and in that class you create an enumeration that is called the same as the different types of classes. So when you create or instantiate the class you say that this is a Player, this is an Enemy etc.

If I have understood the method pointer correctly, you can instead create an array of those classes and run a method that is called Create(), and you create those objects and you have a pointer to that object. That said however I’m still not sure how you would practically apply it or use it. We will however get a demonstration of how it works tomorrow as the teacher wanted to come back to the subject. Apparently it’s not something that is widely used, but it is something that is good to know how to use. In addition to that, when we encounter code like that it is good to know what it does and how it functions.

Other than that most of today was more or less repetition of what we have previously learned, but tomorrow we’re going to learn more and hopefully be able to learn more about method pointers.

This weekend we’re also going to go through the idea for the big game project, and we’re going to send that in on during the weekend. It’s not my idea though, but the more I hear about it the more I’m thinking it could be something of commercial value later on, but we’ll see, the goal isn’t to make a game that you can sell, it is to make a game that is entertaining, fun and a little bit outside of the normal box.

We travelling to Gamex on Wednesday October 30th, we started the day with taking the early boat. The boat departs at 7 o’clock in the morning. As usual when I’m taking the early boat I hardly get any sleep at all, so it was very fun to be really tired all that day, not really… I didn’t want to miss the boat so that was one way of doing that I suppose. Smarter thing to do was to actually go to bed a lot earlier.

Gamex was fun however, the first day we set everything up. The next day people started coming and at first we needed to ask people to play our game, I suppose that’s a bad thing with fly or die, it doesn’t look that interesting when you are looking at the start screen, in fact it looks rather dull. We also got some feedback from when we showed the game on Tekniska museet (technical museum) in Stockholm which was that the left and right triggers would be easier to use. So in the evening I sat down and fixed just that, I also tried to make a simple AI, but I didn’t have time to do that much, so I ended up making them go almost just straight up and just crash into the ceiling instead. I also fixed the start button, because a lot of people had problems with bumping into their button to start the game.

Because it got late, I didn’t have time to fix the bug where the start button was on repeatedly, so later on Friday I fixed that bug as well. I also added the AI that somewhat works. It’s a very simple and very random AI that isn’t intelligent at all. However when something happens on the screen instead of the characters just standing still it is far more interesting than the characters just laying on the bottom of the screen doing nothing. I also fixed so that when the “AI” hits one of the start buttons it gets deactivated right away. The way the code works it is difficult to just disable it completely so it was easier just to automatically disable the button.

I almost forgot, Anders had made some new graphics for the military level and also for the start menu which I implemented. Military level I fixed on Thursday if I recall correctly and the starting screen on Friday if my memory serves. Anyway there were a lot of last minute changes during Gamex. Personally I don’t like to do these things so fast, without proper testing, however it was necessary and it worked fairly well. We had one crash on Saturday I believe it was, but other than that no major problems. I did fix more than this also, but it’s stuff that isn’t visible, it’s more for later when we want to fix the game so that you can play in a different resolution.

Gamex itself

I did have some time to walk around, I did see some interesting stuff. I tested Forza on the Xbox One, although I’m not going to get an Xbox One at release, I’m impressed with how the new force feedback on the trigger button works. It felt like the ABS on a car, except on the triggers. What I wasn’t so impressed with was the loading time, it was really slow. Took me almost longer to load the game than play one round of it.

The good thing though, is that I got some swag from Microsoft, my wife will be happy about that as she’s working with Microsoft these days and I know that she’s a Microsoft fan. She’s really impressed with the new Surface 2 products, which also was displayed in Gamex. I on the other hand is not as impressed. Windows 8 still wasn’t that intuitive, I hadn’t used it until I tried it on Gamex and the menus we accidentally stumbled upon. I think it really shows that Microsoft is trying their hardest to be different without thinking of how do we make this an easy experience for the user. If I were to make an OS I would try to think “how would I do this and make it easy for the user?”, Microsoft doesn’t seem to have that mindset. I get that they want to make the desktop OS similar to the tablet / mobile OS, so that the experience is the same. I get what they are trying to do, I just don’t get why they have made the decisions they have made. The best way I can describe it is to make a car as they are now. Then a year later you make the same car but you switch the ignition to a different spot, you change the clutch, gas and brakes around. You make the steering wheel where the gear is and you put the gear where the steering wheel is. Basically what I’m saying is that people that for the most part use windows know where stuff are, if you change too much around you confuse the users. That’s precisely what Microsoft has done with Windows 8, and users need to unlearn what they knew and re-learn how to use something. People will always adapt, that’s not the problem, but build upon what people know how to use… Anyway this was about Gamex not windows crappy 8, so I’ll end that here.

I also got to play little Warlock for the first time. I honestly can see why it won the best execution award in SGa, it’s a very well thought out game, it’s simple, yet it has layers of stuff it can add to the surface. I can’t say enough good things about it. I was very impressed with that game.

I got to look at the new Alienware computers, they look awesome, but honestly it’s difficult to tell how good they were, they were only displayed and showed the latest BF4. That said I looked at BF4, and wasn’t very impressed. Looked just like BF3. Other than that it wasn’t much really to report, I spoke to a lot of people, some we met at SGA, others I met at Gamex and showed all the games that Uppsala was showing off. I really hope the school can make a connection with the Danish company that is an event planner and can show the different games off in Denmark, but we’ll see.

There were so many impressions from Gamex that it is hard to put everything down just in a short blog post, but if I have the chance to go to Gamex next year, I’m going to go for that, and I can recommend everyone that is interested in games and gaming to go there. It was really a great experience, of course it did help to have “VIP” tickets and to be able to show our game. We had so many people coming back and say that Fly or Die was the best thing they played on Gamex, and we had several people that came back again and again. There was also a couple of people who some days almost lived in our booth which was kinda cool 🙂

Another thing, I met someone that I thought I recognized on the hotel, it was a father and his son. I saw they were going to the skybar, so I commented that the skybar was nice. The son then points and says “is it him?”. The father sighs and says, “yes, it’s one of those behind Fly or Die”. I had several memory sticks with the game on it, so of course I had to give them a copy of Fly or Die!. For me that was very special and fun, it makes you feel like you’ve accomplished something good. Although I know that we will never be rich or even earn anything on Fly or Die, it was nice that the game had such an impact on someone. It doesn’t sound all that special, but it was, at least for me.