Thursday, February 9, 2012

Mem: Major Break Through

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 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

Saturday, January 28, 2012

Got rolling on the memory system

I did some more serious work on the memory system last night. Not exactly the way I want to spend a Friday night (or the rest of my Saturday) but I needed that.  I took a look at some of the examples posted online and that really helped me to get rolling.  There are still a couple of problems I'm having. Mainly the problem is having is the interaction between calling a new heap within my global heap container. I haven;t even really gotten into connecting all of the pieces. I think I need to take a step back and make sure I can properly call heap without that connection first.   probably more on this later.

-A

Monday, January 23, 2012

Finally Finished with Homework 1

So I'm extremely behind but I wanted to get a post in seeing as I haven't gotten one down in a while.  I've finally finished Homework 1. I've also finally convinced my boss to let me work part time so I can spend more time on class. (thank God he agreed!)  Homework 1 was a bit of a crazy one.   We're working on creating our own game engine.  The first homework was making a Parent, Child, Sibling tree.  It's a data structure that allows us an easy way to organize the various parts of our game. It's a relief to finally have it finished.

There was one main section I found difficult. (most things weren't too hard.)  The remove function was the toughest one.  It required a little bit of recursion which everyone seems to dislike. The worst part was setting up the base case. There were 3 or 4 different branches to that one. I went in to talk to Keenan about this function because it gave me the most trouble. My main problem was that I had reversed the recursion and base case steps.  I swapped them and everything seemed to work out OK. The debugger and I got along surprisingly well.  It;s a nifty tool if you know how to use it right. I found out what section of code was causing problems rather easily with it.

Now it's on the memory system.  If I'm following the check points I should be trying to have it finished by Wednesday.  I already know this just isn't going to happen. I have no idea where to start.  I'm going to watch the first lecture on the topic and try to do some reading before I really start any coding. This coming weekend is going to have to be a big catch up weekend.  Now that I've got more time at nights I'll have to go at it during the week a little more now too.

-A

Sunday, January 8, 2012

Trouble Getting Started

So Kennan suggested that when we're getting frustrated or even when we've accomplished something to get a little post in the blog. I'm not exactly either of those, but I could use a break.

Boy is it tough to get rolling.  I've got to keep in mind that all I need right now are baby steps and before I know it I'll be crossing the finish line. The "What about Bob" clip we saw in class is really ringing true right now.

I've got my class definitions up and running so that's a start, but I still have the next two days to get something substantial to test, so maybe that's where the hold up is. I was really getting used to being able to relax and not hae any homework. 

I also got perforce working correctly (I think) which is a relief.  Now all I need to do is start fleshing out my functions.  There are so many options, I'm not really sure where to start.  I could really use that grading tester to help track my progress.   It would be nice to see a couple of things checked off the list.

That's all for now. Time to get back to work.

-A

Wednesday, January 4, 2012

The First Class and My First Post.

So I just came home from the first class of the 2012 winter quarter, Game Engine Programming.  One of our first assignments is to start this very blog, so here it goes. 

I'm a little new to blogging, but I definitely understand the benefits in this context. I'll get to put some of my thoughts out there in written word.  I think for me this will help to really break down some of the problems we are trying to solve.  I tend to find that things can often become more clear when you force yourself to articulate them in a paragraph rather then just let the data tumble around in your head.


So, how do I feel about this class? It's a good question and I have mixed feelings.

The word around the water-cooler is that it's going to be a tough one.  There is a lot of work and information to be processed in a very short amount of time.   That rang true today when Keenan (Our professor) told us that realistically, trying to make a game engine in 10 weeks is just crazy and that we'll try to cram years of experience into that short amount of time.  A daunting task indeed.

Despite this, I'm excited.  This is the type of thing I'm here for.  This is my dream. I can't wait to step up to the challenge and find out what I'm capable of. Keenan also offered a comforting notion (at least I see it this way, others may not) that it is when we are under the most pressure that we do our best learning.   I won't have time to second guess myself or to hem and haw over the stupid little things (although I probably will anyhow).  I'll simply have to learn the right methods and execute them into the wee hours.  If I can get used to doing this work will eventually start to come more naturally, as a second nature.  It'll be good practice for future jobs, to be able to endure crunch time.   Easier said than done, I'm sure.


So there it is. My first post. Many more to come.


-A