100 Experience Points
An Adventure in Indie Game Development

Day 5: 15 January 2013

8:17: I’m back, once again. Yesterday, I tackled some stuff behind the scenes. Today, I’m hoping to make some progress on cleaning up a few loose ends with my combat prototype. Today, I’ll see differences in the actual game.

8:48: So much for doing something that is immediately visible in the window. Right now, I’m adding on to my input system so that game objects can get mouse events as well, when you move over them. Like with the earlier mouse and keyboard events, this will make life easier, and the code more modular and readable long term. But for probably at least the next half hour, there won’t be any visible changes to the game. That’s frustrating, but it’s the life of a programmer. It’s like an iceberg; what you see on the surface is only a small part of everything that happens.

9:18: I wrote a freakin’ book on C#, and I’ve been programming in it since who knows when, but I haven’t tried to raise an event from outside of the class that it was defined in. (Actually, I wanted to add events to an interface.) Turns out, it doesn’t work because, well… it could cause all sorts of problems. I don’t mind that it doesn’t work. Preventing it stops a lot of people from misusing events. But why didn’t I know this?!

Somebody out there is probably thinking, Geez, if this guy doesn’t know that, then he never should have written a book about it. He must be an idiot. I’ve known that for years!

Well I guess on the bright side, it means I’ve never tried to abuse events until today. 😀

It’s one of those times where you realize you always have more to learn with a programming language. You’re never done, and no one can claim to know everything there is to know about C#. (Well… maybe Eric Lippert can.)

Guess I’ll need to find another way to do this….

Categories