Picky Electric


Today I implemented the object pick system. GL has this thing where you can basically define an area of the screen, draw all your objects, and figure out which objects were drawn to that area of the screen. This way, you can tell exactly (with pixel accuracy) which object was clicked on!

@p This is a great system, eliminates a lot of ugly math. Anyhow, I have for a time had sort of this issue with the picking system, in that, how can you tell whether to interact with an object or not? Further, now that there are NPCs, it looks silly when the NPC is walking around and you are supposedly talking to them, so at the least I'd want to make them stop.

@p (Possible) solution! When you click an object, it will try to plot a path to the object, or maybe, to a spot next to that object, and walk you there. Once you arrive, the object interaction window will pop up. This, or when you click an object it just does a calculation if you COULD walk to an adjacent square, plus a distance calculation, or rather, figure out if you are within say 3 steps of it (using pathfinding) and then base your actions on that. Probably #2 solution is better.

@p Solution! This is for NPCs. Why not have them walk over to you, and then the conversation starts? I like this. If you are close enough to them, they would just turn to face you, but if they are far away, they will walk over to where you are standing and when they get close enough, engage you in conversation. This could have a really nice, organic feel to it, like you touch an NPC to get them to walk over and talk to you. Very tactile.

2007-09-23


◀ Back