avi reader

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post 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.
a screen cap is worth 0x100000 DWORDS
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

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

Post 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
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post 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.
a screen cap is worth 0x100000 DWORDS
Bugi

Glazer & the Buccaneers

Post 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.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

yo RT, this is something I was looking for since a loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong time ago


gr8 m8!

gotta try it now!
Image
FireCross88
Posts: 14
Joined: Wed Jul 04, 2007 4:57 am

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

Post by FireCross88 »

Magic library only works with 1.1. Please help! Deadline nearing!
lmcdowall
Posts: 1
Joined: Mon Oct 13, 2008 9:47 am
Location: Scotland
Contact:

Tutorial Link Broken

Post by lmcdowall »

The link for the tutorial posted earlier isn't working :(
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post 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
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Post Reply