Game Development Community

dev|Pro Game Development Curriculum

Destructible Spongmonkeys

by Gerald Fishel · 04/25/2009 (9:32 pm) · 16 comments

So I finally got around to fixing up a streaming video texture for in-game props like televisions, video phones, etc. I originally just fixed up the Theora stuff in TGEA, but we didn't really want to be limited to the OGV format, since we are looking at doing some streaming from live media servers, so I put together an implementation using libavcodec, which is the LGPL/MIT licensed AV library used by FFMPEG and a number of open source and commercial multimedia applications.

I still have to work on linking it up to work correctly with the 3D audio subsystem, right now it's just streaming 2D audio along with the video.

Anyway, I was playing around with it in one of my sandboxes that I was also working on some physics stuff, and I thought this was pretty cool, so I made a video of it. Disregard the other props such as the hovering satellite dish and the deformed mountains in the background :P



Another thing I've been working on which should be in a showable state fairly soon is a .NET/Winforms/Gtk# in-game 2D/3D GUI system. I've been using Mono for a while as a scripting platform, and I was wondering if it would be possible to leverage that for GUIs, and after some research I discovered that it was. So I'm working on putting together a useful implementation for that which can be used for regular game/tool interfaces and also extending that onto 3D surfaces for interactive objects.

More to come on that soon.

#1
04/25/2009 (9:52 pm)
that song is sick.
you're sick.

but its brilliant!!
#2
04/25/2009 (9:52 pm)
So..when do we get to learn about the team and the project(s) ?
#3
04/25/2009 (10:10 pm)
Quote:
So..when do we get to learn about the team and the project(s) ?

Fairly soon, one way or another. I'm trying to get my lead artist to come out of his shell, as I want him to show off some of his brilliant work. He likes his anonymity, which I thought was odd for an artsy fartsy, but I'm working on him :P

But we're looking to get our first game out before Christmas, so we'll need to start generating some hype soon. So if I have to drag the rest of my team kicking and screaming, or just impersonate them, it will be soon.
#4
04/26/2009 (2:37 am)
cool, and you use multicore processor?, fps dont go down?
#5
04/26/2009 (4:08 am)
Quote:cool, and you use multicore processor?, fps dont go down?

The video surfaces don't really affect the FPS too much. The video streaming is all done in a low priority background thread and the textures are updated at most at the framerate of the videos which is usually between 25-30fps. If we had videos running all over the place it could be a problem, but for the most part we'll be limited to 3 or 4 visible at a time max.

Our target hardware is AMD 64x2 2.6ghz, and Geforce 8500. In this little sandbox I'm getting about 80FPS on that system. With just the terrain I get about 110, so by adding about 200 physics actors and the streaming textures, we're losing about 30fps off the top, which isn't too bad. Very few scenes (if any) will have that many physics actors in close prosimity, and we won't be using the terrain which is the big FPS hog here. Obviously we'll be using some other complex geometry, and AI, but as long as we stay above 30fps on the target system we should be fine, and I've got a lot of room left to play with.
#6
04/26/2009 (6:40 am)
@Gerald, great work and all, but is there a reason you only get 110fps with just terrain? Are you using huge textures on it?
#7
04/26/2009 (8:40 am)
Not too sure, I always get bad performance with the TGEA terrain. That type of terrain doesn't interest me much, so I never bothered to research it. That 110fps is with 1 terrain block, looking down the longest view. The stock "T3D" demo gives me about 40fps on that system, when looking down the longest view with 4 terrain blocks. I've noticed before that if I create a "New Mission", the performance is much better, but again I've never bothered looking into what the differences are. I think the new mission disables the dynamic range lighting, but that can't account for all of the difference.

Just did a test, without the terrain in that same scene I get 300FPS. If I disable the PhysX simulation I get about 400. Disabling the video textures makes no difference.
#8
04/26/2009 (8:41 am)
Nice job - I never would have thought to put things together in such a fascinating way ;).
#9
04/26/2009 (9:43 am)
dynamic range lighting
Ah, I forgot about DRL, I use it but keep the values quite low - I don't like getting blinded by the bloom. :)
#10
04/26/2009 (10:32 am)
Quote:@Gerald, great work and all, but is there a reason you only get 110fps with just terrain? Are you using huge textures on it?

ONLY 110fps. I laughed a bit when I read that. I'm lucky to hit 50fps with absolutely nothing in a TGE mission :D

Awesome work with the video textures! That would be very useful to a lot of people (IFLs are annoying and they suck). Very good work.
Btw, nice song?
#11
04/26/2009 (12:15 pm)
Really cool stuff!

PS: please, dont use that song ever again...
#12
04/26/2009 (12:32 pm)
Very interesting. Awesome work!
#13
04/26/2009 (12:51 pm)
That looks awesome, with a lot of potential uses (in-game TV, animated billboards, etc.).


Quote:I originally just fixed up the Theora stuff in TGEA
Sorry to be a bother, but is there any chance you could release this (just the basic Theora in TGEA stuff)? I know I'd personally find it very useful!
#14
04/26/2009 (5:14 pm)
Quote:
Sorry to be a bother, but is there any chance you could release this (just the basic Theora in TGEA stuff)? I know I'd personally find it very useful!

Yeah, once I get a handle on the 3D audio I'll add the audio support to the Theora player, and make a resource out of it.
#16
04/27/2009 (6:59 pm)
Dude you're crazy. That's just plain sweet.