Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Help in creating something similar to A Firelit Room

edited October 2016 in Workshop
I would love to create something along the lines of this, and wonder if it would be possible in Twine.
adarkroom.doublespeakgames.com/
It's a 'click game' that works on an incremental basis and opens up other activities and options as you progress.

Comments

  • Oh, hey, A Dark Room! Love that game.

    I bet it would be possible. Harlowe's (live:) macro lets you make things that change in real-time, and while I'm not as familiar with Sugarcube, I believe it's capable of doing the same sort of thing. The progress bars could probably be done with some fancy CSS and/or Javascript, while things like adding/subtracting items from your pack could be done normally with passages or (link:) macros.

    I think the hardest part to emulate would be the map. I've seen something similar to it done before, but only once-- in Icepunk, which was made in Twine 1.4. No idea how the map in that was done, but you could probably download it and look in the code if you're interested.
  • edited October 2016
    Thank you for replying :)

    I think A Dark Room is the sequel to the game I link to in my original post, which doesn't use the map you speak of, and it's not something I would be implementing either.
  • Frustrating thing is I know what I want to but don't have the coding knowledge to do it.
    If anyone would be kind enough to offer a few pointers or guides it would be really appreciated.
    Ideally it would all happen on the same page, but just as a basic starter, how would I do this using Sugarcube?

    Let's say the first option is "Gather firewood"? When the player clicks the link I would like the word 'Wood: 3" to appear in the sidebar.

    Then a background timer kicks in meaning the player can't click "Gather firewood" for a set number of seconds. After this period they can click it again and so the value in the sidebar changes to "Wood: 6"
  • notes:
    1. I have not tested the following code, it was written from memory and may contain errors.
    2. I am assuming you will be using the latest version of SugarCube 2.x

    Jud_Casper wrote: »
    When the player clicks the link I would like the word 'Wood: 3" to appear in the sidebar.
    You can use the StoryCaption special passage to display output in the side-bar, assuming you have a variable named $wood the following code in your StoryCaption passage will display it's current value.
    Wood: $wood
    


    Jud_Casper wrote: »
    Then a background timer kicks in meaning the player can't click "Gather firewood" for a set number of seconds.
    I believe the <<replacelink>> macro set contains a <<timedreplace>> macro that may be able to do what you want:
    <<timedreplace 3s>>Gather firewood<<becomes>><<link "Gather firewood">>...some code goes here...<</link>><</timedreplace>>
    


    Jud_Casper wrote: »
    Ideally it would all happen on the same page
    By default most story formats are designed to display each navigable passage as a new page that overwrites the existing one and the History system of each of those story formats depends on this mechanism to track the state (current value) of the story variables as well as which navigable passage the Reader has visited.

    You can use DOM Macros to update (replace/append) the content of the current page but you will need to write that code yourself (or find someone to help).
  • Thanks, greyelf. That's a lot for a noob to try and get his head around, but I'll have a play. Thanks again.
  • This game is awesome!
  • Glad you like, Deadshot. I hasten to add it's not my own.
  • I'm not sure about the turning lights on/off thing though. That's clearly CSS changing the background and text colour, but I don't know if you could use code to change the tag and change which CSS you use, meaning you'd have to copy the entire game but just with a different tag for the lights off.
  • edited October 2016
    I would just have the background dark by default, so not a problem I would have to deal with.
  • Put together some HTML5 that shows everything you want on the screen. Use <div>s with z values to separate constant background, conditional background and dynamic values. Use SVG to draw and fill shapes. Build these up separately. You can chuck another one in for a changeable background layer (draw a big square in the background color). Make the buttons work so the game is playable - just nothing is hidden. Then start wrapping the bits in conditional statements so they only appear when they are supposed to be shown. ;-)
  • mykael wrote: »
    Put together some HTML5 that shows everything you want on the screen. Use <div>s with z values to separate constant background, conditional background and dynamic values. Use SVG to draw and fill shapes. Build these up separately. You can chuck another one in for a changeable background layer (draw a big square in the background color). Make the buttons work so the game is playable - just nothing is hidden. Then start wrapping the bits in conditional statements so they only appear when they are supposed to be shown. ;-)

    What's HTML5?
  • Deadshot wrote: »
    What's HTML5?
    Hyper Text Markup Language, version 5. The markup language that ultimately underpins the structure of web pages and applications.
  • Thanks for the suggestion, mykael, but I'm afraid all that is totally beyond my understanding and capabilities.
Sign In or Register to comment.