NetHack: Legacy For Mac

Posted on  by 



NetHack: Legacy is a remastered version of the original NetHack: the famously rich and complex fantasy D&D roguelike.NetHack set the standard for hardcore roguelikes featuring procedurally generated levels, perma-death, and strategic gameplay. One of the key features NetHack offers is its deeply immersive environment to interact with and explore, a feat that has been constantly. I'm trying to get Curses Interface to work using Mac Terminal and doing the SSH through nethack@alt.org, but I can't get the windows to size correctly in full screen. I've played around with columns and rows in the config file, but it doesn't seem to make a difference.

Below is the full text to src/allmain.c from NetHack 3.4.3. To link to a particular line, write [[allmain.c#line123]], for example.

  • 2moveloop
    • 2.2Main loop

Top of file

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

moveloop

Initialization

The luck adjustments are simply to set initial luck using change_luck. Actual base luck is defined in nh_timeout.

initrack initialises the tracking system by which pets (and certain monsters such as leprechauns can follow the player.

decl_init, monst_init, monstr_init, and objects_init are all empty routines used to force the appropriate definitions to compile and be available to the rest of the program.

add_debug_extended_commands enables the wizard mode extended commands.

encumber_msg recalculates the player's encumbrance and displays an appropriate message if it has changed.

Main loop

get_nh_event and do_positionbar are routines related to the current interface. get_nh_event invokes any system processing related to window updating and do_positionbar generates information related to a horizontal positoning bar that may be present in the window system.

flags.move is set whenever the player has performed an action that requires actual game time (moving, fighting, dropping and picking up objects, etc.).

Any action that takes time requires NORMAL_SPEEDmovement points.

Now that the player has moved, give all monsters at least one chance to move using movemon. If the player does not have sufficient movement points to move any more this turn keep moving monsters; otherwise give monsters only one chance at a move.

Once-per-turn events

Nothing more can move this turn; therefore prepare to move to the next turn.

mcalcdistress is responsible for updates of change-of-turn monster data.

This grants movement points to monsters for the coming turn. mcalcmove determines how many points the monster will get.

This important segment is responsible for all random monster generation. The flag u.uevent.demigod is set after killing the Wizard of Yendor for the first time or on performing the invocation ritual; therefore after these events a monster is generated randomly on the level with a 1/25 chance each turn; otherwise there is a 1/50 chance if you are below the Castle and 1/70 chance if you are not.

If you are mounted, your movement point allocation is that of your steed.

This segment calculates your movement rate for the turn. It is first set to the normal movement rate of your current form (which of course changes if you are polymorphed). If you are fast, you have a 2/3 chance of earning an extra NORMAL_SPEED / 2 movement points; if you are very fast you are guaranteed at least NORMAL_SPEED / 2 points with a 1/3 chance of another NORMAL_SPEED / 2. (Note that NORMAL_SPEED does not vary if you are polymorphed, so the speed intrinsic is more effective if you are in a very slow form and less effective if you are in a very fast form.) Finally, your speed is adjusted for encumbrance and added to your current movement point total.

settrack updates your position in the tracking system.

Finally, the turn counter is incremented; we are now on a new turn.

clear_bypasses clears a flag related to whether an object should be hit by a wand zapped at it (amongst other events).

glibr is the code relating to slippery fingers.

nh_timeout handles all timeouts related to time-delayed functions such as extrinsics from potions, stoning, sliming, etc.

run_regions handles timeouts for area effects, currently only used for stinking clouds.

Decrements the prayer timeout.

Indicates that the status line needs to be updated if the turn counter is shown in the bottom line.

u.uinvulnerable is set whenever you are being protected by your deity while praying; during this time you are not considered to be encumbered.

If you are polymorphed into a sea monster and are out of water, you lose one hit point per turn down to a minimum of one.

If you are killed in a polymorphed form, attempt to return the player to their normal form.

If you are in a polymorphed form and are either regenerating or on a twentieth move, regain a hitpoint.

If you are not polymorphed, regenerate hitpoints. Every third turn if you are level 10 or above, gain an amount of hitpoints equal to a random value up to your current constitution if it is 13 or above, or 1 if your current constitution is below 13. Otherwise gain one hitpoint if you are regenerating, or you are level 9 or less and a certain number of turns related to your current level has passed. This requires that you are not stressed or worse if you are not regenerating.

If you are strained or overtaxed, lose hit points from trying to move around; this is every thirty turns if you are strained and every ten if you are overtaxed.

Regenerate power if you are not stressed or worse on every (38 - current level) * 4 moves if you are not a wizard or * 3 if you are, or have the energy regeneration extrinsic from the Eye of the Aethiopica; you gain from 1 to 1/15th the sum of your current intelligence and wisdom totals.

This implements teleportitis, if you are not protected while praying; if they have the intrinsic, teleport the player on a 1/85th chance each turn.

Polymorphing is delayed while wearing an amulet of unchanging; if such a polymorph is no longer valid cancel it.

If you have the polymorphing intrinsic (from a ring of polymorph), attempt to polymorph on a 1/100 chance each turn.

If you are a lycanthrope, attempt to change on a 1/80 chance (or 1/60 if it is night) per turn.

Enact the above polymorphs if you are not wearing an amulet of unchanging; otherwise delay it (as above).

If you have the searching intrinsic, perform the search.

dosounds generates the sounds resulting from dungeon features.

do_storms generates storm effects for the Plane of Air.

gethungry handles normal nutrition depletion and effects.

age_spells handles spell timeouts.

exerchk checks if attributes have been exercised enough for a change to occur.

invault handles vaultguard checks.

amulet handles turn-to-turn events related to holding the Amulet of Yendor.

This attempts to scuff engravings at your location on a random chance that decreases with dexterity.

If you have killed the Wizard of Yendor or performed the invocation ritual, intervene is called every 50-249 turns; this is responsible for the Wizard's interventions and resurrections.

restore_attrib restores temporary changes of attributes.

movebubbles handles bubble movements on the Plane of Water.

under_water handles display routines related to being under water.

under_ground handles display routines related to being buried (a deferred feature).

If you are immobile, decrement the turn counter for being immobile and handle any effects meant to occur once the timeout for this reaches zero.

Once-per-action events

Once-per-input events

find_ac calculates and updates the player's armor class.

see_monsters, see_traps, and traps determine which glyphs to display for those features.

vision_recalc calculates which squares are visible to the player.

If the status line needs to be updated, update it with bot.

Assume that the next player action will require time; if it does not flags.move will be reset at that time.

multi is greater than zero if a player has entered in a repeated command or some other interruptible action; occupation is set to whatever function represents this action if this is the case.

If a key has been pressed either when no action is in process or in the middle of an interruptible action, check if that key is ABORT (^A by default); if so, interrupt any current action if possible and if not add the key to the key queue with pushch. Actions will also be interrupted if the player senses a monster (checked with monster_nearby).

On some platforms, update the map on a regular basis.

If it is a fifteenth turn and you are clairvoyant and not in the endgame, on a one half chance generate the clairvoyance map with do_vicinity_map.

After each player action, when you are in a lava trap, sink into the lava some more. After 11 to 14 actions, kill the player. Note: u.utrap is set at trap.c#line3991.

sanity_check performs some debugging checks if a wizard mode player has them enabled.

cliparound is a window system routine meant to ensure the player is centred in the screen (to the extent that is possible with the windowing system).

Assume that the player has not entered in a movement command until they actually do so.

Repeated command code, also used for interruptible actions. If nothing interrupts the action (checked with lookaround) perform the stored move or command with rhack. Rhack essentially reads the keyboard input and kicks off player actions.

If there are no repeated commands or interruptible actions, bring in the mail daemon as necessary with ckmailstatus and then take player input with rhack.

deferred_goto checks if the player has changed levels and takes appropriate action if they have.

Legacy

Recalulate visible tiles if the command just entered necessiates it.

Update the map window every seven moves or turns if certain flags are set.

stop_occupation

display_gamewindows

newgame

welcome

do_positionbar

Retrieved from 'http://nethackwiki.com/mediawiki/index.php?title=Source:NetHack_3.4.3/src/allmain.c&oldid=84998'
Wikipedia has an article about:
Official NetHack logo
This is the page on the culture, development, and historic aspects of NetHack. For information on how to play the game and a start to the game mechanics, see Guidebook.

NetHack is a roguelike computer game, and the most famous and popular of its kind. The latest version is 3.6.6, released on March 8th, 2020. NetHack can be downloaded at the official NetHack download page. It is also available in other languages. Many variants and patches are also available.

Vanilla NetHack refers to the version as it was released by the DevTeam, without any additional patches.

  • 7Download

Screenshots

  • Text-mode

  • Text-mode, with special characters

  • Tile-mode on Windows

The Kop Sergeant picks up a rubber hose.

#######------- ###* (
##|....^.##u ###*#...|-...--------------
####.......########0......-........h ##*#(........#######..........^.|
####.......##0######..........#...?.##0# |........# #*# |...........|
##---|.-.# #####0).......>..Kb...-#*###-........#######..0..........
### #0#####-.........K@....## # |........#0*## .............
#### ######.|.......K....-.##u# ----|....# .............
###############################(################### ........---..
###########)##################### #########*#### #### #
####0############################ #0#* ###**#################
############################################*### # ## #########
)%########0##################################0#### # # #*# #
###(############################################--......# # ## #
.%..%#####0########################(#......##)###.<......# .......- #
)....######(####h####################.(....######........#####........* %
...[.#KK#**......###*###......|.......###........###
..%%-#...(..#0# ...... ........ ...).)..
..%.|#|..... -..... .......|
--------.-. ..----.-
#
Yhelothar the ExhumerSt:17 Dx:17 Co:17 In:16 Wi:16 Ch:12 LawfulS:103109

Dlvl:2 $:339 HP:97(97) Pw:51(51) AC:-4 Xp:12/25633 T:24695 WeakBurdened

Why do people like NetHack?

This page is a stub. Should you wish to do so, you can contribute by expanding this page.

A user has suggested improving this page or section as follows:

'I think this page should be a kind of FAQ, as it may be the first place strangers will visit upon seeing the Main Page.'

NetHack enjoys popularity in niches. Mathematicians, programmers, physicists, engineers, linguists and writers all feel a strong pull, though anyone with an eye for detail, a sense of completeness, a respect for complexity, and a head for numbers will be at home.

On the surface, the game is a hack'n'slash Dungeons and Dragons clone, but its subtle sense of humor and intellectual rigor elevate it from the faintly nerdy to the sharply geeky.

Just as a mathematician seeks elegant expressions over fuzzy generalities, NetHack eschews graphics in favor of perfectly crafted, well-defined ASCII characters. While other games are dated by their interfaces, NetHack is preserved in ascetic purity.

The programmer is drawn to NetHack as an extension of the operating system. Its culture is deeply intertwined with that of the Unix systems, and indeed is a staple fixture on any good Unix system - a known quantity, ageless, familiar, and soothing; whatever hairy command-line tasks are required, nethack(6) is always there.

NetHack is hard: while other games can be completed in an afternoon, you may go years without finishing NetHack.

NetHack is unforgiving: if you die, you stay dead. There is no save-and-reload crutch here. Put simply, NetHack is a harsh mistress, whose respect you must earn. In time, you learn to respect it back.

NetHack is deep: in your first game, you will die quickly, and come back worrying about how to survive. You will learn, eventually, and move onto higher concerns. You will stop worrying about your score, and start considering questions of optimality, efficiency, and elegance. You will consult tables and guides in search of an edge because everyone knows the best way to have fun in a game is to take 20 until you beat an impossible DC, rather than try to actually succeed at something hard yet possible. You may dive into the very source code, looking to explain that one-in-a-thousand shot you just pulled off. You will probably learn some C, and possibly get into heated debates about the merits of pseudorandom number generators, expected returns, inconsistencies between competing mythologies, and the ethics of exploiting bugs.

NetHack is history: Descending from Rogue, NetHack has 35 years of development behind it. It is one of the few computer games widely played by people who are younger than it. From this history arises a kind of authority.

Graphical user interfaces

As well as the standard ASCII interface, many official and unofficial graphical user interfaces are available. Using a graphical interface allows the game to be played with tiles instead of ASCII graphics. The best known are probably the officially supported ports for Windows, Mac and Linux:

  • Microsoft Windows (the standard NetHackW.exe available from nethack.org, or available on the Windows Store)
  • Qt for Linux and Mac
  • X11 for Linux (and Mac if developer tools are installed)

Notable unofficial graphical interfaces are:

  • Web terminals, allowing the player to play on a public server with either ASCII graphics or tiles in their browser without downloading anything. Available on NAO and Hardfought.
  • iNetHack for iOS
  • Falcon's Eye and Vulture, offering a 3D isometric view of the map. Note that neither of these is supported anymore.

Title

The title is properly spelled 'NetHack', with two capital letters. 'nethack' is also correct when used to refer to the name of the game binary. 'Nethack' is a common misspelling, even having been used by members of the DevTeam in comments in the source code.

Popular culture

This page is a stub. Should you wish to do so, you can contribute by expanding this page.

A user has suggested improving this page or section as follows:

'Gads this begs to be longer.'

In its legacy, NetHack has directly and indirectly been referenced in many sources.

  • NetHack quotes, on the Bash Quote Database.
  • The game Deus Ex has a reference to beating a future version of NetHack in the distant future.
  • Dudley's Dungeon, a webcomic set in NetHack.
  • Dungeons of Dredmor is a newer, sprite animated dungeon crawler with a more in-your-face sense of humor that nonetheless feels almost like a GUI rewrite of NetHack, and features direct quotes from NetHack like 'You hear the sounds of a cash register.'
  • In the game FreedroidRPG, you can play an ultra-simplified version of NetHack as a game-within-a-game (much easier to beat than actual NetHack).
  • The Screen terminal emulator has idiosyncratic messages from NetHack, such as 'Suddenly, the dungeon collapses.' when the program crashes.
  • The game Spelunky, which has some similarities to NetHack and is inspired by classic roguelikes, dungeon crawlers, and adventure games including NetHack, has NetHack references such as Vlad, his tower, and the camera.

History

Family Tree For Mac

NetHack's first version, 1.3d, was released in July 1987, descending directly from Jay Fenlason and Andries Brouwer's Hack. Subsequent early versions of NetHack, namely 1.4f, 2.2a and 2.3e were released through 1987 and 1988.

In 1989, the first release of NetHack's current incarnation, 3.0.0, was posted to Usenet. It featured a massive expansion over the previous versions.

NetHack 3.1.0 was released in 1993, bringing several big changes, such as the introduction of Gehennom in place of Hell, and the introduction of the invocation ritual.

Three years later, NetHack 3.2.0 was released, dedicated to the memory of Izchak Miller.

Several forks of NetHack were produced through the lifespan of both 3.1 and 3.2. The current version is 3.6.6, but 3.4.3 continues to be popular considering that it was the only version available for a long time.

In addition, many variants that are much more open about their development, such as UnNetHack or NetHack 4, are popular.

Download

For downloading the wiki itself, see NetHackWiki:Download.

You can also play online on a public server, e.g., nethack.alt.org.

Official version

  • Official NetHack download page (Tiles and text interfaces are available for Windows, Linux, Mac, and other systems)

Computer-like platforms

Other platforms

  • iNetHack for iOS, available from the App Store

Other interfaces

Main article: Graphical user interface
  • Vulture, a 3D display for NetHack 3.4.3 (see also Vulture)
  • noegnud, alternate UI system for NetHack (see also noegnud)
  • glHack (see also glHack)

Other languages

Nethack: Legacy For Mac Pro

External links

This page may need to be updated for the current version of NetHack.

It may contain text specific to NetHack 3.6.3. Information on this page may be out of date.

Editors: After reviewing this page and making necessary edits, please change the {{nethack-362}} tag to the current version's tag or {{noversion}} as appropriate.

Retrieved from 'http://nethackwiki.com/mediawiki/index.php?title=NetHack&oldid=135350'




Coments are closed