It feels like I have added a new feature to my game engine almost every night this week. These are some important features that have been added too such as halting user input and turning it back on, drawing images and animations without being linked to objects and just a few moments ago I finished adding custom cursors.
It's interesting to see how many new things have been added to the engine and hence the data structure I originally designed. Each new feature was first added to the data structure first. Doing this always seems to get me thinking about how the feature is going to be access and what it should actually store.
An example of this was the cursor. At first I just thought I would need to point to an image and that would be that. But when thinking more about it realized that the most common case would be changing the cursor to different images and some of the different images would need offsets. So I put together a dimple dictionary of cursors with each cursor storing its image pointer and offset values. Then I just have the main cursor store the pointer to the cursor definition that I want. Now I don't have to worry about cursors from the engine side, full control of the cursor is handled on the data side.
I'll try and get some video or screen shots taken to show progress very soon.
Comments
Post a Comment