intfiction.org

The Interactive Fiction Community Forum
It is currently Fri Oct 20, 2017 12:39 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 26 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Sat Apr 25, 2015 1:38 pm 
Offline
User avatar

Joined: Tue Jun 05, 2012 4:14 am
Posts: 26
Forgive my ignorance, but does it need to be fstat(fileno(fp), ...) on OS X too?

_________________
Retroactive Fiction


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Apr 25, 2015 4:53 pm 
Offline
User avatar

Joined: Tue Apr 20, 2010 2:48 pm
Posts: 959
Location: Greece
ahope1 wrote:
Forgive my ignorance, but does it need to be fstat(fileno(fp), ...) on OS X too?

This is a POSIX function, so I would assume yes. It should work the same way on all POSIX-compatible systems.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Apr 25, 2015 6:43 pm 
Offline
User avatar

Joined: Sun Apr 29, 2012 6:19 pm
Posts: 35
Yes, fileno(fp) should work everywhere. The thing with fp->_file probably happens to do the same thing as fileno(fp) on whichever system that compiles on, but fileno(fp) is the portable way that works everywhere. The thing with fstat(fp, ...) where you implicitly cast the pointer to an integer and the compiler grumbles because it's pretty sure that isn't what you meant but lets you get away with anyway will not result in anything good happening; your address will inevitably be way too big to be a plausibly valid fd, fstat will always fail, and your function will return whatever garbage was on the stack as if it were the file size; if the resulting program seems to work, it must be because it didn't happen to need to know the correct sizes of very many files, or something. Like maybe it's using it to size a buffer or as a bounds check or something, and the resulting number happened to be big enough that the file fit, but not so big as to run out of memory or whatever.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Apr 26, 2015 4:01 am 
Offline
User avatar

Joined: Tue Jun 05, 2012 4:14 am
Posts: 26
Ah, thanks for the explanation, zaphod and RealNC.

_________________
Retroactive Fiction


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Apr 30, 2015 3:39 pm 
Offline
User avatar

Joined: Sun Dec 23, 2007 3:24 pm
Posts: 188
I compiled wander from github with cygwin for win32 and also on Linux (64 bit), if you wish: http://ifiction.free.fr/index.php?id=wander


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat May 02, 2015 3:34 am 
Offline
User avatar

Joined: Tue Jun 05, 2012 4:14 am
Posts: 26
Thanks, favardin! I've linked to you on my blog.

_________________
Retroactive Fiction


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon May 11, 2015 12:57 pm 
Offline
User avatar

Joined: Tue Jun 05, 2012 4:14 am
Posts: 26
I just wanted to mention that I very crudely and ignorantly hacked the source code for Wander to make it compile with DJGPP for DOS: https://drive.google.com/file/d/0B3AP_x ... sp=sharing

But in the process, and because I didn't really know what I was doing -- I was just commenting stuff out, mainly! -- I broke SAVE and RESTORE. Does anyone know the proper way to do a DOS port?

Not one to let sheer ignorance stand in the way of progress, I then packaged up my broken DOS port using em-dosbox tools to create a version of Wander that was playable online: https://s3.amazonaws.com/wander1974/wander.html

I wanted to bypass em-dosbox altogether and instead do a pure-emscripten version, but I know very little about emscripten, and couldn't figure out how to create a proper text-input field, as opposed to the modal page-obscuring Javascript popup dialog box that the emscripten compiler uses by default!

If you're interested and can help with any of this, do let me know!

_________________
Retroactive Fiction


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon May 11, 2015 6:00 pm 
Offline

Joined: Tue Aug 12, 2014 7:56 pm
Posts: 1668
I've just checked out the online play version above. Out of curiosity...

Wander predated Colossa Cave, right?

...is it known whether Crowther knew of this program?

I find it curious that Wander uses compass directions, and even the shortcuts we're used to.

There seems to be a "brief" convention as well. After trying a verb, I get the response, the name of the room, and the listing of objects.

In fact, most of the conventions we associate with IF and even with IF prose are present.

It's... surprisingly modern. Feels more like 1984 than 1974. Possibly more like 1994.

Also, if this predates Adventure, how does it understand XYZZY as a verb? And calls it an old, worn-out magic word?

EDIT - It understand "examine" as a synonim for "read". Quite modern. Am I missing something?


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon May 11, 2015 6:13 pm 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 5474
From what I've seen in the blog posts, this is a 1980 version of the source.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon May 11, 2015 6:15 pm 
Offline

Joined: Tue Aug 12, 2014 7:56 pm
Posts: 1668
Hmmm, so it'd make sense for him to have been working on the games in the meantime, updating as he went along. That would explain it. Thanks. It's just that I expected a more retro experience; I expected to recognise very little of the conventions in use. So when the game even recognised XYZZY... well, I was surprised.

But yes, that makes total sense now. Cheers.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group