Game Development Community

Breakable Glass...?

by Kevin Ostrowski · in Torque Game Engine · 03/20/2002 (12:46 pm) · 5 replies

This post is mostly out of curiosity at the moment, but has anyone made breakable glass or objects? I've seen posts about using vehicles for movable objects and whatnot but is that practical?

First off, as far as I know vehicles aren't save correctly when you save the mission and you would need to place markers that spawn or switch to the vehicle on load. Wouldn't using vehicle code for windows just be a waste of recourses, or am I just missing something?

For example, say I have a decent sized building that's a dif with a few dozen holes left for windows, then I would go in and place all of my windows in the editor, which is fine with static objects, but I'm guessing it would make it more difficult, if not impossible, to line up if I had to use markers... Maybe I'm way off here but using vehicles for windows really doesn't sound like the best solution.

#1
03/20/2002 (1:07 pm)
definetly its not a good idea... i was thinking of deriving a class from ShapeBase and make a destroyable static object... if i ever get it done ill submit it
#2
03/20/2002 (1:12 pm)
It's going to have to be done in something other than shapebase if you want semi realistic effects of glass.

Shapebase probably would work, but you could only go for 0% opacity when relating to light which probably wouldn't be too noticeable...

Best bet is to figure out something that can be created as a brush entity in a map editor then assign an opacity value and texture.

If I finish up what I'm working on soon I'll try to take a look at this. Interior rendering is one of the last few things I haven't tried to look at in the engine yet!
#3
03/20/2002 (1:13 pm)
Ok, so it's not just me :) Anyway, that would be a very useful thing to have, I can think of about 10 things right off the top of my head besides windows that it would be good for. I (and I'm sure many others) would appreciate a recourse on this.
#4
03/20/2002 (1:18 pm)
Hmmm... Well correctly rendered transparent brushes in interiors would be helpful, the hack floating around the forum works, but not all that well... So for now I'm just using a transparent static shape. That looks and works great... if only it wasn't actually static...
#5
03/20/2002 (5:02 pm)
Ill be tackling breakable window subobjects for the interior diff once ive completed doors
will also be expanding this into the mirror code ..

so far my plan is to make use of the detail levels on the subobject for different levels of breakage..
and only render them for actual detail levels when at the lowest level

I plan to also use the last two detail levels on buildings to hold 2nd to last will be on fire
last will be destroyed ..
might be chezzy but im gonna try it.