pem@cadnetix.COM (Paul Meyer) (08/16/89)
[] I am looking at a Mac port, but don't hold your breath for me. I'm going to implement some general Mac curses routines, then use NetHack as a big test case, but I'm just as interested in doing UNIX game ports to run on Mac BBSes as to run on the Mac itself, so what I'm doing is a little more complicated than just running NetHack. Nethack 2.xx was ported to the Mac by a guy working at Apple who had access to some not-for-public-consumption stuff at Think (before they were Think/Symantec)--he didn't say what the stuff was but I suspect it was a curses library. You may hope that he'll do it again before I get mine ready... On a related note, I found a nice Mac port of Umoria the other day on GEnie. The author had to have done something about the curses calls--if he's on the net, maybe he'll respond in one of these groups... Paul Meyer pem@cadnetix.COM Daisy/Cadnetix Inc. (DAZIX) {uunet,boulder}!cadnetix!pem 5775 Flatirons Pkwy. GEnie P.MEYER Boulder, CO 80301 (303)444-8075x277
sdh@wind.bellcore.com (Stephen D Hawley) (08/17/89)
In article <9225@cadnetix.COM> pem@cadnetix.COM (Paul Meyer) writes: > [stuff about porting NetHack 3.0] Good luck, I hope you do well. I would like to offer a few suggestions (I too have considered doing the port): 1) Don't worry about doing a curses port --NetHack doesn't use it, it depends on termcap. 2) Don't use Think's console routines (ie, printf, etc). They are huge and slow. My main gripe with NetHack on the Mac is the speed of output. There is no reason why a 9600 baud terminal should output faster than the screen. Rewrite printf. Use sprintf if you don't want too much work, and write a quick console device that doesn't keep track of the text, and does the output quickly. Steve Hawley sdh@flash.bellcore.com "Up is where you hang your hat." --Jim Blandy, computer scientist
dbb@aicchi.UUCP (Ben Burch) (08/19/89)
In article <9225@cadnetix.COM> pem@cadnetix.COM (Paul Meyer) writes: >[] > I am looking at a Mac port, but don't hold your breath for me. > Please post it to GEnie when you do it! > > On a related note, I found a nice Mac port of Umoria the other >day on GEnie. The author had to have done something about the curses >calls--if he's on the net, maybe he'll respond in one of these >groups... > I looked at this one with ResEdit last night. It seems that it has many CODE resources that correspond with the names of the subroutines in my version of umoria. Also the Wizard mode passwords are the same as in the distribution. Use ^W to get the pw prompt. It is possible that you might get him so send you a copy of his code if you asked nice... >Paul Meyer pem@cadnetix.COM >Daisy/Cadnetix Inc. (DAZIX) {uunet,boulder}!cadnetix!pem >5775 Flatirons Pkwy. GEnie P.MEYER >Boulder, CO 80301 (303)444-8075x277 Good Luck! -Ben Burch (aicchi!dbb)
wiedmann@plover.fx.com (Christian Wiedmann) (08/19/89)
sdh@wind.bellcore.com (Stephen D Hawley) writes: >In article <9225@cadnetix.COM> pem@cadnetix.COM (Paul Meyer) writes: >> [stuff about porting NetHack 3.0] >Good luck, I hope you do well. me too >I would like to offer a few suggestions (I too have considered doing the port): >slow. My main gripe with NetHack on the Mac is the speed of output. There >is no reason why a 9600 baud terminal should output faster than the screen. I've written some output routines on the Mac (unfortunately they probably wouldn't be useful for this purpose), and I can tell you that it's hard to get any reasonable performance out of the Mac. I'd be impressed by a terminal emulator which could run at 9600 baud throughput. If you really want fast, I think you'll have to do some serious optimization. >Steve Hawley >sdh@flash.bellcore.com -Christian The opinions stated in this message are not to be construed as representing those of my employer. Christian Wiedmann ...!ames!fxgrp!wiedmann
milo@ndmath.UUCP (Greg Corson) (08/19/89)
From article <1989Aug18.210038.5272@fxgrp.fx.com>, by wiedmann@plover.fx.com (Christian Wiedmann): >>slow. My main gripe with NetHack on the Mac is the speed of output. There >>is no reason why a 9600 baud terminal should output faster than the screen. > > I've written some output routines on the Mac (unfortunately they probably > wouldn't be useful for this purpose), and I can tell you that it's hard to > get any reasonable performance out of the Mac. I'd be impressed by a terminal > emulator which could run at 9600 baud throughput. It's not terriblly difficult to get 9600 baud throughput on the Mac, particularly if you are writing something that doesn't do serial I/O. I've put together terminal programs that run at between 19200 and 9600 baud throughput with minimal or no handshaking. Those programs used some optimized font drawing routines, but you can get better performance without going quite that far. Some tips include: 1. Minimize the number of quickdraw calls, drawing one character at a time is much slower than drawing a bunch of characters with ONE call. 2. Keep an image of the characters on-screen in an array somewhere, for update event processing. 3. Don't try to do "optimized updates" like Unix "curses" does. On the Mac it's probably faster to blow up a whole new screen than to take the time to figure what characters have changed and update just them. 4. Don't clear the screen unless you have to...I believe, if you use srcCopy (I think that's it) drawing mode the new text characters will automatically overlay the old ones. For what it's worth, a port of NetHack to the Mac would probably be a lot quicker and more fun to play if better use of the mac menus were used. An obvious thing to put in menus would be the inventory, with each type of item under a different menu header. This shouldn't be too hard to do... Also, another way to speed things up might be to use a pop-up window or a seperate area of the window for some of NetHack's messages to the user. That way the screen wouldn't have to be updated quite so often. Greg Corson 19141 Summers Drive South Bend, IN 46637 (219) 277-5306 {pur-ee,rutgers,uunet}!iuvax!ndmath!milo
sdh@wind.bellcore.com (Stephen D Hawley) (08/20/89)
In article <1989Aug18.210038.5272@fxgrp.fx.com> wiedmann@plover.fx.com (Christian Wiedmann) writes: >I've written some output routines on the Mac (unfortunately they probably >wouldn't be useful for this purpose), and I can tell you that it's hard to >get any reasonable performance out of the Mac. I'd be impressed by a terminal >emulator which could run at 9600 baud throughput. >If you really want fast, I think you'll have to do some serious optimization. Not true. The bottleneck in terminal emulators on the mac is how fast it scrolls, not how fast the text can be printed (trust me, I've sweated this). NetHack should be a lot faster. I would be willing to bet that the bottleneck is in printf(). Since NetHack does almost no scrolling, this should be repairable. Steve Hawley sdh@flash.bellcore.com "Up is where you hang your hat." --Jim Blandy, computer scientist
d88-bli@nada.kth.se (Bo Lindbergh) (08/22/89)
In article <1537@ndmath.UUCP> milo@ndmath.UUCP (Greg Corson) writes: >From article <1989Aug18.210038.5272@fxgrp.fx.com>, by wiedmann@plover.fx.com (Christian Wiedmann): >>>slow. My main gripe with NetHack on the Mac is the speed of output. There >>>is no reason why a 9600 baud terminal should output faster than the screen. > >It's not terriblly difficult to get 9600 baud throughput on the Mac, >particularly if you are writing something that doesn't do serial I/O. I've >put together terminal programs that run at between 19200 and 9600 baud >throughput with minimal or no handshaking. Those programs used some >optimized font drawing routines, but you can get better performance without >going quite that far. Some tips include: > [ good suggestions deleted ] > I have a replacement console driver for MPW C which uses some of the methods discussed to implement a reasonably fast terminal that understands a subset of ANSI commands. Is there anyone out there who knows NetHack and is willing to work with me on porting NetHack to MPW C? ("replacement console driver" => just write to stdout and it does the right thing -- no source code modifications necessary!) Bo Lindbergh --