Posts Tagged ‘framework’

It’s been two and a half weeks since my last post, and I spent alot of that time recovering from a flu I caught. While that stopped me in my tracks, it also gave me time to think about what I had been working on and what I want to accomplish right now.

The main thing is that my Framework proved to be overengineered. I was trying to wrap Everything into classes that you would inherit from and use – it was ugly and I had alot of trouble coming up with a decent way to render Everything. I was trying to do too much.

Framework Restart

Instead I decided to put all of that aside and start building a Framework that would only deal with things I’ve seen before, until I have One Of Everything I’ve Already Done.

Over the last couple of days I built a few Sprite classes with varying functions: Animation, Multidirectional, and States. While I haven’t added any of the error-checking, when you use them correctly, they work as I expect them to. Although I’m using the Sprite classes in 2D right now, the transition to 3D will involve only a wrapping interface class.

I shouldn’t ever have to build another Sprite class for XNA again. Yay!

Before I move on to a reusable Tilemap class, I’m building a Sprite Builder application so that you can create sprites in a more visual way, rather than having to punch all of the numbers manually into a file. Here’s what my first version looks like:

There are some things I want to change, but as it is right now it will do everything I want it to. I’ll start adding the code so that it can actually do things rather than just LOOK like it can do things. I’ll likely post a zip/rar somewhere once I have it working and documented enough.

Once I have some tools built, I’ll get back to Ano Sekai. Look forward to it!

I’ve been plugging at back-end code a bit, every other day, for the last little while. I haven’t managed to get rid of this cold/flu virus so it makes it hard to do anything for a decent amount of time.

Right now I’ve taken another step back and I’m rebuilding my rebuild. I could post screens of Yet Another Tilemap And Sprite Demo but you don’t really want to see that. I was pretty much hacking everything together as quickly as possible before, with no regard to future use of the code. I quickly coded myself into a corner and then I horribly broke my code when I tried to expand on it.

Now I’m building the game as 2 projects: A game Framework that supports all of the things I need for it to, and The Game Itself which uses the Framework and helps me to build it. The framework automates common tasks like entity-blockmap collisions, and only requires you to extend them by supplying them with custom data and AI/gamepad processing.

Like many things, the Road To Better Coding is filled with many obstacles, and making mistakes is really the only way I know how to code better. I’m also a stubborn mule, refusing to encumber myself with complicated patterns and practices I think I have no use for. I’ll get there. Just you wait.