Forum

Missing File Substitution In Engines

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Missing File Substitution In Engines

Postby Team Xlink » Sun May 02, 2010 8:23 pm

Hello.

Are there any engines other then DarkPlaces that support this feature?

Thank you.
Team Xlink
 
Posts: 368
Joined: Thu Jun 25, 2009 4:45 am
Location: Michigan

Postby Sajt » Sun May 02, 2010 9:50 pm

Hurh?
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby c0burn » Sun May 02, 2010 10:20 pm

Sajt wrote:Hurh?


DP doesnt crash if a model/sprite is missing and instead displays a generic placeholder (a rainbow shaded diamond, iirc)
c0burn
 
Posts: 208
Joined: Fri Nov 05, 2004 12:48 pm
Location: Liverpool, England

Postby Spike » Mon May 03, 2010 12:13 am

other engines just show nothing in that case.
its only worldmodels/maps missing that causes a crash. nothing else needs to be on disk. just needs to be precached
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby mh » Mon May 03, 2010 12:31 am

In general I would say it's better to fail as noisily as possible in such a case. Thinking about how this could happen, the reason is normally either (1) the user has installed the engine incorrectly, or (2) the user has installed the mod incorrectly ((3) the mod or engine itself is broken is also a possibility, but we'll discount that one). A noisy failure indicates that something is WRONG and needs to be put right.

By all means graceful failure is a viable option for non-critical stuff, but when it comes to something as basic as missing content I think it's better to yell "hey! something wrong here! fix me please!" at the user. That way we get the user with a correct setup as soon as possible and avoid all manner of headaches later on.

Hypothetical situation: say we have version 1 and version 2 of a mod. They're broadly compatible but version 2 has some additional content and an updated progs.dat to reflect it. The user somehow contrives to be running the version 2 progs.dat against version 1 content (say by getting confused and copying, pasting and renaming PAK files all over the place).

I'd say it's better to crash to the console with an error than to let the user contine running (and possibly crash the full engine later on). That way you're telling the user that they have stuff set up wrong, they can get it set up right, and they can learn how to set things up right so that it doesn't happen again.

Where this falls down is that users generally don't read error messages, of course. :evil:
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby r00k » Mon May 03, 2010 9:28 am

A dump of formatted output of text like:
WARNING: missing required precache content phaser.mdl

Plus, raw data could be embeded to be used instead.

Even so, if you provide a large error message then first time users get frustrated and just delete the installation and move on. A worthwhile approach would be to auto-download the content or autoload the default browser and point to the download page.
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Postby Urre » Mon May 03, 2010 11:21 am

DarkPlaces has this feature, as mentioned, and it was essential for modelview to work, for example. It's incredibly useful. The colorful diamond you get instead of the model you wanted is noisy enough.
I was once a Quake modder
User avatar
Urre
 
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon

Postby Teiman » Mon May 03, 2010 7:34 pm

All the Telejano versions with filename "mini" are supposed to support this feature.

Mini started as a fork of Telejano, to support this feature, but was soo "succesfull" that becomed the main fork. Soo all latest Telejano versions are named "mini.exe".

But I never completed the feature. Some stuff like conchars is not builtin :(
Teiman
 
Posts: 309
Joined: Sun Jun 03, 2007 9:39 am

Postby mankrip » Sun May 16, 2010 5:38 pm

mh wrote:In general I would say it's better to fail as noisily as possible in such a case. (...)

(...) That way we get the user with a correct setup as soon as possible and avoid all manner of headaches later on.

However, that depends on what is the correct setup.

Fightoon, for example, doesn't use any content from normal Quake, and the number of files actually used by Fightoon doesn't come even close to the amount of files required by normal Quake.

Requiring the loading of unused files from the disk forces any TC developer to shoehorn a lot of placeholder files all over their content tree, making it harder to keep things organized.

mh wrote:Hypothetical situation: say we have version 1 and version 2 of a mod. They're broadly compatible but version 2 has some additional content and an updated progs.dat to reflect it. The user somehow contrives to be running the version 2 progs.dat against version 1 content (say by getting confused and copying, pasting and renaming PAK files all over the place).

I'd say it's better to crash to the console with an error than to let the user contine running

Crashing to the console on lack of content required by the progs.dat is fine, and most Quake engines already does this, but the point of not crashing, at least for me, is to remove the hard-coded requirement of loading engine-specific content from external files.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Postby mh » Sun May 16, 2010 6:50 pm

mk wrote:the point of not crashing, at least for me, is to remove the hard-coded requirement of loading engine-specific content from external files.

Yeah, that's a good point. I generally don't do the "engine-specific content in external files thing" but there are a few that require it and don't have graceful failure cases.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby leileilol » Sun May 16, 2010 8:22 pm

I do find it useful for making from-scratch productions. If I can't do that, I tend to make null files appropriate for the formats, then copy them all over the used file tree to get around the errors.

It's better than abusing shareware Quake files like the PSP Quake game making scene does, kids from the train of 'if you can get it for free you can do anything you want with it' thought. This affects Duke3D as well
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest