Fading previous location text after 'key press'

OurJud
Jay, Re. the following java you supplied for fading the font of the previous location.

eval ("$('div[id^=\"divOutputAlign\"]').css('opacity', '0.5');")
eval ("getCurrentDiv().css('opacity', '1.0');")

You've already shown me how I fade the player's input too, but can this be adapted to fade the previous location font on 'key press' too?

I don't use key press very much, as I don't like the 'continue' hyperlink (although I think I can hide this using directions in another thread), but when I use key press to move my player from a scene that has ended, the previous text doesn't fade.

Any way I could get it to do so?

Silver
I always do a clear screen when changing locations. The info is no longer relevant so nice to have a fresh new canvas.

OurJud
I like the idea of the player being able to scroll back through their journey, even if the font is faded out. I suppose if I limited clear screen to key press instances, it wouldn't be too bad.

Silver
Fair dos. I hate clutter, I try to do clear screens as often as is practically possible. :D

OurJud
Silver wrote:Fair dos. I hate clutter, I try to do clear screens as often as is practically possible. :D

But what if a player wants to check some detail in a previous location?

Silver
They walk back to that location to check it: same as real life. Adds to the suspension of disbelief, perhaps.

Silver
In the context of this thread, I wouldn't put any important game info in intros or cut scenes for that reason. Only pure narrative.

jaynabonne
Regarding clearing the screen, I tend to not so that someone can have a complete transcript of their game.

As far as clearing the text on "continue", I'll have to look at it. I don't know what sections are active during one of those.

Silver
Out of curiosity, why do people see it as useful/desirable for players to retain a transcript of their game history. I'm interested to know as I might learn something I hadn't thought of. For me, I do regular clear screens purely for aesthetic purposes. Clear out the cob webs!

OurJud
jaynabonne wrote:Regarding clearing the screen, I tend to not so that someone can have a complete transcript of their game.

As far as clearing the text on "continue", I'll have to look at it. I don't know what sections are active during one of those.

Thank you. Just to clarify, though, I'm looking to fade the previous location on key press/continue, not clear it.

Silver wrote:Out of curiosity, why do people see it as useful/desirable for players to retain a transcript of their game history. I'm interested to know as I might learn something I hadn't thought of. For me, I do regular clear screens purely for aesthetic purposes. Clear out the cob webs!

I'm going to try clear screen on key press, see if I can get on board with it just in case Jay can't figure out the fade/opacity trick.

OurJud
Just discovered clear screen forces the command bar to return, even in the desktop version.

At least that answers the question regarding whether I'll be using it or not.

Silver
Sorry yes, that's what I pointed out to Jay and not about the reload issue. Find the thread where it was discussed (or I will over the course of me going back over my posts) and install the library he created instead.

OurJud
Silver wrote:Sorry yes, that's what I pointed out to Jay and not about the reload issue. Find the thread where it was discussed (or I will over the course of me going back over my posts) and install the library he created instead.

Not entirely sure what thread you're referring to, Silver, and I could be wrong, but when I was asking all these questions about customisation, I'm sure I followed them all through.

If you could find it, that would be handy, just in case I did miss the installing of a library.

Silver
You already said you'd solved the problem on the thread without forseeing the issues that you've now come up against. Jay made a library and then he updated it after I said about clearscreen IIRC. You weren't following it as you thought you already had the solution. Will post up the links when I find them.

OurJud
Anyway, getting back on topic.

Jay, I don't know if this is any use to you, in solving the fade text on key press, but I just inspected a block of code where I use a key press in the game, and got this:

<div id="divOutputAlign1" class="" style="text-align: left; opacity: 0.5;">
<div id="divOutputAlign2" class="section1" style="text-align: left; opacity: 0.5;">
<div id="divOutputAlign3" class="" style="text-align: left; opacity: 0.5;"></div>
<div id="divOutputAlign4" class="section2" style="text-align: left; opacity: 0.5;">
<div id="divOutputAlign5" class="" style="text-align: left; opacity: 0.5;"></div>
<div id="divOutputAlign6" class="section3" style="text-align: left; opacity: 1;">

Section2 from this block, refers to a previous location that IS faded (as a result of a command input)
Section3 groups a previous location with the new location (brought on with key press).

So, "divOutputAlign5" is the culprit in this instance. It is this that refuses to fade, even though the opacity command is there.

What I gather from this, is that the previous location is treated as part of the current location, when 'move' on 'key press' is used, as opposed to moving between locations with a command input.

Does that make sense?

OurJud
Silver wrote:You already said you'd solved the problem on the thread without forseeing the issues that you've now come up against. Jay made a library and then he updated it after I said about clearscreen IIRC. You weren't following it as you thought you already had the solution. Will post up the links when I find them.

Thanks :)

OurJud
I thought I had this for a second.

I tried adding the two opacity java scripts from the game's turnscript, as java after the key press in the room itself, but it didn't work.

So instead of:

msg ("The barman moves like lightening and is on you in a flash. He wrestles you to the ground, helped by a few well-aimed kicks to the shines from Lucy.<br/><br/>Dazed from the barman's blows, you feel yourself being dragged somewhere.<br/>")
wait {
SetObjectFlagOn (player, "night")
MoveObject (player, millers bar fail)
}

I had:

msg ("The barman moves like lightening and is on you in a flash. He wrestles you to the ground, helped by a few well-aimed kicks to the shines from Lucy.<br/><br/>Dazed from the barman's blows, you feel yourself being dragged somewhere.<br/>")
wait {
JS.eval ("getCurrentDiv().css('opacity', '1.0');")
JS.eval ("$('div[id^=\"divOutputAlign\"]').css('opacity', '0.5');")
SetObjectFlagOn (player, "night")
MoveObject (player, millers bar fail)
}

Really thought that was going to do it.

Silver
This is the url for the end of that thread.

viewtopic.php?f=10&t=4760&start=60

OurJud
Thanks.

I downloaded the retrostyle.aslx, but forget what I do with it. I just dragged it into the directory for my game, is that right? After doing that, I looked for it in the library list, but it wasn't there.

And yes, I closed the game after adding it to the directory, and reopened it in order to refresh the directory.

However, we've got different threads/problems crossed again... yes, I know, my fault for making so many threads, but this is for fixing the clear screen issue where the game loses the custom styling, not fading font on key press.

Silver
if by 'custom styling' you mean the parser / command inputter then that library (the last one on the thread) deals with that specific issue.

Sounds like you're adding the library the right way... but how many game directories do you have now and which one is the game using? Weren't you making a copy of it? Other than that, read the documentation and see if you're doing it right.

You can download libraries from the Resources page. When you've downloaded a library, go to Included Libraries in the tree (under the Advanced section) and click Add to add it to your game.


OurJud
Silver wrote:

You can download libraries from the Resources page. When you've downloaded a library, go to Included Libraries in the tree (under the Advanced section) and click Add to add it to your game.


I've gone wrong somewhere, then. I dragged the retro file to the folder containing the game, but it's not listed in my game's installed libraries, and when I search for it from the huge list, it's not there either.

jaynabonne
After you drag it to the folder, go to the Libraries section in your game and click Add and find it. You do have to add it to the game as well.

OurJud
jaynabonne wrote:After you drag it to the folder, go to the Libraries section in your game and click Add and find it. You do have to add it to the game as well.

Oooh, rightio. Thanks.

OurJud
I installed the retro file and clear screen now restores the command input styling, but the horrible blue 'continue' link that is part of the key press command - which I've hidden with CSS - comes back.

I'll open up the retro file after my tea to see if I can keep that away too, unless you know a simple way off the top of your head.

OurJud
OurJud wrote:I installed the retro file and clear screen now restores the command input styling, but the horrible blue 'continue' link that is part of the key press command - which I've hidden with CSS - comes back.

I'll open up the retro file after my tea to see if I can keep that away too, unless you know a simple way off the top of your head.


Done it. I had to add the CSS for hiding the continue link to the retro file.

I'd still prefer a text opacity, but at least now clear screen works how I want.

Just out of curiosity, from one player to another, if a body of narrative came up in the game, and there was no parser, no 'continue' link, would you automatically know a key press was required?

I like the minimalism and clean look of having no 'continue' link to prompt a key press, but I don't want people thinking the game's crashed or frozen.

Silver
The continue link is relatively new and it solves a problem I highlighted. In that if you're playing a game with a mobile device, you need a text inputter in order for the device's keyboard to appear. I was playing loads of games and getting to points where the game simply couldn't progress. So Alex changed it to a hyperlink. But that doesn't always work with tablets either. Anyway I concluded that Quest isn't really suited to mobile devices. If I fancy playing on a mobile device I just stream it from my PC instead so I don't get the game breaking quirks.

jaynabonne
For an earlier game attempt of mine, I just had text say "press a key to continue", but not a link. It looked clean enough (to me) and was clear. I don't like the look of the blue underlined "Continue" link.

OurJud
jaynabonne wrote:For an earlier game attempt of mine, I just had text say "press a key to continue", but not a link. It looked clean enough (to me) and was clear. I don't like the look of the blue underlined "Continue" link.

I did consider this, but I'm so anal about not breaking the immersion, that I don't even want that if I can avoid it. I could explain in the intro that if the game appears to be frozen, it's waiting for a key press.

Incidentally, Jay, not that I want to be seen as mithering, but did you manage to give any more thought to fading the font on key press (also noticed yesterday that it's the same when using 'wait # seconds then...') or have you come to the conclusion that it's not doable?

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums