Hugor request/improvement - for RealNC

This is a discussion / support forum for the Hugo programming language by Kent Tessman. Hugo is a powerful programming language for making text games / interactive fiction with multimedia support.

Hugo download links: https://www.generalcoffee.com/hugo
Roody Yogurt's Hugo Blog: https://notdeadhugo.blogspot.com
The Hugor interpreter by RealNC: http://ifwiki.org/index.php/Hugor

Moderators: Ice Cream Jonsey, joltcountry

User avatar
Ice Cream Jonsey
Posts: 28877
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey »

RealNC wrote:What I meant is that I will provide the builds (getting it right for distribution is tricky and differs from just building it for use on the machine it was built on.)
Oh. So how about in a......... week? Two weekends from now? Would that work?

And I will try out the build you linked to at the bottom immediately.
the dark and gritty...Ice Cream Jonsey!

User avatar
RealNC
Posts: 2244
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC »

Showtime.

I've packaged everything here:

http://83.212.107.13/~realnc/hugor/icj/Hugor-icj.zip

Hugor.dmg contains a Mac universal binary. Runs on both Intel as well as old PPC Macs. It's double the size due to that, but you won't have to bother explaining to players which one to use. If they've got at least OS X 10.5, they can run it regardless of what CPU they have. The application is not signed though, so on recent versions of OS X people will need to whitelist it because Apple now wants my money so that they'll digitally sign it. Ain't gonna happen.

hugor.linux32 and hugor.linux64 are the Linux versions. The README.linux explains what they need to have installed to run it (Qt4 and SDL.) You can just package that together with your game.

Hugor.exe is for the Vectrex. Or Windows.

Now, to package your games correctly, make sure you do that under Linux. This is important for the zip files you distribute to preserve the executable bits on the Linux binaries. If you create your zips under Windows, you would need to tell people to do a "chmod +x" on the binaries first. So to avoid that, use the "zip" CLI tool that comes with Linux and you'll get a zip that works fine on Linux, Mac and Windows:

zip -r MyGame.zip MyGame

Make sure it's a subdirectory of your current directory, otherwise you'll end up with multiple subdirs in the zip (for example if you zip -r MyGame.zip dist/MyGame, users will also see the "dist" dir in the zip.)

It's best to use the default zip compression level, otherwise some outdated zip tools people could be using might not be able to unpack the zip.

For an example, let's suppose you want to package CZK. Copy the Hugor stuff over into the game's directory as:

Hugor.exe -> czk.exe
hugor.linux32 -> czk.linux32
hugor.linux64 -> czk.linux64
example.cfg -> czk.cfg

Adjust the cfg to your liking, of course.

As for Hugor.dmg, you put that into your game directory as-is. The Mac version doesn't support the basename autoloading or *.cfg files. So just tell users to install Hugor from the DMG and load the game. Sorry about that, but who uses a Mac anyway, right?

Make sure to get the filenames right when it comes to lower vs upper-case or else it won't work on Linux (Czk.linux32 won't load czk.hex). All files must match in case; the binaries, the game file and the cfg file. The ".cfg" and ".hex" extensions must always be lower-case.

Now just go one directory up and zip it:

cd ..
zip -r CZK.zip CZK

If you find any remaining problems with the interpreter, let me know.

Another thing: when linking to Hugor from your game pages, please don't link directly to the files. Either link to the ifwiki page, or to:

https://github.com/realnc/hugor/releases

in case the ifwiki goes down. I don't want people to download an older version :-)

User avatar
Ice Cream Jonsey
Posts: 28877
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey »

Thanks, Nikos! You are the MAN.

I'm in the process of grabbing all these and setting up the appropriate packages for my various games. It occurs to me I should script the build process, what with their being 5 Hugo games and then Cyberganked on the way. Baby on the way!

This is awesome. Between this, hopefully getting the DOS versions work on the Internet Archive in a browser and what Juhana is working on, this could truly be the new golden age of Hugo.
the dark and gritty...Ice Cream Jonsey!

User avatar
RealNC
Posts: 2244
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC »

As long as you can get it all done before March 26th, you should be fine.

User avatar
Ice Cream Jonsey
Posts: 28877
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey »

What happens then?
the dark and gritty...Ice Cream Jonsey!

User avatar
RealNC
Posts: 2244
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC »

Ice Cream Jonsey wrote:What happens then?
Red Cloud gets murdered and a bunch of superheroes wreck havoc all over the city.

User avatar
RealNC
Posts: 2244
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC »

*wreak

Edit timer, goddammit...

Roody_Yogurt
Posts: 2179
Joined: Mon Apr 29, 2002 6:23 pm
Location: Milwaukee

Post by Roody_Yogurt »

Haha.

So, I've decided I don't always like the fullscreen margins matching the background color if the background color is non-black. Possible setting/config file option to not match and go with another color? How does that sound?

