Revisit 6 - Bridges

Web log of development issues.

Revisit 6 - Bridges

Postby adamsderk » Thu Jun 11, 2009 6:36 pm

Greetings,

Today is about bridges.

Thanks to Hana, I had a couple bridges to play with to continue roads over the rivers. The idea is to have a single bridge that I shrink to fit shorter spans (as opposed to stretching a model which messes up collisions). I have determined the longest bridge to be 180 meters long (possible the game will make it longer, but extremely rare). The game will then shrink it down to fit the river width. The length and height are scaled equally, but the width stays constant as the roads are a constant width.

The first image is just a picture of how the bridge meshes with the terrain. Then, I had a terrain that ended up with a sliver of a bridge next to a mountain, and it worked :)

Image

Now, the bridge is a type of building and I haven't figured out the specifics of buildings, but it is next on the list.

Also, I made a breakthrough and was able to make a building without a collision mesh (so you can walk through it), surrounded by a trigger area, to know when someone entered or left the building, and a physical zone that cuts the speed in half while the player is in the building. Yea :D Now I still need to figure out how to make the "explosion" while moving and how to display the damage to the building. And then to see what kind of processing hit having all those triggers of multiple buildings will cause.

Till next time...
Image
adamsderk
Site Admin
 
Posts: 1404
Joined: Tue Apr 19, 2005 11:52 pm
Location: Western Washington

Postby Hana Yuriko » Thu Jun 11, 2009 10:40 pm

It looks like the transparency map didn't work when imported into torque. Or something? Glad the bridges work out. Have to make some proper ones later on for you to utilize.

As for how to do damage to bridges, it's just like buildings IIRC. Each bridge has a specific CF that indicates hardness and the amount of damage the structure can take before it's crushed/destroyed.
Hana Yuriko
 
Posts: 274
Joined: Sat Apr 23, 2005 4:18 am

Postby adamsderk » Thu Jun 11, 2009 11:30 pm

Hana,

Yep, I forgot to comment on that. Apparently Photoshop 7, 8, and 9 (I have 9) changed how they saved png files. They no longer include an alpha map. Therefore, Torque can't read the transparency information. So, I have to use something else (like gimp) to make them correctly.

I don't have a problem computing how to do damage to buildings (the rules are pretty clear), rather how to display the damage so it looks realistic. I'm not sure I can do sectional damage, like damaging a corner of the building and leaving the rest of it intact.

I think it might just be an all or nothing with the whole building showing damage no matter where it was actually hit.

Thanks.
Image
adamsderk
Site Admin
 
Posts: 1404
Joined: Tue Apr 19, 2005 11:52 pm
Location: Western Washington

Postby Hana Yuriko » Fri Jun 12, 2009 12:20 am

The only solution I can think of is to have buildings with different sections. Each face of a building having 2 "walls" next to each other. It could be a way to simulate corner damage or take down an entire face.

Or you could up that so that a building could have 3 walls per face. More precise damage model showing damage to a single wall or to a corner structure.

Image

It all depends on how much damage detail you want. You could even stack them to make floors for taller buildings.
Hana Yuriko
 
Posts: 274
Joined: Sat Apr 23, 2005 4:18 am

Postby adamsderk » Fri Jun 12, 2009 1:08 am

Hana,

You mind sending me a model like the one you showed? Maybe I can hide parts of the model based on damage. How about having slightly thinner bands on the edges that overlap so they can have a "damaged section" that will only show when I hide one of the good parts (don't know if I explained that very well).

Thanks.
Image
adamsderk
Site Admin
 
Posts: 1404
Joined: Tue Apr 19, 2005 11:52 pm
Location: Western Washington

Postby Hana Yuriko » Fri Jun 12, 2009 6:24 am

Not quite sure what you mean. Maybe if you diagrammed your idea on the image I posted.
Hana Yuriko
 
Posts: 274
Joined: Sat Apr 23, 2005 4:18 am

Postby adamsderk » Fri Jun 12, 2009 1:32 pm

Hana,

The idea is that each wall section has tabs all along the edges that overlap with other sections. The tab would be damage textured. The wide sections would be undamaged textured. When the sections are all visible and lined up, all the tabs would be hidden. When I hide a section, the edges of the remaining sections will be exposed giving the damaged transition.

Image

Thanks.
Image
adamsderk
Site Admin
 
Posts: 1404
Joined: Tue Apr 19, 2005 11:52 pm
Location: Western Washington

Postby Hana Yuriko » Sat Jun 13, 2009 5:06 am

I think I can do something like that. No time right now though. I'm afraid.
Hana Yuriko
 
Posts: 274
Joined: Sat Apr 23, 2005 4:18 am

Postby fennec » Sat Jun 13, 2009 6:17 am

That seems a little complicated. Why not have a building with an intact and damaged mesh for each wall, and then one mesh for the dead/collapsed building.

Each wall (or arbitrary section on a more complex building) has it's own health that is a fraction of the total. When a section loses all it's health, it switches to it's damage model, and it's associated collision shape becomes un-collidable. Or if you're more ambitious, have a separate collision shape for each of the intact and damaged model (though this brings up the issue of destroyed locations absorbing hits).

When the total health remaining for the whole building is less than half of it's original, the entire building collapses and switches to only the dead model. Some locations might have greater weight when determining when the building should collapse.

But even that's kinda complex.

Image
fennec
 
Posts: 31
Joined: Sun Jan 28, 2007 9:57 pm

Postby adamsderk » Sat Jun 13, 2009 1:29 pm

Hana,

No worries. I can make something very crude in the meantime. Could you make it as a 18 unit square that is 6 units high? That will be a one level building that takes up approximately a quarter of a hex (but make the texture a two story building). And I like the idea of stacking for more levels, and moving between the levels :)

fennec,

Tracking four walls or four walls and four corner are of little difference. The idea is to get as much realism for the smallest computing cost. The rest of your description is what I plan on doing.

In game engines, things are collidable (collision boxes), or they're not. I am trying to make a hybrid which is collidable for certain things (weapons fire) and not others (player units). In my current game, a Mech would bounce against a building until it was destroyed. This time, I want to have the Mech crash into a wall and slowly move through the building destroying it (or partly destroying it and using it for cover).

Thanks.
Image
adamsderk
Site Admin
 
Posts: 1404
Joined: Tue Apr 19, 2005 11:52 pm
Location: Western Washington

Postby Ben » Sun Jun 14, 2009 4:15 am

Isn't that more an issue of just having multiple collision meshes per building, though? That way the mech bumps against one particular wall until it comes down, and then keeps wading it's way in, destroying as it goes.
Ben
 
Posts: 169
Joined: Sat Apr 23, 2005 10:42 pm
Location: New Zealand

Postby adamsderk » Sun Jun 14, 2009 1:40 pm

Ben,

Not when you only have 9 collision boxes per model (Torque issue). And it won't allow movement through the collision box. Most of the time there is more than one effect that I'm trying to accomplish, but I only talk about one to keep it simple. In this case, I also want infantry to be able to "enter" a building and be able to move up and down levels. This will allow infantry to "control" a building which is one of the mission types in the rule books.

Thanks.
Image
adamsderk
Site Admin
 
Posts: 1404
Joined: Tue Apr 19, 2005 11:52 pm
Location: Western Washington

Postby Ben » Sun Jun 14, 2009 11:48 pm

I'm pretty sure the later releases of TGE removed the 9 collision box limit. However, I will have to ponder on the infantry entry issue.
Ben
 
Posts: 169
Joined: Sat Apr 23, 2005 10:42 pm
Location: New Zealand

Postby adamsderk » Mon Jun 15, 2009 3:44 am

Ben,

They have, but they have also removed the "limit" of mac and unix platforms. :lol: The new versions of Torque are windows only.

Go through the Total Warfare section on buildings. I'm trying to get as much of that as possible and some of Tactical Operations.

Thanks.
Image
adamsderk
Site Admin
 
Posts: 1404
Joined: Tue Apr 19, 2005 11:52 pm
Location: Western Washington

Postby Ben » Mon Jun 15, 2009 6:45 am

Hey, sorry I meant later revisions of the original TGE, I think that limit was removed in version 1.4, though not all of the torque exporters were updated to export more then 9 collision meshes per object.

One other thing I came across was Soldiers: Heroes of WWII. This is a predecessor of the game movies about the buildings that you linked to before. It was released several years back, so is of similar age to Torque. That link is a full download (legitimate, it's from the publishers website), and there is an editor available. I can't take a look at it, because I don't have an Intel Mac to run Windows on yet. That game has destructible buildings that infantry can enter and vehicles can destroy. I thought taking a peak at how their buildings were made in the editor (how many pieces, what kind of attachment nodes, etc...) might give some ideas on how to try and implement it in Torque.

I'll also reread the building sections in Total Warfare and TacOps though :)
Ben
 
Posts: 169
Joined: Sat Apr 23, 2005 10:42 pm
Location: New Zealand

Next

Return to Development Blog

Who is online

Users browsing this forum: No registered users and 2 guests

cron