I like my apartment to be clean, functional, and generally awesome, which my living room is. My bedroom however has always been markedly un-awesome. I live in a small apartment, basically just a living room, a bathroom, and a bedroom. I most of my homework, development, web surfing on my PC laptop in my room, but it gets pretty depressing pretty quickly. There’s just never been enough room or enough light. My ugly light-absorbing brown particle board desk is always low on space, and always high on pointy parts to poke yourself with. My desk chair backs right up in to my bed, with barely enough room to push in our out. But not any more!
I decided to treat myself to some new stuff from IKEA for Christmas. I got an awesome MALM desk, with an extra pull-out part that is great for books or food when the main desk is in use for other things, like holding up my arms while I type on my laptop which the desk also holds up. I got a nice bright birch color, like those at the apple store. Totally worth the $150 or so I payed. I also got two little end tables in matching birch for next to my bed, as well as some fake plants and a desk lamp. Then I went to the apple store and picked up a nice little laptop stand for $50 bucks. Expensive, but I really like it so far. It brings the laptop up about 10 or 11 inches off the desk, allowing me to look straight forward at it rather than down at an angle. I don’t know why this helps but it really does. I rearranged my room a couple times until I found an arrangement I liked. I’m pretty happy with it now. There’s even a space on the wall opposite my bed that would be perfect for a TV. I Feel like I’ve gained a whole new room in my apartment. I’ve never spent the amount of time in my room that I have over the last two or three days. It’s great! I also have nice classical music playing on Pandora. I feel so fancy.
So, Progress on the Game…
I got up around 9 this morning and started working. I worked until about 2:30. Pretty good! I basically started from scratch. Not much of an idea where I’m going, but I’m moving forward.
I am adhering to pretty much the same style standards we use for C# at work. Basically we code in a style that allows us to easily separate out functional units of code for testing. This means that pretty much everything implements an interface and any class that has dependencies has those dependencies passed to it in its constructor. This way it’s easy to make test versions of classes that implement (really spell check, ‘impalement’?) said interfaces for unit testing. So far I’ve created the following interfaces:
Some are only shells or partially implemented. IController wraps the static GamePad stuff provided by XNA. I’m not a fan of static functions, they are basically the same as globals. IControlScheme simply maps input from an IController in to an IMovement. This way you could have different controller layouts pretty easily if you wanted. I haven’t started on the collision detection yet. It occurs to me that I’ll have to have some kind of environment class first… I’d need something to test running in to. But I’ll get to that later. Most of my time today was spent fiddling with the IMovement class.
IMovement is supposed to handle just that, movement. You tell it where the forces are on the object during this frame of game play, and it tells you where the object should end up. IMovement controls the character’s walking, running, and jumping, and I’m planning on implementing camera movement with it in the future as well. It will also maintain all figures corresponding to velocity, acceleration, momentum, etc. After screwing around with various ways of calculating acceleration and deceleration for running, slowing, and stopping, I finally realized that what I really need to do is implement some real physics. So tomorrow when I come back I’m going to look up some Newtonian equations and see what I can get working. Of course they don’t have to reflect the parameters of actual earth physics, but they should work roughly the same way. I’ll definitely be doing these in an interface as well so I can easily substitute, game physics with earth physics or mars physics or moon physics etc. Should be pretty cool.
That’s all for now. Off to sell a keyboard stand to a guy from Craigslist. Then on to my friend Anthony’s show at some bar. Should be good.