Allright folks. I'm back. I'm not necessarily better then before but at least I'm posting something.
So for the most part, Smashout has consumed almost every minute of my life that is not devoted to Laura and my Family. The game has been a complete joy to work on and has helped me further understand why I came Fullsail and why I am going to WMS. While offically on the project I am the tech lead, almost 98% of my time has been spent working on gameplay code. Now for the most part, I would say this means I code all the "logic" that makes the game rules work but the truth of that matter is that it extended MUCH further then that. The real meat and potatoes of what I did was all the little things. So instead of ranting a bunch about little things and ultimately missing the friggin point, I'll bring up an example.
Little Thing # 1 - Hint Menu that comes down once a level loads
So the idea here is that this hint menu comes down right when it starts. The user should be able to click Ok button on the menu and when it slides back up, the game starts. Pretty straight forward? So first off, we take a look at the Menu Manager. This module is responsible for transitioning menus in and out. The menus in Smashout slide down from the top and slide back up when leaving. Allright so the first thing we willw ant to do is just have the Menu Manager transition to no menu. Now I could just bind the Ok button to a special function that does this but the problem there is that menu may be accessed later where Ok is not supposed to take it back, thus messing with bindings could require lots of rebinding later. Messy, so lets see what else we can do. What we could really use right now is some kind of special delegate that could be bound to the menu manager itself and called when a menu is being transitioned out. At that point, the menu manager could only have this bound when a level loads and then quickly remove after that. Pretty simple. So first off, I go and write some code to come up with a function pointer. At this point, I think "damn it would be nice if I could do both member and non-member function pointers". So I end up creating a set of delegate objects that allow the Menu Manager to have a callback function but not know if its a member or non-member. Sweet. Now I apply it and make sure it is getting called at the right spot and presto, I have a special case sorted out.
So this is one example. I'm actually thinking I'll keep posting more "Little Things" I guess the point I'm getting across is that most of my time has been spent finding ways to solve these situations with as little hacking as possible. Taking the down time to create the delegates paid off later when I found uses for them in other modules and made my life easier. So the next little thing will talk about Sliding Curtains! Stay tuned.
Posted by Naveen Nattam at 11:49 PM