Game Development Community

Initial unit visibility updates

by Jared Barger · in RTS Starter Kit · 11/19/2004 (1:12 pm) · 5 replies

This is kinda hard for me to explain. If a new game is created and a unit stands motionless it acts as though it's unable to see anything. By that I mean that if an enemy unit approaches it then the enemy will be able to see everything fine however the unit that hasn't moved will not be able to see the approaching enemy either on the minimap or in the main view window. I haven't been able to reproduce this 100% of the time though.

If a unit moves it will register the enemy to all the characters that should be able to see it at that moment however it will not register the unit to all of its team members.

I know this is a confusing description so hopefully this will clear things up somewhat.

img56.exs.cx/img56/9359/a259.jpg
At this point there is an enemy unit standing just slightly north of the lined up units. He's invisible though, obviously. All the lined up guys have not been moved since the creation of the game.

img68.exs.cx/img68/6340/b85.jpg
In this pic the only thing that has changed is the selected unit stepped forward. As soon as it moved the enemy popped into view. I know they're pretty small but if you look there is a guy there (the bot).

Now if I were to move that bot left on the screen when he eclipsed the point where the current units are he would go invisible again to any other units that hadn't been moved.

I've been able to make this happen both ways (ie. on the hosting machine and client machine). Buildings, although idle, always work properly in detection. I assume this is because they're added after the game session has started. I've been tinkering around a bit with things for a while now but I haven't been able to get this fixed. It's probably not a huge problem as the odds of a unit standing idle long enough for the enemy to reach your encampment is pretty slim.

#1
11/19/2004 (8:05 pm)
Jared, thanks for this report. Yes, the visibility manager has a few problems. I've identified most of 'em, and we'll hopefully get some time to re-implement the code in the vis manager. It does need some attention.
#2
11/19/2004 (9:26 pm)
@Josh: given the level of quality of code we've seen here in the last week, it may well be worth your time to simply post the known issues somewhere and see who takes a hack at it.

Sometimes it may not be the best fix, but especially if it's an issue you guys are thinking "I really don't know how to do this easily...", you never know what might pop up!
#3
11/20/2004 (5:31 pm)
Good idea Stephen, doing so now. :)
#4
12/03/2004 (3:42 pm)
@Jared: Have you had any follow up luck with this issue? And/or, have you noticed anything else unusual in the visManager? As I commented elsewhere, it's wildly crazy for us at the moment with 2 clients on a remote dedicated server.
#5
12/03/2004 (7:23 pm)
Not really....

The "team" I work with is comprised of only a few guys and it's primarily a hobby for us. That being said we're allowed to make decisions like...spending a week or so playing World of Warcraft =)

I had started looking into things but there's a lot going on with this code and I have to think that these anomylies (sp?) we're seeing aren't tied to one single thing in the code but that there's probably a few "situational" things causing problems.

Sorry I wasn't any help at all, but I haven't really spent much time poking around with this.