Re: Access specific objects from a binary file



Saluton!

On Wed, 30 Apr 2008 05:00:12 -0700 (PDT), Jeff Lait wrote:
On Apr 30, 8:33 pm, "Jürgen Lerch" <jyn...@xxxxxx> wrote:
On Tue, 29 Apr 2008 22:52:06 -0700 (PDT), Jeff Lait wrote:
Saving maps to disk during play just seems like such an unnecessary
complication.  You introduce tons of painful edge conditions: what if
you run out of hard disk space while saving?  What if someone plays
from a read-only hard drive mount?  Or has their home directory marked
read only?  Or deletes one of the files while playing?
What do you do if you run out of RAM? (HD space is nowadays
at least as plenty as RAM.)
As mentioned, modern OSes have virtual memory so running out of RAM is
not an option. Admittedly, 32bit OSes tend to have annoying 1.6gb,
2gb, or 3gb limits. But, in all honesty, if you don't have hard upper
cap of 1gb of memory free you do have problems.

Well, rogue-likes aren't only played on modern computers and
modern OSes. I'm writing this on a 64+2 MB Amiga 4000. And
virtual memory never really caught on on the 'Miggy (but then
programs there never seemed *that* bloated).

But your Gameboy and Nintendo version should have similar or
worse RAM restraints (of course here I'm only refering to your
statement above that RAM's always aplenty; I guess those two
don't come with unlimited disk space either).

Diskspace is actually more troublesome than ram. For example, you may
be running from a USB stick, or other system. I also rather

Hm ... I see, with your method, if worse comes to worse,
you can play your game with persistent levels (with non-
persistent levels there's really no need to save single
levels to disk), you just can't save. With mine you can
still play the game (and not save), but only with non-
persistent levels.

So, if the whole game fits into memory, your method is
better for persistent levels, if not, well, not.

A failure to memory allocation will cause damage at random parts of
your program, likely entailing a crash. A failure due to disk space
during your save method is a constrained problem you can deal with. A

Yes. So missing RAM is worse than missing disk space.

failure due to diskspace in your scattered map loading/saving is much
more troublesome. There is no "ignore and continue" option - you have
to successfully save the map or the game is corrupt. Failing to save

No, the game isn't corrupt. As maps in rogue-likes are
usually created randomly anyway, at worst gameplay changes
from persistent to non-persistent levels.

How does such someone save on exit?
How do you save on exit when maps are stored to disk? The problem is
the same - on exit you want your *current* level saved as well. If

Yes. So having no write acces is a problem with both methods.

your desire is to have checkpointing so you can recover from a crash,
I'd much sooner advocate checkpointing with an actual saved game
rather than trying to rebuild from the map data. This is conceptually
simpler to create, has only one code path, and removes any need to
make some special "recover" program.

I disagree. If your monolithic save file is damaged, the game
is gone, if one level file is damaged, only one level is lost.

And if a file gets deleted, well, you just create it anew.
Either you have it in ram, so recreating it straightforward, but,
likewise, there's no good reason to have it on disk. Or you recreate
it by regenerating it. In which case this becomes a trivial cheat to
destroy troublesome encounters.

Yes. So what?

Ad Astra!
JuL

--
jynwyn@xxxxxx / Reality is a crutch for those who can't
Jürgen ,,JuL'' Lerch / cope with fantasy

.



Relevant Pages

  • Re: Hvy Plastic
    ... which multiplied their disk space use. ... i have a sea sector that somehow thinks it is a gold mine. ... it's a part of the game:) ... Tue May 5 19:57 Thistle endures lawless rioting several times ...
    (rec.games.empire)
  • Re: Access specific objects from a binary file
    ... you run out of hard disk space while saving? ... What do you do if you run out of RAM? ... to successfully save the map or the game is corrupt. ...
    (rec.games.roguelike.development)
  • Re: C:Documents and SettingsAll UsersApplication Data Folder Size increase?
    ... Flight Simulator-X and it's program directory is 13GB with 41,968 files and 1,315 folders. ... That's one type of game I wouldn't install on my disk: ... Adding FS-X would double that and would add 200% of disk space usage! ...
    (borland.public.delphi.non-technical)
  • Re: not enough drive space
    ... How much more disk space do you require for the game? ... MVP - Windows Shell/User ... "Sarah" wrote in message ...
    (microsoft.public.windowsxp.general)
  • Re: Virtual Memory is too low
    ... Free disk space is valuable if you have insuffient and less or not ... the option windows has provided and provide ... The aspect of virtual memory you refer to as a machine limitation is ... Adding RAM can reduce but not eliminate pagefile ...
    (microsoft.public.windowsxp.general)

Loading