Wednesday, 18 February 2009

Moving objects

There was a bug that was funny for a moment. One of the object types is a movable or mob (moveable object). These are barrels, chests and other big objects you can push, but not pick up. Somehow all of them were moving randomly around. That was a bit hilarious and I was just chasing them for a while. Everything seemed to work well, you could push them like always, they didn't just want to stay in one place. The reason was that when the movable is on water it's floating and moving randomly, but in this case the moving routine was called every turn no matter where the objects were.

This bug could be made a spell, some kind of chaos spell that animates objects to move around and cause confusion among mundanes.

Sunday, 15 February 2009

Game object base class forming

It's getting better when I go through the functions and try to figure out them. There are two main areas where improvement is needed. First and most important one are the functions that are interacting with the game world (terrain). Second one is everything related to strings (object names). Then there are some problems with virtual functions. It's a good invention, but can cause all kinds of bad side effects when the class hierarchy is poor.

I'm actually pretty satisfied with the development I made today. There is still time left today to make more adjustments to object base class. It's important to get that working, then I can concentrate to specific game object types.