[gameprogrammer] Re: Embedded file monitoring system?

On Thu, 2005-04-28 at 10:45 +0100, Trollfiddler wrote:
> Unless you use java. Cross platform IO works fine on various versions of 
> Windows and Unix. Probably no use to you at this stage, but if it really HAS 
> to be cross platform then it's worth mentioning in case you hit a dead end.

Unfortunately I'm coding it using C++, so Java's I/O capabilities won't be of 
much help this time :(

Anyway, I've just found a C++ library that seems portable enough (works
on all POSIX compliant platforms and Windows), and that lets you check
files' last modification time as I needed. It's one of the Boost.org set
of libraries, called Boost Filesystem Library.

Has anybody here used it before?

And, answering Scott here, when I've coded this monitoring system I will
release under the LGPL, so anybody can use it :) And as you suggested,
if I manage to code that on-the-fly-assets-reloading system, I will
upload a tutorial to the wiki :)

Bye

> ----- Original Message ----- 
> From: "Scott Harper" <lareon@xxxxxxxxxxx>
> To: <gameprogrammer@xxxxxxxxxxxxx>
> Sent: Thursday, April 28, 2005 3:43 AM
> Subject: [gameprogrammer] Re: Embedded file monitoring system?
> 
> 
> > Good luck on the cross-platform-ness in this regard.  I don't know TOO
> > much about programming on a per-system level, but from what I've
> > learned, dealing with the filesystems is almost COMPLETELY different
> > from platform to platform.  You would literally have to write calls
> > using completely different code on each platform to do the different
> > things.
> >
> > Although, now that I think of it, I suppose it wouldn't be unreasonable
> > to implement this way, just a whole bunch of #ifdef's in your code, I
> > imagine.  Careful coding would be requisite in this case, though, to
> > ensure that each platform's code was isolated appropriately.
> >
> > If you do it that way, you should go to the wiki and upload a tutorial!
> >
> > --Scott
> >
> > On 27 Apr, 2005, at 7:37 PM, Swalrus wrote:
> >
> >> On Wed, 2005-04-27 at 13:03 +0000, John-Philip Johansson wrote:
> >>> While I was reading "The Guerrilla Guide to Game Code"
> >>> (http://www.gamasu=
> >> tra.com/features/20050414/rouwe_01.shtml), which is a great article
> >> btw, I =
> >> came across this at the end; under References:
> >>> [Butcher]: Halo 2 =96 Chris Butcher =96 Speech at game|tech 2004
> >>> ( http://www.game-tech.com/Talks/Butcher.doc )
> >>
> >> Reading that document (a great reading, BTW), a Halo2 feature Butcher
> >> talks about just caught my attention. He talks of an embedded file
> >> monitoring system that reloads game assets when the related files are
> >> modified on the HD. For example, if a texture image is modified, it's
> >> automatically reloaded in the game, immediately showing 3D models with
> >> the new texture. And the same goes for all kinds of objects (geometry,
> >> collisions data, sounds, etc)
> >>
> >> This kind of thing would be REALLY helpful in a small game I'm
> >> developing, and so I wonder how could I implement this feature.=20
> >>
> >> I suppose I would have to manually poll each and every file I want to
> >> monitor every few seconds, to see if they've been modified, but... do
> >> you know if there's a better way to do it?
> >>
> >> I've been googling for a library I could use to do this kind of stuff,
> >> but the only ones I've found where non-portable (I need it to be
> >> cross-platform), and relied on a client-server architecture (see SGI's
> >> FAM for example).
> >>
> >> Do you know of any library that could be used for this? Or will I have
> >> to code this feature from scratch?
> >>
> >> Thank you!
> >>
> >>
> >>
> >>
> >> ---------------------
> >> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
> >>
> >>
> >
> >
> >
> > ---------------------
> > To unsubscribe go to http://gameprogrammer.com/mailinglist.html
> >
> >
> > 
> 
> 
> ---------------------
> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
> 
> 



---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: