Page 2 of 2

Posted: Fri Jan 09, 2004 8:24 pm
by keless
well, technically, if you were going to go for the resource thread youd do it the following way:

(this is a BIG project mind you, and in a game company would be devoted to _at least one_ hardcore programmer) write a resource manager which takes care of the loading and unloading of resources. this manager is non-blocking (as it uses a seperate thread to load resources, and this thread sleeps when waiting for the hard drive buffer). it would need to return a special type of pointer derived from a generic resource pointer type, this will make sure that the resource is already loaded before accessing it.

if the resource is NOT ready yet, it will either 1) make the caller's thread go to sleep until it is, 2) temporarily use a 'placeholder' or 'impostor' resource in its place, or 3) just not draw/play the resource. (it will do one or the other depending on whether the resource's meta data says its a critical resource or not, and if not it will use the impostor named in the meta data)

In this way, you could have a resource que for your levels, and only load whats neccesary in the first frame before actually starting the level (such as the .bsp, the impostors, and some critical models) . then in the background you could continue to load more resources (such as videos, and background music) and simply assume they'll be there when you need them. If they're not, you'll see/hear an impostor or nothing until the actual resource is loaded.

dang..doubt i'll be going that far with it...

Posted: Fri Jan 09, 2004 8:55 pm
by buhatkj
well i understand what your talking about, i can also see some very classical threaded algorithms at work in it(we wait, load stuff, or run, sounds sorta like the sleeping barber problem to me from my OS class...) and i could prolly sit down and make a nice little gantt chart of the program load and expected states during runtime, but honestly, im not gonna heh. nope, not doin it....hehe

seems like a few of you guys do this for a living, i wish that were me too ;-)

someday i hope....
-Ted

Posted: Fri Jan 09, 2004 9:30 pm
by keless
you wouldnt really have to do much state planning,

simply mark critical resources such as .BSPs, GUI textures, the player's skin, etc, as 'blocking' -- give everything else an impostor/nothing and mark it as such. Most visual items should have an imposter rather than nothing, or else they'll seem to pop in from nowhere. Either way, an alpha-interpolator should be added to these resources so they fade in.

I dont really do this for a living, though I wish I could. I've never implemented anything this fancy, though based off of games I've seen, and people in the industry that I've talked to-- its been done before, to different degrees.

More than just the initial loading que, is the ability for the game code to unload objects when not neccessary, and then load more objects in later on (what any good resource manager should do) in the same level. So, when the evil wizard pops in and steals the girl then pops out, their models can be released, and the evil dragon's model can be loaded in-- thus, only resources you're using are in memory. furthermore, games can implement seamless level loading (like Dungeon Siege) this way.

Glazer & the Buccaneers

Posted: Sun Aug 01, 2004 11:31 am
by Bugi
Saw that this morning. I've said it before....for all you want to talk about United and their international profile Geico Insurance, they really seem to do business the right way. I'm interested to see just how much Kenyon had to do with these results, so next year will be interesting.

Posted: Sun Aug 01, 2004 1:28 pm
by afecelis
yo RT, this is something I was looking for since a loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong time ago


gr8 m8!

gotta try it now!

Is there any way to play AVI in Irrlicht v1.3?

Posted: Fri Aug 03, 2007 9:53 am
by FireCross88
Magic library only works with 1.1. Please help! Deadline nearing!

Tutorial Link Broken

Posted: Mon Oct 13, 2008 9:48 am
by lmcdowall
The link for the tutorial posted earlier isn't working :(

Posted: Mon Oct 13, 2008 10:43 am
by rogerborg
Typical Scotchman, always living in the past.

While it's usually a good idea to resurrect older threads, this one is so old that you may be better starting a new one at this point