Hugor: A new Linux/Mac OS X/Windows port of the Hugo engine

This is due to the way Hugo lays out the screen. It’s character based. Graphics and windowing was developed later on top of that and with backwards compatibility in mind. The result is that Hugo measures the screen dimensions in terms of character cells. Just like it did for terminals in the DOS days (80x25 anyone?) And the basis for measurement is the width and height of the fixed width font; it is used as a multiplier.

So when the game requests a window with a width of, say, 50, in pixels that’s 50 * width_of_fixed_font. So when you choose a smaller fixed-width font, the window size changes too.

I think the way you implemented the windows in Necrotic Drift was preferable; they didn’t shift downwards, taking up valuable screen scrolling space.

Cool, it’ll be nice to have the Windows build to check in on the status of this. I tried it out myself tonight. One of my games starts off with a text box that relies on fixed width spacing. I noticed that Hugo’s default fixed width font (for me), Courier New, is not actually fixed width (several other fonts in my fixed width list also weren’t).

Here’s a link to my game for easy testing:
http://roody.gerynarsabode.org/games/buny.hex

Thanks. I can reproduce it on my system tool. Looks like something doesn’t add up in the way text widths are calculated.

I uploaded beta 6, which fixes the issue reported by Roody along with a few other ones:

  • Fixed-font text widths are now calculated correctly.
  • An issue where transcript files didn’t contain the player’s commands has been fixed.
  • The interpreter will now refrain from using font sizes that would not look good on screen. This is usually important for bitmap fonts that only have fixed sizes. Scaling those would result in ugly, pixelated font rendering.
  • Other small bugfixes not worth mentioning.

Version 0.7 is now available. Yes, this isn’t beta anymore :smiley:

  • Scrollback window support. In Hugor, the scrollback window will not block the engine, meaning you can keep playing the current game with the scrollback window open.
  • When using the FMOD engine for sound (default on Mac OS X), music is now streamed from disk instead of mapping it into RAM. This decreases memory usage.
  • When using the SDL engine for sound (default on Linux and Windows), MOD music (MOD/XM/etc) is played using modplug instead of mikmod. This increases sound quality and supported MOD features.
  • The interpreter should now always restore its previous size correctly.

Version 0.8 is out:

  • For game authors: You can now rename the interpreter to match the basename of your *.hex file, in which case it will load and run it without prompting the user for a game file. For example, if your game’s filename is “BestGameEver.hex”, you can rename the Linux Hugor executable to “BestGameEver” and the Windows one to “BestGameEver.exe”. This is not supported yet for Mac OS X.

  • The command editor now supports word-based editing (move to next/previous word, delete to start/end of word). The keyboard shortcuts are system specific (like CTRL+Backspace on Linux and Windows, Option+Backspace on Macs).

  • If “Soft Text Scrolling” is still too fast on your system, you can now apply some Extra Butter™ (in the configuration dialog.)

  • On MS Windows, text should no longer get cut at the right edge of the window.

  • A crash has been fixed that occurred on some systems (on some Linux systems it would crash with a “glibc detected” error message.)

  • The interpreter now remembers its maximized window state between sessions.

  • Added proper application icons for Mac and Windows. (Linux: We don’t need no stinkin’ icons!)

This is the best thing ever.

This is also the best thing ever.

Ha ha ha! Well, I can’t wait to check this out.

Aces!

I don’t want to seem politically disillusioned, but I’m pretty much willing to vote for Hugor in the next Presidential election at this point. Thanks, Nikos.

They didn’t make any exceptions for Schwarzenegger, so I guess they won’t for Hugor either :mrgreen:

That is some great news. I am especially psyched about the interpreter-renaming feature; that’ll help a lot when sharing future IF works with family members and friends who are not interpreter-savvy. Thanks, again!

In order to avoid “version hell” for people linking to the downloads, “unversioned” download links are now provided (first post was updated.) Using the provided download links will result in always downloading the latest available version. More importantly, you don’t have to keep track of new Hugor versions and you will avoid dead links. So please use those when linking to a download.

I uploaded a repackaged “hugor-0.8-linux.tar.bz2”. The only change is that the interpreter is now a single executable: there are no DLLs included anymore (they have been linked directly into the executable file.) This makes it possible to treat it just like the Windows *.exe and Mac app bundle; simply copy the executable wherever you want and it will run from there just fine.

If you’re not interested in this, you don’t need to re-download.

The version for Mac OS X was bumped to 0.8.1. This fixes an annoying text rendering bug where text positioning would be off by a few (or not so few) pixels. Also, the spacing between lines was sometimes too small, resulting in letters like “g” and “y” having their lower part cut off by the line below. Text rendering on the Mac should now be 100% correct.

(For the curious, the cause of this issue is that Core Text, the text rendering framework in Cocoa, uses floating point font metrics while the Hugo engine expects integer values. The resulting rounding errors would give wrong font metrics/coordinates.)

Updating is recommended for Mac users. Other platforms are not affected at all by this, so there’s no 0.8.1 version for anything else than Mac OS X.

This is fantastic. Thanks for making this! Now I can get the whole Hugo experience on my Mac (always something of a hit-and-miss affair in the past).

I will be making a new release soon. Among the changes is support for configurable margins, which was contributed by Marc Simpson. Thanks, Marc!

On Mac OS X, the application now recognizes *.hex files, so you can drag&drop a game file into the application icon or run games directly from the Finder.

A Linux-only change is that the binary now comes with two internal MIDI synths. The old one based on Timidity which is only able to use .pat instruments (like the “eawpatches”), and a new one based on FluidSynth which is able to use SoundFonts (.sf2 files). There’s no GUI to configure this yet, but you can enable the new MIDI synth by setting the SDL_SOUNDFONTS environment variable to the list of SF2 files you want to use. For example:

export SDL_SOUNDFONTS="/usr/share/soundfonts/Some_GM_SoundFont.sf2:/usr/share/soundfonts/Some_GS_SoundFont.sf2"

Again, this is a Linux-only thing. On Mac and Windows, Hugor does not use an internal synth. The platform’s native MIDI output is used instead.

If you want to give the new version a shot before the release, I’ve uploaded Linux, Mac and Windows builds here:

foss.aegean.gr/~realnc/hugor/testing

That’s good news to me! The lack of side margins is the most aesthetically displeasing aspect of the standard Hugo Engine.

Same here! I usually prefer to use the standard engine - seems more foolproof. But Hugor is looking a bit too good to pass up on…

I’ve introduced a full screen mode to the interpreter. The maximum width of the game window when in full screen can be set in the preferences (this is useful for avoiding ridiculously long text lines with widescreen monitors.) The effect when playing graphical games in full screen is nicer than I expected :slight_smile:

Full screen is supposed to work on all systems. Would be nice if people would give this a spin and report any glitches or weird behavior they come across. Downloads for all operating systems can be found at:

foss.aegean.gr/~realnc/hugor/testing/

Wow. I only just saw this, but it looks great! No problems running my games or any of the others I tried, although that’s no surprise since it has been out a while now. Very nice! Thanks!!!

Thanks. I used this in Linux (Antix to be exact) and it worked beautifully. Nice work. Much appreciated, I wasn’t expecting there to be an engine at all, let alone such a nice one.

Hey, I just want you to know I’ve been using it exclusively since you released it, and there haven’t been any problems. You’re too good at this “coding” thing for me to trip you up, Nikos!