Skip to main content
GameDev.net gamedev.net
🔒 Locked

Ideas to block roads?

Started by GFV Sep 21, 2013 at 5:42 PM 15 replies 13k views
Original Post
GFV
GFV

Hello dear community!

(I hope this is the right forum)

So, we’re working on a game that uses a very detailed city map, it’s basically 1 to 1 with the real city. Of course it’s only a small district – but exactly like in reality.

The problem with this is that, to avoid people leaving this “zone”, we have to block some roads of some sort. Some games did it the simple way: putting a building at that place.

We don’t want that, because realism plays a big role here. We want to leave the city the way it is.

The problem: there’s around 30 roads to block…

Now we need some “arguments” why these roads are closed. An example: there’s a construction site in this road, and therefore it’s blocked. We could place concrete barriers like these at this place:

640px-BarreiraNewJersey.JPG

Of course also with everything else that goes with a construction site, behind the barriers.

I also often noticed walls blocking the view on a construction site, a bit like this one here:

1554-m.jpg

I’m unsure what these are called, but that would be a solution too.

I’ve thought about road accidents as well. Maybe concrete barriers again, this time with police and rescue vehicles behind and some wrecked cars. Now that I’m thinking of it… the same concept with some fire trucks behind could be a solution too, not with fire in real-time, but maybe with black buildings hinting something was on fire here.

For the idea with the accident: perhaps even a long truck (a petrol tanker for example) flipped, which takes the whole length of the road, could do the job as well.

I’ve basically tried to take ideas from other games. I’d have more ideas, like this one: the road blocked again, eventually also with police vehicles, and people demonstrating at the back. Basically hinting that this road is blocked because of a demonstration. I’m not sure how hard it would be to do this, but I don’t think anyone of us knows how to. Well, it doesn’t matter, we can always hire someone, so it’s not completely off the list.

So my question is: does anyone have more suggestions? smile.png

Thanks!

ShadowFlar3
ShadowFlar3

I think you might have too many roads to block. You could design the map better and use other than building and road blocks that will just become too unrealistic in that extent.

If you look at real cities there aren't that many roads leaving the denser city center so this is also a matter of city design. They are main roads and they are big. Perhaps they have underpass going below the railroad or highway etc. You could use water on one or two edges which almost all big cities are situated near. Or terrain level differences. Other than that if you have a basic grid pattern for your city don't be afraid to do an occasional T- or even L-junction to break lines of sight and especially to eliminate the excess roads to need blocking.

So basically if you put your city area between a highway/railroad and a sea shore with few bridges collapsed that's 2 sides easily solved. Then block couple of roads using your ideas.

GFV
GFV

Haha yes, our problem is that we have too many roads to block!

The collapsed bridges… we had this idea already because one part of the city is located next to a river. On the other side of the river starts a new district of the city which we do not want to cover because we only want to do one district, which is the city centre. We had the idea of collapsed bridges but finally some of us didn’t like the idea because a collapsed bridge kind of sends “negative vibes”, and this isn’t really a war game, it’s a racing game actually. smile.png So that’s how I got the idea of the construction site the first time, basically to make the bridge under construction. Ironically, this bridge was under construction for real (in the real city) not too long ago — leaving only space for trams. The trams in the game could block the road (they wouldn’t move from there in that case).

Finally I’m starting to wonder if it might not just be easier to place some “half-transparent” walls around city, and once you pass them, everything would turn black & white and you’d have 5 seconds or so to return, what do you think of this? Is this overdone? Does it have a bad image?

ShadowFlar3
ShadowFlar3

5 seconds @ racing speeds, how much extra map content would that mean to you per blocked road? I suspect a lot.

ray_intellect
ray_intellect

Nice graphics, did your team develop that in-house?

Ideas to block roads ...

1) car crashed into corrugated iron work hut and knocked over scaffolding holding uniform grey cement blocks. You could have fun making a mess out of the effect of a smashed block turning into a dust splat.

2) Bus tried to do a U-turn and got stuck in the road, everyone except the driver got out and walked (on the other side of the bus - the doors aren't facing the player)

3) road works