User avatar
RealNC
Posts: 2244
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC »

Roody_Yogurt wrote:Possible setting/config file option to not match and go with another color?
I just added this:

http://83.212.107.13/~realnc/hugor/test ... eo-w32.zip

I had to remove the bottom margin (it was 5 pixels high). It's problematic both when specifying a custom margin color, as well as when the color auto-detection goes wrong.

Roody_Yogurt
Posts: 2179
Joined: Mon Apr 29, 2002 6:23 pm
Location: Milwaukee

Post by Roody_Yogurt »

Cool, glad it works. Personally, I'll probably stick with the match-background look now that I see it in action, but it's probably still nice to leave that up to the player.

User avatar
RealNC
Posts: 2244
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC »

I think it's mostly useful for weird stuff like:

http://www.ifarchive.org/if-archive/gam ... tetris.zip

Auto-detection can't work with such things.

A .cfg option is now also included for such games ("fsMarginColor" in the "[Display]" section.)
; Color for fullscreen margins. If set, automatic margin color detection will
; be disabled when in fullscreen mode.
;
; Use one of the following formats:
;
; #RGB (each of R, G, and B is a single hex digit)
;
; #RRGGBB
;
; #RRRGGGBBB
;
; #RRRRGGGGBBBB
;
; A name from the list of colors defined in the list of SVG color keyword
; names provided by the World Wide Web Consortium; for example, "steelblue"
; or "gainsboro". See http://www.w3.org/TR/SVG/types.html#ColorKeywords
;
;fsMarginColor = #RRGGBB

Roody_Yogurt
Posts: 2179
Joined: Mon Apr 29, 2002 6:23 pm
Location: Milwaukee

Post by Roody_Yogurt »

Very cool. I should probably add a section to the Hugo by Example Hugor page detailing all of the .cfg file options!

Anyhow, recently, I was trying to find a Mac interpreter that'd play the Lurking Horror sounds for a friend the other day, and for the most part, it was an effort in futility.

I don't mean to disparage the community, but it's kind of disappointing that the most popular IF language doesn't have a strong capability-rich interpreter on every major OS. It just makes what you've done for Hugo all the more amazing, and it really is cool.

User avatar
Ice Cream Jonsey
Posts: 28877
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey »

I think there might be a problem with full version in the latest Hugor. Here's a screenshot of what Cyberganked looks like when I go to full at the moment:

Image

It looks like there's a huge margin on both sides. Fullscreen width is set to 99%.
the dark and gritty...Ice Cream Jonsey!

User avatar
Ice Cream Jonsey
Posts: 28877
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey »

Hmm. This is happening with an old interpreter and Cryptozookeeper and I don't think it was always that way. So now I think all my computers are broken.
the dark and gritty...Ice Cream Jonsey!

User avatar
RealNC
Posts: 2244
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC »

Your computer is not broken. My code is. And my brain, apparently.

Will fix it (code, not brain.)

User avatar
Ice Cream Jonsey
Posts: 28877
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey »

RealNC wrote:Your computer is not broken. My code is. And my brain, apparently.

Will fix it (code, not brain.)
But I really think the cat is more the probl--

[youtube][/youtube]
the dark and gritty...Ice Cream Jonsey!

User avatar
RealNC
Posts: 2244
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC »

It should now be working correctly:

http://83.212.107.13/~realnc/hugor/test ... eo-w32.zip

When using a cfg file, "fullscreenWidth" should not be set at all if an aspect ratio is also set, as "fullscreenWidth" overrides the ratio settings (this was the source of the bug; fullscreenWidth would previously not override the ratio, but was actually capped by it, due to me thinking that it's a good idea.)

(I'm aware of the fullscreen bug in this version where the game gets minimized when exiting the config dialog. Will fix it later.)

User avatar
Ice Cream Jonsey
Posts: 28877
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey »

Got it! Thanks, Nikos! This definitely fixes the full screen bug. However, it appears that I am not able to set a margin any longer, for the text to appear. It looks like the letters are going right against the edge of the screen. (I can take a screenshot if you like.)

Any other Hugonauts seeing that with this build?
the dark and gritty...Ice Cream Jonsey!

User avatar
RealNC
Posts: 2244
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC »

In fullscreen, that's intended. Margins only apply to windowed mode. I'm not sure how they should interact with the fullscreen width setting otherwise. I simply assumed that people would virtually never set 100% for that setting.

Roody_Yogurt
Posts: 2179
Joined: Mon Apr 29, 2002 6:23 pm
Location: Milwaukee

Post by Roody_Yogurt »

I was just thinking, would it be possible to add a URL (and possibly e-mail) catcher, so that if players click on those, the link gets opened with the applicable program? And if so, maybe only have it work in windowed mode?

Post Reply