First-person problems

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

Bainespal
Posts: 151
Joined: Fri Jul 09, 2010 8:59 am

First-person problems

Post by Bainespal »

I need to switch between first person and second person in my game. This sounds like a simple matter in The Hugo Book -- change player_person to 1 and change the pronouns property of the player character object "accordingly". It actually did seem pretty straightforward for me, except that the default messages are grammatically incorrect, using "Me" instead of "I" in messages such as "Me can't use the word 'whatever'" or "Me can't go that way." I don't really want my first-person character to sound like a caveman. ;-)

Instead of redefining the pronouns property on the default "you" object, I made new player character objects, modeled after the player_character class in objlib.h, which looks like this:

Code: Select all

character player_character
{
	! 'nouns' and 'pronouns' as defined below are the defaults
	! for second-person, i.e., when player_person is 2--'name'
	! should be "you"
	!
	nouns "me", "myself"
	pronouns "you", "you", "your", "yourself"

	long_desc
	{
		print "Looking good."
	}

	capacity 100
	is hidden
	is plural       ! because player_person defaults to 2
}
I defined the "pronouns" property as:

Code: Select all

"I", "me", "my", "myself"
. I tried switching the order of "I" and "me" in the list, putting "me" first, but that didn't work.

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

Post by Roody_Yogurt »

Well, looking at ParseError case responses in hugolib.h, I saw that error messages and stuff use the CThe(object) routine which works off of object.name. The comments on the player object in objlib.h reflect that also.

Good thing you had us figure out how to do conditional name properties, eh? You'll want to do this with your regular, in-game player object:

Code: Select all

player_character you 
{
   name	{	
	if player_person = 1
		return "I"
	elseif player_person = 2
		 return "you"
	}
}
I played around with this a bit, and it seems right so far (in some player-person cases, you need to remove the plural attribute from the player object) but everything seems to be working.

I'd double check all verb routine code, though.

Bainespal
Posts: 151
Joined: Fri Jul 09, 2010 8:59 am

Post by Bainespal »

Maybe I should have extended the definition of the standard "you" object. It seemed a little simpler to make three PC objects to represent three different first-person narrators. But that's not my problem at any rate -- I'm switching between the four player objects just fine. Giving my first-person player_character objects the name "I" is simple enough; the immediate problem is that I set the name property as "me" for some reason.
I'd double check all verb routine code, though.
But that's the catch! Glancing at verblib.h, it appears that every time the player object is referenced as an object in a command, an ungrammatical sentence will result. Here's two such messages:

"Venting my frustrations on I won't accomplish anything."
"I can't drink I."

There doesn't look like all that many of routines like this; I'll just block all the verbs like this in the player objects' before properties, when I find them.

User avatar
Tdarcos
Posts: 9341
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Re: First-person problems

Post by Tdarcos »

Bainespal wrote:I need to switch between first person and second person in my game..
Do you have an idea of what the game will be or are you doing it "ad hoc" on the fly?

If you don't, you need to do one thing. Make a list of all dialog generated by the game, and each time you add new dialog, you add that to the list. (This is commonly done now for the purpose of doing closed captions.)

Then you take the pieces that have first person format and you make those as third person.

Can you create a label for a piece of dialog something like

Code: Select all

Man1 = "I am going to take a shit"
Man1PG = "I am going to take a dump"
Now, if you have a variable called Rating, where the uncensored "R" rated version is, rating is equal to nothing, the censored version contains "PG" then you have

Say Man1&Rating

Or some form of macro. If nothing else, create an array, if a particular variable is 1 it picks the one mode, 0 an other, then you put the first person in 0, if it's tripped to third person then it selects the other.
"I really feel that I'm losin' my best friend
I can't believe this could be the end."
- No Doubt, Don't Speak

User avatar
Tdarcos
Posts: 9341
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Re: First-person problems

Post by Tdarcos »

Tdarcos wrote:Now, if you have a variable called Rating, where the uncensored "R" rated version is, rating is equal to nothing, the censored version contains "PG" then
Correction, to get an R rating (or possibly PG 13) it would have been "I am going to take a fucking shit," The PG rating would allow "I am going to take a shit," or "I'm going to take a goddam shit." Now, the example I gave, "I am going to take a dump" would actually be acceptable for a G rating. Even "I'm going to take a damn dump," would still get G.
"I really feel that I'm losin' my best friend
I can't believe this could be the end."
- No Doubt, Don't Speak

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

Post by Roody_Yogurt »

Yeah, playing with it, switching player objects seems like the right way to go.

In any case, the player object with name "I" should have this for their pronouns:

Code: Select all

pronouns "i" "me" "my" "myself"  ! these, unlike name, have to be lowercase

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

Post by Roody_Yogurt »

Also, Tdarcos, the help is appreciated. You should read the Hugo manual available here and write a text adventure. Show ICJ how it's really done!

Bainespal
Posts: 151
Joined: Fri Jul 09, 2010 8:59 am

Re: First-person problems

Post by Bainespal »

Tdarcos wrote: Can you create a label for a piece of dialog something like

Code: Select all

Man1 = "I am going to take a shit"
Man1PG = "I am going to take a dump"
Now, if you have a variable called Rating, where the uncensored "R" rated version is, rating is equal to nothing, the censored version contains "PG" then you have

Say Man1&Rating

Or some form of macro. If nothing else, create an array, if a particular variable is 1 it picks the one mode, 0 an other, then you put the first person in 0, if it's tripped to third person then it selects the other.
Thanks for the pointer. I can understand that concept, even though I've never really worked with arrays before. I may try that if I need a more complicated system, but I also think it may be possible to simply block everything that could give an incongruity in first person during the sections of the game that are told in first-person narration.
Roody_Yogurt wrote:In any case, the player object with name "I" should have this for their pronouns:
Code:

pronouns "i" "me" "my" "myself" ! these, unlike name, have to be lowercase
I noticed the capital problem as I was typing the first post in this thread and then changed it, hoping that that may have been the only problem. It wasn't, of course.

Roody, as a status update, I'm pretty sure that I'm not going to be entering the Comp at this point, just so you don't feel any need to answer my questions as soon as possible. It would have been good to have a Hugo entry to mix things up with all the I7 dominance, but college caught me, alas. I'm now trying to hold myself to a late November release date, perhaps Thanksgiving weekend. Hopefully I'll be able to take care of the many mounting details, such as Tdarcos's system for matching pronouns.

User avatar
Tdarcos
Posts: 9341
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

Roody_Yogurt wrote:Also, Tdarcos, the help is appreciated. You should read the Hugo manual available here and write a text adventure. Show ICJ how it's really done!
I did something very unusual, which I only did for the first few days to try it out, then more or less forgot about until now.

My monitor and video card also support Poitrait orientation, which means you turn the monitor 90o on a side (it has internal casters so you just rotate it), then you tell the video card to rotate everything 90o counter-clockwise.

What you get is the perfect orientation to read documents as they appear fully on the page, and you can use Page Down to go on to the next page. Much easier for reading a document, more like what you see when reading paper.

I still have it in Poitrait, I finished the book but never got around to resetting it. I was really tired this morning, so I went back to bed and basically shut down the TV. After an hour-and-a=half nap I feel much better. I'm feeling chills plus some other minor miscellaneous items that all equate to that "blah" feeling. I dunno, touch of the flu or a cold, maybe? but it ain't that cold, the thermometer in my room says its 64. Oh, yeah, that would do it
"I really feel that I'm losin' my best friend
I can't believe this could be the end."
- No Doubt, Don't Speak

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

Post by Roody_Yogurt »

Bainespal- That is too bad about the comp, but oh well, another Hugo game before the end of the year still contributes to 2011 changing EVERYTHING so keep up the good work.

Tdarcos- It sounds like the game is shaping up nicely!

Post Reply