So I've been working on the Memory system diligently over the last couple of days. I'm racking up a bunch of days in a row where I stay up until 3AM working on it. Thank GOD I switched to part time at work, otherwise I would be no where near as complete as I am. Keenan excused the class from one section of the homework (the file system), and this has really made a difference. I don't think there is any way I would've finished all of it if he hadn't. It is supposedly the easiest of the four systems. Regardless, I'm going to scour the part he let us off the hook on and make sure I really understand it, because that's the point of learning, right?
Anyway, I'm mainly posting today because I had a major break through on the mem system. There are 40 different tests and for the longest time I had only been able to get 1 of them to pass. It was very frustrating because I was coding and coding and coding and nothing felt like it was making progress. Finally, last night I finished the bare necessities to get a second test to pass and slowly but surely the tests started getting checked off one by one. In some cases I even completed parts that made 3 or more tests pass at once.
For some reason or another early on in the process I had worked on overloading new and delete. I really should have waited on that and gotten the heaps and global mem systems working, but these overloads are crucial to getting a large number of the tests to pass as that is how your allocations are created. Something about how I implemented them was making the whole system crash and so I had decided to comment them out and move on. Despite this I had thought the way I implemented them was correct as I had it working on one of my previous experiments. This was validated during class as we walked through the best implementation. When I moved on to other problems, in my head I had decided I was finished with the problem. As I started cranking through the unit tests I was having a lot of trouble with a couple of info( )'s not coming through correctly. I scoured through my heap implementations and my mem implementations and my getinfo( ) implementations to try and find the answer to my problem. as soon as i realized my new[] and delete[] were commented out i had a major facepalm moment. I simply removed the comments and voila! 12 more tests passed instantly. What a great feeling. only 3 tests left. I think I'll save them for tomorrow.
On a somewhat related note I bumped into Keenan on the way to my other class and we had a mini-discussion about how this class is going. I told him I'm really enjoying it and I actually meant it when I said it to him. Don't get me wrong, this class is tough, and I've probably spent more time on homework than in any other class. But I really am learning so much. My programming confidence is skyrocketing right now. ... then again I spoke with some of my classmates today in the class I was headed to after talking with Keenan and word on the street is that Game Engines 2 is even harder than this one. Hard to believe at this point in time, but I won't be surprised either.
-Aaron
Thursday, February 9, 2012
Thursday, February 2, 2012
Math System. Done!
So I've officially finished the math system this evening with my final revisions. all 101 tests are passing, which is great news. When we first started to talk about the math system I figured it would be a bit of a breeze. I had some difficult math classes back at Marquette and this was a walk in the park comparatively. It still ended up taking me a couple of nights to work out all of the kinks. the biggest trouble I ran into was on Matrix Inverse. It's essentially a matter of plugging in the numbers that follow the equation given to us, so there wasn't a ton of thinking it through required. I mostly ran into trouble of translating the numbers correctly. I had to triple check my translation before I got it right. It was only then that I realized I was also calling the wrong determinant. As soon as I had that figured out it was smooth sailing. the unary operators was all that was left and they took a matter of minutes to crank out.
My only other concern on this project is the use of const. It was stressed in class that we should use it wherever we can and in all honesty I didn't give it a whole lot of thought. I really just wanted to pass the tests and then If I have time before the due date I'll go back through and const the heck out of my functions. they aren't completely missing, but I'm sure I can add a few more.
A more important priority will be finishing the Memory and File systems. I have a large amount of code written for both systems, but I just don't have any idea if what I'm doing is right. Having those unit tests to help me check it all out would be fantastic. I'm planning to re watch last night class this weekend for some big help on the mem system. The pictures and the concepts of what we are trying to achieve have all been clear with me for most of the class. Getting that concept coded onto the screen has been the problem. I feel like I understand it much better now that I've seen some better examples.
I'm almost considering ditching what I have (not completely, but likely a lot of it) now that we've gone over the concepts again. We'll see how I feel about that after I re-watch class with my code in front of me. I hope I can find some good time to work on all of it this weekend.
bottom line at this point: I can't wait to be done with this section.
On a related note I was excited by our discussion at the end of class last night about how to get our code pushed into a library so that we can use it all again later on with other projects. I would like to think it'll make a very nice piece of code, not only to use with my own projects but to include in my portfolio when I go to apply for jobs later on. This is all a lot of complicated stuff, and as Keenan continues to drive home we're cramming years of experience into a couple of months. Being able to show that with a little help but essentially from scratch I can code my own game engine gives me a confidence I've been searching for. I could never have applied for a gaming job with the knowledge set I had before I started DePaul, and after this class alone (assuming I make it alive through to the end, ha ha) I already feel much more prepared to baby step through any challenge. It's a great feeling, and I'm excited to complete that thought by the end of this course.
-A
My only other concern on this project is the use of const. It was stressed in class that we should use it wherever we can and in all honesty I didn't give it a whole lot of thought. I really just wanted to pass the tests and then If I have time before the due date I'll go back through and const the heck out of my functions. they aren't completely missing, but I'm sure I can add a few more.
A more important priority will be finishing the Memory and File systems. I have a large amount of code written for both systems, but I just don't have any idea if what I'm doing is right. Having those unit tests to help me check it all out would be fantastic. I'm planning to re watch last night class this weekend for some big help on the mem system. The pictures and the concepts of what we are trying to achieve have all been clear with me for most of the class. Getting that concept coded onto the screen has been the problem. I feel like I understand it much better now that I've seen some better examples.
I'm almost considering ditching what I have (not completely, but likely a lot of it) now that we've gone over the concepts again. We'll see how I feel about that after I re-watch class with my code in front of me. I hope I can find some good time to work on all of it this weekend.
bottom line at this point: I can't wait to be done with this section.
On a related note I was excited by our discussion at the end of class last night about how to get our code pushed into a library so that we can use it all again later on with other projects. I would like to think it'll make a very nice piece of code, not only to use with my own projects but to include in my portfolio when I go to apply for jobs later on. This is all a lot of complicated stuff, and as Keenan continues to drive home we're cramming years of experience into a couple of months. Being able to show that with a little help but essentially from scratch I can code my own game engine gives me a confidence I've been searching for. I could never have applied for a gaming job with the knowledge set I had before I started DePaul, and after this class alone (assuming I make it alive through to the end, ha ha) I already feel much more prepared to baby step through any challenge. It's a great feeling, and I'm excited to complete that thought by the end of this course.
-A
Subscribe to:
Comments (Atom)