Advertisement

Line of Sight in 2D game

Started by March 23, 2003 02:30 PM
14 comments, last by falkone 21 years, 9 months ago
If you make it so that you can look independantly of where you move, then you can do things like walking through a corridor moving the mouse around to make sure no one is sneaking up from behind.

Another cool idea I had at the mention of 3d sound. If enemies make footstep sounds, you could maybe show an icon in the direction where the sound is coming from. Maybe a footstep icon or something. It wouldn''t show you exactly where they are or exactly what kind of enemy, but its enough to have a general idea of where they are.

Or you could simplify it. Instead of full line of sight, you could simply make only the room your in be visible. Lots of 2d games have done this before and worked fine, one example that comes to my mind is Out of this World. You only ever see one screen at a time - there is no scrolling. And I didn''t have trouble with it even though enemies did attack from offscreen.

So it could be cool either way.
Play CyberDogs. Old, but GREAT! ^_^
Advertisement
quote: Original post by PouyaCat
Play CyberDogs. Old, but GREAT! ^_^

My thoughts exactly. CyberDogs blacks out areas not within your logical line of sight, but gives you a hand up by generally not allowing enemies to attack from offscreen unless you know they''re there (say you entered a room, shot at a guy or got shot at and then backed out, the guy would keep shooting).
In a 3D game, especially a FPS*, there''s a natural, intuitive way to maintain situational awareness. running around and looking around takes on a nice smooth feel and you can keep tabs on what''s around. In a 2D game, especially an isometric game, that natural glancing is reduced. I can see this leading to a feeling of disorientation. Making the enemies really dumb is not a valid solution.

The discussion about sound is compelling. Reading these posts, I got an image of an action/infiltration game, where you peep through keyholes and listen at doors. Very neat idea. I''d like to address the sound issue, and some mild RPG elements I''ve been thinking about as well. But first, the vision issue, and line-of-sight.

I think giving the player a "cone" of vision would feel like your little guy was in the dark with a flashlight. Human field of view is well over 180º, but it gets sketchy toward the edges, and in stressful situations "tunnel-vision" is common. At the same time, your basic perception of spatial relationships and working memory will keep you aware of the static objects in the room, like desks and walls. Dynamic things like people will of course be a different story.

Here''s what I recommend. A sort of "fog of war" could be implemented. Unexplored rooms would be totally unknown, and black to the gamer. The current room would be visible, and anything within 90º of forward would be perfectly clear. Anything behind the plane of your eyes would be a little foggy, but motion can be seen in close to 270º, so I''d be inclined to throw it "rustling" animations, to simulate the experience of glancing something out of the corner of your eye. "Tunnel vision" can be included as a narrowing of the "highly vissible" field if you deem it appropriate, but I''m not going to get into serious detail.

The room that you''ve already seen, as well as other rooms that have been explored, could be clouded by the fog, and any changes will only be detected when you next see the area. Like in Warcraft when you trash a base, and then come back later and the fogged image of shattered castles is seen to be a new, bustling fortification.

Looking through a keyhole or window would narrow the field appropriately, and objects such as pillars or walls would cast "sight shadows", allowing the player or enemies to hide from view. You would feel rather like the enemies in Commandoes, but not quite as stupid.

===Now I''ll discuss sound. It''s a little off-topic, so feel free to skip the rest of the post.

i think it would be really cool if sounds could be detected by the character and reported to the player through a series of icons. If you hear music wafting in from a duct, then there would be a little graphical representation of music (maybe some dancing notes and clef signs or something) next to the vent. Footsteps in the adjacent hallway could be shown as little footprints clopping through the unknown territory. Voices could be shown as text and the text could be put over the approximate location of the sound. Opening or closing doors, barking dogs, running car engines and snoring guards could all have a place in the game. This would make sound an even more useful tool than it is in a 3D game, since true hearing could be simulated.

I was also thinking that it could be a skill that the character could develop. The type of shoe (combat boot, high heel, bare foot) making the footsteps could be graphically represented if the character could tell the difference. Itentifying voices at least as man or woman, possibly as an individual, could be good as well. Just a thought.

*Grammatically, should it be "a FPS" or "an FPS". I guess it depends on whether you pronounce "FPS" as "First-Person Shooter" or "Eff Pee Ess". Any grammar experts out there?
quote: Original post by Iron Chef Carnage
*Grammatically, should it be "a FPS" or "an FPS". I guess it depends on whether you pronounce "FPS" as "First-Person Shooter" or "Eff Pee Ess". Any grammar experts out there?


I believe that acronyms pronounced as a series of initials are always 'an', though that can produce some strange seeming situations (an TLA) In colloquial usage, I'd go with the sound, so 'an FPS' sounds better when you try saying it (though 'a first person shooter')

Back on topic, I always found it annoying when things like buildings show through the fog with full detail, and suddenly change when you get too close. I'm sure there must be a better way of distinguishing between permanent features (mountains, rivers, etc) and potentially variable phenomena (ruined buildings, city size in Civilization, etc) than simply showing them both the same way and expecting the player to remember which is which. Something as simple as replacing buildings with silhouettes rather than leaving them in full detail would be an effective reminder that they are subject to change (though you could run into problems trying to represent things like trees that way).

About the visual sound thing, there's a console game using cel-shaded animation and comic-book style visual sounds either already out or due sometime this year (it's a while since I read the (p)review)

[Edit]
Checking my archives: game is "XIII" on Game Cube and was due out sometime around now-ish when it was previewed around Christmas time
[/Edit]

[edited by - rmsgrey on March 26, 2003 1:59:57 AM]
I have thought about this before, since I am interested in realistic games, or at least games with innovative ideas.

Although I''ve never applied it, I have a nice idea for simulated 3D sound.

We''ve all seen the equalizer on sound programs, or the visualizatins on Sonique or Winamp that "move with the music". A simple example would be a ball that grows with the volume of low frequency sounds, and becomes wavy on the edges with high frequency sound. When we watch a visualization like this, we don''t hear the music, but we can catch on to the beat of the music, and when the music gets louder, we can see more deformations in the ball. Why is this important?

Basically because most people can make an association between the visual and the audio. If I were to play a song, and have two of these "audio balls", one that cooresponded to the song playing, and one with a different song, usually I can pick out the right visualization.

So a solution to this 3D sound would be this. Create a system of making sounds visual, to which the character can associate. If I were to do it, perhaps I would use the ball. I''d make it transarent, so it wouldn''t cover anything in the game. But when there was a sound, it would appear, and move with the sound. To make it more interesting, you could make different colors mean different sounds. Voices could be blue, gunshots could be red, doors could be yellow, cars green, and so on.

Players would learn to read the sounds as they hear them. So when they hear a sound of a car drive by, and they see a green dot appear behind them approximately where the car is, they know about where the car is, as we would with our ability to determine location.

If the green dot was getting bigger, and moving closer to the player, the player would know maybe the car was driving towards him. If red dots appeard sharply by the green dot, the player would know the car was firing, probably at him. If he turned arond, he''d realize this, but he woudln''t have to, because he could "read" the sound, like we could in real life.

The beauty of this is that you create a language for the character, who learns to read it quickly, plus, it can be neat to see in action when there is a lot of action in the game.

--Vic--

This topic is closed to new replies.

Advertisement