Sunday, November 1, 2009

Shared vision, memory

There. I've implemented shared vision and agent memory, both of which are things that can be turned on and off (for whatever reason). I've also been slowly de-cluttering code that I haven't touched in a while. As of right now, the only two things that determine if an agent can see a tile are the following two things.
1) is there sufficient light
2) is it within whatever the agent's sight distance limit is.

I'll actually utilize LOS for vision as soon as I can design a proper ray-casting algorithm that makes sense and can be used for other stuff, such as lights and such.

I'm trying to decide on a way to standardize the color scheme of things. As it is now, some characters can be impossible to see if the level of light (which affects the darkness of the background colors) makes the background color too close to the foreground color.

The shared vision is a simple boolean matrix, as is the individual agent's vision matrix. Currently, the memory matrix is also a boolean one, which allows the agent to see the current happenings of an index, even if it's changed since it was last seen. I'll eventually change this, but it's not a worry right now. I'll also need to start keeping track of units and equipment and other agents that the selected agent can see, for use in targeting, etc.

So, this is where I am now.

No comments: