What are invisible walls for?

This topic is locked from further discussion.

Avatar image for deactivated-57e190e6cd327
deactivated-57e190e6cd327

231

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1 deactivated-57e190e6cd327
Member since 2015 • 231 Posts

Okay, I know that it involves keeping the player from going out of bounds, but I've noticed that there are also invisible walls where textures are. There's a texture of a building, for example, but what's keeping the player from moving through the building is the invisible wall surrounding it. With that said, why not just use the texture?

Would it have something to do with loading times, or to shorten game development time? :P

Avatar image for Lulu_Lulu
Lulu_Lulu

19564

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#2  Edited By Lulu_Lulu
Member since 2013 • 19564 Posts

@chad_devore:

Oh those.... it improves performance..... complex geometries and edges actually take up a noticeable amount of processing power especially when you factor in things like Physics. Especially Collision... I know right..... I'm just as shocked as you are.... so instead of having a building or a hill physically occupying space..... they have an 3D image of that object surrounded by invisible barriers made of simpler shapes.... its easier for the engine to detect how it collides with other objects.... hence more processing power can be spent on other things..... like those Graphics the kids are going on about these days.

Avatar image for mastermetal777
mastermetal777

3236

Forum Posts

0

Wiki Points

0

Followers

Reviews: 38

User Lists: 2

#3  Edited By mastermetal777
Member since 2009 • 3236 Posts

Essentially it's just a boundary. An actual wall would be pointless and pretty off-putting, especially if you're outdoors like in an open sandbox game. Gotta be consistent in your world design.

Avatar image for gmak2442
gmak2442

1089

Forum Posts

0

Wiki Points

0

Followers

Reviews: 7

User Lists: 0

#4 gmak2442
Member since 2015 • 1089 Posts

@chad_devore said:

Okay, I know that it involves keeping the player from going out of bounds, but I've noticed that there are also invisible walls where textures are. There's a texture of a building, for example, but what's keeping the player from moving through the building is the invisible wall surrounding it. With that said, why not just use the texture?

Would it have something to do with loading times, or to shorten game development time? :P

I don't really understand what you mean. In a 3D games, wall have texture. And wall will define if you can move there or not. Wall have size and thickness to define where the players can move or not.

Avatar image for byshop
Byshop

20504

Forum Posts

0

Wiki Points

0

Followers

Reviews: 11

User Lists: 0

#5  Edited By Byshop  Moderator
Member since 2002 • 20504 Posts

@chad_devore said:

Okay, I know that it involves keeping the player from going out of bounds, but I've noticed that there are also invisible walls where textures are. There's a texture of a building, for example, but what's keeping the player from moving through the building is the invisible wall surrounding it. With that said, why not just use the texture?

Would it have something to do with loading times, or to shorten game development time? :P

It's not the "texture" you're talking about. Textures have no substance in 3D space. Think of them like paint. That's like saying, "why stop before you reach the paint? Why not use the paint to stop people?".

What you're referring to is the polygon that the texture is painted onto. What Lulu said is essentially correct. Collision detection is a tricky thing. Look at how many games you've played where a jacket or character's hair moved through the character at some point or a body that bounces through a wall. Earlier first person shooters encased each player in what was called a "bounding box" or "bounding cube", which was practically like a 3d force field around the player to simplify collision detection calculation. Everything in programming is about figuring out ways to achieve what you are trying to do without consuming too many valuable processing resources.

-Byshop

Avatar image for foxhound_fox
foxhound_fox

98532

Forum Posts

0

Wiki Points

0

Followers

Reviews: 13

User Lists: 0

#6 foxhound_fox
Member since 2005 • 98532 Posts

It's lazy development.

Instead of actually creating geometry that makes sense to the surrounding environment, they create an artificial barrier to prevent the player from going outside the game zone.

Avatar image for xantufrog
xantufrog

17875

Forum Posts

0

Wiki Points

0

Followers

Reviews: 2

User Lists: 5

#7  Edited By xantufrog  Moderator
Member since 2013 • 17875 Posts

@foxhound_fox said:

It's lazy development.

Instead of actually creating geometry that makes sense to the surrounding environment, they create an artificial barrier to prevent the player from going outside the game zone.

That's not always true. In fact I'd say it is rarely true. It could be "lazy development" in some cases, but collision barriers have a lot of computational load, actually, and the more polygons that are collidable the worse it is. From a design perspective it's generally a bad idea to have all the polygons in a complex space be collidable, so instead simpler lower-poly collision barriers are built around things. As long as there's no reason for the gamer to interact with a certain part of the environment, it makes a lot of sense to have those features "for show only".

To go back to the OP, if you take a nice detailed building, instead of straight up converting the complex conjunction of polygons that represent that building into a collision barrier (which means having every surface on the building a collidable surface, such as edges on the window sills etc) you can just have a big invisible collidable cube hugging the boundary of the building - it's more computationally efficient and accomplishes what needs to be done. It can be beneficial in other ways, too, actually - collision detection doesn't always behave how you would like and having to many little collidable bits on a building might create a surface you get hung up on. A nice simple smooth surface is often preferable as long as it doesn't destroy immersion.

Avatar image for so_hai
so_hai

4385

Forum Posts

0

Wiki Points

0

Followers

Reviews: 89

User Lists: 0

#8 so_hai
Member since 2007 • 4385 Posts

They hold up the invisible doors.

Avatar image for deactivated-57e190e6cd327
deactivated-57e190e6cd327

231

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#9 deactivated-57e190e6cd327
Member since 2015 • 231 Posts

By the way, from what I've seen, do video game designers design the barriers and landscape as ONE, single object, or do they make each one individually and keep them as separate objects? (ground, trees, buildings, etc.)

Avatar image for xantufrog
xantufrog

17875

Forum Posts

0

Wiki Points

0

Followers

Reviews: 2

User Lists: 5

#10 xantufrog  Moderator
Member since 2013 • 17875 Posts

The answer kind of depends. If it's an object that needs to be accurately interacted with, it needs a good semblance of the object. Often you would clone the visible object to have an invisible barrier with the same geometry in that case. You might reduce its polygon count a bit after the fact. But if it's a case like the buildings or a pile of rubble where you don't want or need that precision, you might just build a cube or sphere centered over the area

Avatar image for Lulu_Lulu
Lulu_Lulu

19564

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#11 Lulu_Lulu
Member since 2013 • 19564 Posts

All right guys great work..... lets hit the showers. :)

Avatar image for Kane04
Kane04

2115

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#12 Kane04
Member since 2006 • 2115 Posts

@chad_devore said:

By the way, from what I've seen, do video game designers design the barriers and landscape as ONE, single object, or do they make each one individually and keep them as separate objects? (ground, trees, buildings, etc.)

Collision map is normally a different thing, for example, on trees you'll only have collision only on the tree trunk, now the top half with all the leafs because that would just be nuts.

Like it was said the idea here is to optimize, just think GTAIV PC, most people needed to turn off the Euphoria physics engine because it was just too heavy and it would cause severe frame rate drop.
Maybe this will shed some light: https://www.youtube.com/watch?v=NGh-Vh_NYO0

Avatar image for elheber
elheber

2895

Forum Posts

0

Wiki Points

0

Followers

Reviews: 1

User Lists: 0

#13 elheber
Member since 2005 • 2895 Posts

I'll mention one last thing that hasn't been said yet.

If collision boundaries were defined by the more complex rendered geometry, you'd also be opening the game up to tons of potential collision bugs. Places where complex shapes could trap you, snag you as you move, or even let you slip outside of the game world.

Avatar image for deactivated-5e5d7e6d61227
deactivated-5e5d7e6d61227

619

Forum Posts

0

Wiki Points

0

Followers

Reviews: 14

User Lists: 0

#14  Edited By deactivated-5e5d7e6d61227
Member since 2009 • 619 Posts

**** MIND BLOWN ****