FAQ Search Memberlist Usergroups
Jolt Country Forum Index
Register Profile Log in to check your private messages Log in
Log in Log in

unofficial library enhancement

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors
View previous topic :: View next topic  
Author Message
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Thu Jun 14, 2012 11:28 am    Post subject: unofficial library enhancement Reply with quote

Lately, I've decided that the handful of files I've been including with each new WIP were a bit unwieldy, so I compiled all of the unofficial Hugo library updates into two files. Besides that, I also added several utility routines, based on what I felt was useful enough to be lumped in with the standard library.

Anyhow, this is a temporary thing until hypothetical official updates come along, but the files themselves are definitely open up for debate. Feel free to use them in your games. In the least, some of the routines might give you some ideas.

Download:
http://roody.gerynarsabode.org/notdead/roodylib_suite.zip


Last edited by Roody_Yogurt on Wed Feb 06, 2013 11:45 am; edited 1 time in total
Back to top
View user's profile Send private message AIM Address
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Thu Jun 14, 2012 9:27 pm    Post subject: Reply with quote

I switched gears on what project I am working on (it's not using Hugo at the moment) but when I go back to the tiny space game I started, all of these additions will be in it. I think anything you made before February already is?
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Fri Jun 15, 2012 3:20 pm    Post subject: Reply with quote

If I heard you switched systems for your WIP, I totally forgot. Would love to hear what you're going with now.

Most of the library fixes are older than February. Among the new improvements are:
  1. I split PrintStatusLine into three routines, but that's not important. The important thing is that changing your game to statustype 3 makes the score/moves counter like it was in Infocom. The more important thing is that statustype 4 gets its text from the routine STATUSTYPE4 so now you can change what goes in the upper right corner without replacing PrintStatusLine every time.

    So:

    replace STATUSTYPE4
    {
    if player is happy
    print "FROSTY";
    else
    print "NOT FROSTY";
    }

  2. I added an extra routine to be called at the beginning of ParseError called "PreParseError". Once in a long while, you'll want certain code to be run every turn, successful or not. It's easy enough to put something in PreParse, which will be executed before every understood turn, but sometimes you want something done before the failing turns, too. This puts in a nice foothold for such things.

    replace PreParseError
    {
    <code>
    }

  3. The vehicle/DoGo replacements are on the newer side of things. That is prompted by things like the horse in Spur, vehicles where "up" and "out" are not the expected "get out of the vehicle directions". The standard library makes some hard-to-work-with assumptions about that.

  4. I included my DoListen fix, and since it's a similar kind of verb, I made DoSmell more standard-library-y. Are there other verbs, verbstub or not, that we'd want to improve for standard library inclusion?

I tried to comment every inclusion, so browsing the file should give people an idea of everything that's there.
Back to top
View user's profile Send private message AIM Address
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Sat Jun 16, 2012 3:13 pm    Post subject: Reply with quote

I also forgot to mention some screen-redrawing stuff I put in there. I threw in a PrintStatusLine into ParseError. Previously, if the player changed the window size and then did a misunderstood command, the status line disappears. No big deal, sure, but I find the behavior an eyesore.

I also made a RedrawScreen routine that is supposed to go into PreParse. If it directs a screen change, it says something like "detected screen change; redrawing screen" then waits 2 seconds then clears the screen*. After that, it rewrites the player's last command entry and goes on to process it.

Anyhow, any game with graphics will have their own redraw-the-screen routines, but this should make the average text game look nicer.

[* - I clear the screen because if the change in screen size is drastic enough, all of the old text will still be at the old screenwidth.]
Back to top
View user's profile Send private message AIM Address
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Sun Jun 24, 2012 9:57 pm    Post subject: Reply with quote

I don't really want to create a new thread here every time I want to philosophize about something Hugo related, so I created a blog for just that: http://notdeadhugo.blogspot.com

I hope that anyone interested in Hugo-coding philosophy or wants to weigh in themselves check it out.

Of course, I'll still post announcements, news, and possibly coding tips here.

Oh yeah, I do not want the blog added to Planet IF, since it's not really stuff to share with the whole IF world.
Back to top
View user's profile Send private message AIM Address
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Thu Jul 26, 2012 4:06 pm    Post subject: Reply with quote

Huh, I thought the no-editing thing was only for the other bases. THANKS A LOT, TDARCOS!

Anyhow, instead of the link at the beginning of the thread, the latest, best version of roodylib will be found (for the foreseeable future) at:
http://roody.gerynarsabode.org/notdead/roodylib_suite.zip
Back to top
View user's profile Send private message AIM Address
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Mon Feb 04, 2013 3:09 pm    Post subject: Reply with quote

I've gotten myself a bitbucket account and have put a bunch of Hugo-extensions-in-progress there:
https://bitbucket.org/roody_yogurt/hugo-code-lab/src

I'll continue to update Hugo By Example's extension pages, but in the least, I figure that the bitbucket page will be useful for when HbE's server is acting spotty.

If anybody knows any git/bitbucket tips and tricks to make my pages there more useful and accommodating, please let me know.
Back to top
View user's profile Send private message AIM Address
loafingcoyote



Joined: 04 Jan 2012
Posts: 89
Location: Texas

PostPosted: Tue Feb 05, 2013 10:49 pm    Post subject: Reply with quote

Roody_Yogurt wrote:
I've gotten myself a bitbucket account and have put a bunch of Hugo-extensions-in-progress there:
https://bitbucket.org/roody_yogurt/hugo-code-lab/src


Wow, this is fantastic. I've never heard of bitbucket before, but it looks like a great place to organize projects and show other people what you're doing. I want to try it myself.

From what little I know, Mercurial is simpler that Git, so I'm curious why you went with Git. Is it more powerful in some way or are you just more familiar with it? Pardon me if this question seems naive but I'm not familiar with either of them.

Roody_Yogurt wrote:
I'll continue to update Hugo By Example's extension pages, but in the least, I figure that the bitbucket page will be useful for when HbE's server is acting spotty.


This brings up a question I've been meaning to ask you for a while. I was was wondering if the content HbE was backed up somewhere?

Although I'm sure it's very unlikely anything would happen to it, I've always had the fatalistic attitude that my own code is just waiting to disappear on me. As a result, I'm not comfortable unless my own stuff is backed up in at least a couple of different places.

-lc
Back to top
View user's profile Send private message
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Tue Feb 05, 2013 11:19 pm    Post subject: Reply with quote

loafingcoyote wrote:
From what little I know, Mercurial is simpler that Git, so I'm curious why you went with Git. Is it more powerful in some way or are you just more familiar with it? Pardon me if this question seems naive but I'm not familiar with either of them.


You know, I didn't actually research them this time around and just went with git because it had more "name-brand recognition" for me. I thought that when I looked into it last time, Mercurial sounded like the more-powerful of the two, which made me think, eh, I don't need it then.

On one hand, bitbucket has nice get-you-going pages that tell you the exact command line commands to get your project going. On the other hand, things like deleting unnecessary files from the project can be more of a hassle than they need to be. The actual committing process is pretty painless, once you have it down, though.

loafingcoyote wrote:
This brings up a question I've been meaning to ask you for a while. I was was wondering if the content HbE was backed up somewhere?


I backup HbE every so often, but it's true that I often go some months in between backups. I should get better about that.
Back to top
View user's profile Send private message AIM Address
Tdarcos



Joined: 16 May 2008
Posts: 4441
Location: University Park, Maryland

PostPosted: Wed Feb 06, 2013 4:53 am    Post subject: Re: unofficial library enhancement Reply with quote

Roody_Yogurt wrote:
Anyhow, this is a temporary thing ...

Download:
http://roody.gerynarsabode.org/roodylib.zip

Very temporary, as in 404 Error page not found.

One of your other messages mentioned this file as the most current realease: http://roody.gerynarsabode.org/notdead/roodylib_suite.zip

Is that the correct URL or are there two different items?

I posted this message because, in case you've forgotten, I did enough penance to get post editing restored, so you can now correct the erroneous link at the start of this thread if that is what you wanted to do.
_________________
The lessons of history teach us - if they teach us anything - that no one learns the lessons of history.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Wed Feb 06, 2013 11:47 am    Post subject: Reply with quote

Yeah, I changed URLs somewhere along the way. I didn't update the URL here because I like to pretend that I don't need post-editing, after having spent so much time without it.

But yeah, fixed now.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Theme by Kage Musha - RPG Garden

Copyrights and trademarks are all of the belonging company. No copyright Infringement intended