Inside3D!
     

Missing File Substitution In Engines

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming
View previous topic :: View next topic  
Author Message
Team Xlink



Joined: 25 Jun 2009
Posts: 320

PostPosted: Sun May 02, 2010 8:23 pm    Post subject: Missing File Substitution In Engines Reply with quote

Hello.

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

Thank you.
_________________
Anonymous wrote:
if it works, it works. if it doesn't, HAHAHA!
Back to top
View user's profile Send private message
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Sun May 02, 2010 9:50 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
c0burn



Joined: 05 Nov 2004
Posts: 158
Location: Liverpool, England

PostPosted: Sun May 02, 2010 10:20 pm    Post subject: Reply with quote

Sajt wrote:
Hurh?


DP doesnt crash if a model/sprite is missing and instead displays a generic placeholder (a rainbow shaded diamond, iirc)
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Mon May 03, 2010 12:13 am    Post subject: Reply with quote

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
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
mh



Joined: 12 Jan 2008
Posts: 909

PostPosted: Mon May 03, 2010 12:31 am    Post subject: Reply with quote

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 or Very Mad
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines
Back to top
View user's profile Send private message Visit poster's website
r00k



Joined: 13 Nov 2004
Posts: 483

PostPosted: Mon May 03, 2010 9:28 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Urre



Joined: 05 Nov 2004
Posts: 1073
Location: Sweden

PostPosted: Mon May 03, 2010 11:21 am    Post subject: Reply with quote

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.
_________________
Look out for Twigboy
Back to top
View user's profile Send private message Visit poster's website
Teiman



Joined: 03 Jun 2007
Posts: 309

PostPosted: Mon May 03, 2010 7:34 pm    Post subject: Reply with quote

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 Sad
Back to top
View user's profile Send private message
mk



Joined: 04 Jul 2008
Posts: 94

PostPosted: Sun May 16, 2010 5:38 pm    Post subject: Reply with quote

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.
_________________
Makaqu engine blog / website.

Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn.
Back to top
View user's profile Send private message
mh



Joined: 12 Jan 2008
Posts: 909

PostPosted: Sun May 16, 2010 6:50 pm    Post subject: Reply with quote

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.
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines
Back to top
View user's profile Send private message Visit poster's website
leileilol



Joined: 15 Oct 2004
Posts: 1321

PostPosted: Sun May 16, 2010 8:22 pm    Post subject: Reply with quote

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
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group