4) building exploded leaving rubble everywhere

5) police have put plastic tape up and stand guarding the road, if you fire your rocket launcher at them - you die.

6) earthquake.

7) I'm bored, get a copy of hl2 and some of the mods.

Servant of the Lord
Servant of the Lord
  1. Road dips down, but was flooded with water. Where's there's one dipped road, there's bound to be more than one, thus more than one road flooded.
  2. Raised highway collapsed, so you can't use the highway.
  3. Raised highway collapsed ontop of the road you are trying to use.
  4. Tunnel collapsed
  5. Sinkhole in non-raised highway
  6. Building fell over
  7. Traffic jam of cars
  8. Railroad crossing with the train parked on the railroad (I hit the *same* train three times in one day at three different crossings about a month ago).
  9. If it's a long train, it can block more than one road.
  10. If it's a really long train (they do reach a hundred or more cars, meaning thousands of feet long), it could block three or four.
    Conventional freight trains can average nearly 2,000 metres” - Wikipedia (2000 meters = ~6500 feet)
  11. Toll-booth blocking arm thingies are down
  12. A tree fell over
  13. The road is a dirt road, it's rained recently, and is too muddy.
  14. A garbage truck tipped over and spilled a wall of garbage. If that's not enough material to block, maybe it crashed into a cement truck that also spilt the cement.
  15. Rioters strewn park benches and grocery carts and other stuff across the road forming a barricade.

These, in addition with the other excellent suggestions mentioned above, and the knowledge that you can use a good blockade idea more than once as long as you have different art for it, ought to go a good way towards covering your thirty roads!

[Edit:] Ah, negative vibes - alot of these wouldn't work for that then.


1554-m.jpg

I’m unsure what these are called, but that would be a solution too.

I think those are just chain-link fences (or a similar type of portable wire-mesh fencing) with stuff put over them to obscure the view (maybe to prevent theft of tools just lying unoccupied?), as well as to provide a more "presentable" sight then a big dirty hole in the ground.

TheChubu
TheChubu

Some kind of "fog of war" that doesn't lets you see beyond the limit of the playable zone and a "Go back!" message if you go too far. Simple as that.

Otherwise you're going to find a bigger excuse for all the blocking or it wouldn't make any sense. Some sort of catastrophe. Killer is on the loose, plage of some sort, etc.You can't have locked a whole district for no reason.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"   My journals: dustArtemis ECS framework and 
Servant of the Lord
Servant of the Lord

Otherwise you're going to find a bigger excuse for all the blocking or it wouldn't make any sense. Some sort of catastrophe. Killer is on the loose, plage of some sort, etc.You can't have locked a whole district for no reason.

Good idea. If it's a racing game, and a sanctioned race, the police would've cordoned off the roads out of the urban racetrack with black and yellow striped concrete dividers.

If it's a 'street racing' game, maybe just have the ways out of the racetrack blocked by cheering crowds and cars that they've parked to intentionally delay the police.

ray_intellect
ray_intellect

I thought of something else,

1) comic book (batman) style alleyway dead ends.

2) parallel roads could link up to another road ( U turn links etc )

3) entrance to large scale city area ...i.e. the park, the zoo, a large train station/ monorail, sport stadium, freeway, construction area

4) City centre apartment area with members only gate

GFV
GFV

Wow some great lists here!

Thanks guys for all the ideas, definitely some useful and also funny stuff in there laugh.png

LorenzoGatti
LorenzoGatti
In a racing game, some hint that you shouldn't go that way, like a crowd of fans, police and temporary roadblocks, a TV van is a fair enough warning before fading to black and ending the race in miserable failure as soon as you enter the forbidden zone. This approach requires level data for what can be seen, but actual trespassing is rigorously prevented.
Omae Wa Mou Shindeiru
herbertsworld
herbertsworld

Out of curiosity, do you have any AI in the world? I'm just curious as to how they'll react to barricades.

GFV
GFV

Well, it isn’t exactly a racing game in the sense that you’re during pure races, it’s more open world driving around (with races too of course) but only in vehicles.

So the idea about fans and TV vans wouldn’t really work.

Yes, there is AI traffic and the solution should be simple:

— If the roads are blocked, with any of the above mentioned methods, then the AI simply won’t go there. It will act as if there was no road at all there and it won’t turn into that corner

— If we use the half-transparent barrier idea, with the 5 seconds limit, then the AI could drive there and eventually disappear after another corner

The player wouldn’t get to see that obviously because his car would be reset.

Like ShadowFlar3 said, 5 seconds is a lot at racing speeds, but I’d like to have plenty of traffic, therefore you won’t be able to drive that fast (I don’t want it to be a “Drive-300-km/h-in-the-city” sort of game), but obviously first we have to check if it’s possible at all to have the amount of traffic we wish, chances are it can’t be handled. sad.png

Then again, even if a player would cross the transparent wall at highest speed, it’s not too much of a problem for the extra map. The map is done by another company that we hired and it would only cost us a little more.

Also, we could apply both methods: blocked road plus transparent barrier. We could make it so the road blocks can be destroyed (concrete barriers, police cars, whatever) but as a result the player would heavily damage his car and eventually even flip. At the same time he would have crossed the transparent barrier, meaning he wouldn’t have come far because his flipped / crashed vehicle will be reset in 5 seconds.

herbertsworld
herbertsworld

Well, it isn’t exactly a racing game in the sense that you’re during pure races, it’s more open world driving around (with races too of course) but only in vehicles.

So the idea about fans and TV vans wouldn’t really work.

Yes, there is AI traffic and the solution should be simple:

— If the roads are blocked, with any of the above mentioned methods, then the AI simply won’t go there. It will act as if there was no road at all there and it won’t turn into that corner

— If we use the half-transparent barrier idea, with the 5 seconds limit, then the AI could drive there and eventually disappear after another corner

The player wouldn’t get to see that obviously because his car would be reset.

Like ShadowFlar3 said, 5 seconds is a lot at racing speeds, but I’d like to have plenty of traffic, therefore you won’t be able to drive that fast (I don’t want it to be a “Drive-300-km/h-in-the-city” sort of game), but obviously first we have to check if it’s possible at all to have the amount of traffic we wish, chances are it can’t be handled. sad.png

Then again, even if a player would cross the transparent wall at highest speed, it’s not too much of a problem for the extra map. The map is done by another company that we hired and it would only cost us a little more.

Also, we could apply both methods: blocked road plus transparent barrier. We could make it so the road blocks can be destroyed (concrete barriers, police cars, whatever) but as a result the player would heavily damage his car and eventually even flip. At the same time he would have crossed the transparent barrier, meaning he wouldn’t have come far because his flipped / crashed vehicle will be reset in 5 seconds.

Sounds very ambitious which is good. And I'm sure you've already got your traffic system nailed, but here's some advice on this. The amount of traffic you desire will need to be managed both on the technical and design side of things if you want to avoid problems with flow and general AI logic. Things like bottlenecks, pile ups and traffics jams can cause major problems for a racing game. You may find that there's no traffic near you but if you look somewhere in the world there's a massive pile up of cars because the flow isn't right.

Things to consider when designing a traffic system are:

1. How many cars can be on the screen?

2. What happens when you reach your AI limit?

3. What path/spline will the vehicles be using?

4. Will the AI cross lanes?

5. Will the AI make U-turns?

6. Will you use traffic lights to control the flow of traffic?

7. What happens when an AI is forced onto the other side of the road by a player?

8. What happens if the player is stationary in front of traffic? Do you spawn more, does the traffic try to avoid the player?

9. How will the AI know the general direction of travel?

10. How much spacing will there be between AI cars?

11. What happens to an AI car which isn't on the screen anymore?

This list goes on and on for open world racing/driving games but it does get easier with trial and error. You can also take a look at traffic systems in games like Driver, GTA, Need for Speed and Burnout to see how they handle it. I know in Driver games that the AI will always turn right, which creates a looping cycle of right turns. Do players see this? Do they even care? It was a simple solution to a problem that could cause massive headaches for a designer & engineer.

Another solution which could help with the traffic system is infinite ribbons. Building a road network like a freeway which loops around the city and always has the same amount of lanes is a brilliant way to keep traffic consistent and flowing.

GFV
GFV

Those are some very good questions Herbert smile.png Most of these are sadly still opened, we didn’t even start yet with the traffic.

I think one question you forgot is how many polygons car will have, currently that’s my biggest fear. I want the game to be beautiful too of course and details are important to us all smile.png

The thing about cars turning only right in Driver games — I don’t think that’s completely right. I think it was only this way in the latest Driver game, and yep I noticed it ;) Did I mind it? Not too much, but after some time, every time when you start the game, you know which car will be where, which does make it look very scripted (well, it IS scripted after all).

Also thanks for mentioning the highway loop idea. In fact we do have such a thing. Not a highway but it’s a big main street which makes a circle around the district the game is set it.


I’ll answer your questions because it also helps me visualise the whole thing for myself smile.png

1. How many cars can be on the screen?

As many as possible I hope! We also want to put lots of parked cars, something you don’t see in many games, and I feel it’s going to be problematic. I’d also like to make traffic jams if possible. (for example for certain modes, etc.)

2. What happens when you reach your AI limit?

Cars would suddenly disappear to make space for other cars? laugh.png

3. What path/spline will the vehicles be using?

Every lane would be one path, I’d also like to make extra paths for, say if you drive with a police car, so civilian cars make some space and jump onto the other path. This path would be a bit more right into right lanes and a bit more left into left lanes. But we have to see how exactly we would do this, or if someone else would do this, I have no idea about how it works right now to be honest. Maybe it’s possible to just set an off-set to the default lane path when a police car is behind the civilian car in question, in that case it wouldn’t need to make an extra path at all. Probably that’s how it works?

4. Will the AI cross lanes?

I don’t think so, it would be cool but probably too complex to make, and I would like to keep the game really simple.

5. Will the AI make U-turns?

Same as above I guess!

6. Will you use traffic lights to control the flow of traffic?

Yes of course!

7. What happens when an AI is forced onto the other side of the road by a player?

It should brake of course, to not crash into oncoming traffic!

8. What happens if the player is stationary in front of traffic? Do you spawn more, does the traffic try to avoid the player?

Well, that’s one problem I’ve been thinking of already for a while. There are several solutions. One would be that the traffic avoids the player, another one would be that traffic would stop behind the player and start to honk. The first solution is probably more complex to make, the second one poses another problem which I’ve experienced in early Driver games. Let’s say you stop at a red light, as if you were driving completely normally… the cars come and stop behind you, and suddenly start honking. Why? You aren’t doing anything wrong. So how exactly would you solve this problem? We’d have to make special “fields” near traffic lights in which civilian cars would enter and then if the light is red they wouldn’t honk, if it’s green they would. I don’t think this will work… Probably at the start we’ll just make them stop behind the player’s car without honking at all.

9. How will the AI know the general direction of travel?

They’re going to have fixed paths?

10. How much spacing will there be between AI cars?

Normal space which you should keep between two cars when driving at 50 km/h in real life, except at red lights (or if the player stops in front of the traffic), they should come closer in that case!

11. What happens to an AI car which isn't on the screen anymore?

Good question. Is it possible to make them disappear and reappear very quickly? For example if the car is behind me. I see the car. I look back to the front. Car disappears. I look at the back, car reappears again. Is there such a system? Or would it take too long and the car wouldn’t show up in the first half second or so when I look back? I need to check how we can “spare” as many polygons on the screen (and in the whole scene) as possible, actually that’s someone else’s work but I still need to check this myself.

Do you have experience with making AI traffic? None of us does actually, it’s a complete new field. We’re far from doing the traffic system now but one day we’ll have to attack it I guess wink.png

GFV
GFV

Thanks, I’ve read it and it will definitely help us in the future smile.png I appreciate for sharing!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.