Home Artists Posts Import Register

Content

This was another solid week of working on the new version of House of Hellish Harlots.

I hit a slight setback when I forgot one of Twine's quirks and made a change that doesn't work with how Twine handles objects.

If you're familiar with programming and objects, Twine has a quirk that catches people out, especially if they're trying to make something slightly more complex than a CYOA.  If you have an array of NPCs and want to change a property of an individual NPC, you have to do it through a reference to the whole array.

In Twine that looks something like:

<<set $allNpcs[4].value to newValue>>

What you can't do is make an array of the NPCs or pass a reference to a single NPC, change something about that NPC, and have the change retained in the original array.  This is because you're working with copies of the objects, not references to the same object.

So, for:

<<set $allNpcs to [$npcNurse, $npcMadam]>>

Then:

<<set $npcNurse.value to newValue>>

Or:

<<set $npc to $allNpcs[0]>>
<<set $npc.value to newValue>>

Always ends up with:

$npcNurse.value = newValue
$npc.value = newValue
$allNpcs[0].value = original unchanged value

I think this catches out everyone the first time they try to put some rudimentary RPG mechanics into a Twine game.  And me, occasionally.

Thankfully, I'm pretty thorough with my test code and caught this before it became a major fuckup.

It is something to be aware of if you ever want to play around with making your own things on Twine.

That little tips'n'tricks for Twine segment over, let's get onto where I'm at.

All the NPC modules have been converted.  I'm going through and testing them to iron out bugs and tighten the screws so everything both works fine and is code I'll still find legible if I read it again in a year's time.

I've converted 3 of the harlots over.

I'm hoping next week will be the last I need to be in intensive 'code mode'.  I want to convert 16 of the harlots over (including all the ones I have nice placeholder art for) and then have a functional demo covering the start of the game and the 1st 3 rounds.  I'm hoping to get that out in a week or so.

Thanks for the support.
I'm hoping this will be a version of HoHH that will generate more interest (and ideally funds for more art).
- manyeyedhydra

Comments

Zavijava

Ooh - passing by value. Always annoying when a language isn't clear it's doing that :) Hyped for all the updates!