Monday, May 31, 2004

Creator of Worlds!

I did it! The last few days at work here I'd been trying to have my trap objects and moth objects coincide with each other on the same plane of existence. I'd become very frustrated when my program either didn't run or everything did what it was supposed to do but with blobbing. Blobbing being the moths leaving a trail behind them. They should be just a dot on the grid flying around, however they felt the need to leave a line behind them everywhere they flew.

I have, however, managed to have my traps and moths coexist together happily. They'd done it before, but the traps were simply values on a lower-layer grid. The moths read the values on the lower layer grid, while flying about. Any grid position with a value 0 was seen as the ground. Any value of 1 was seen as a trap, and the moth promptly committed suicide. The Observer layer drew any spot of value 1 as a yellow square, for human viewing purposes. Now there are no more values. We have trap objects.

The benefit of trap objects: They can count the number of moths that have become 'trapped' inside them. Trap objects can relay their position on the grid and any other piece of relevant information that may later be thought of. This makes me quite happy, and less frustrations now.

I lied a little, though. At the moment, the trap objects only work as a thing that's in the way. They don't trap moths yet, the moths just don't run into the same square as a trap. But I am a creator of worlds and I can have them do what I want.

-Destroyer of worlds, too

Followers