dop2000's Recent Forum Activity

  • If you need to wait between repeats in a loop, use "Wait loopindex". For example:

  • Something like this:

    recipe="dagger#wood:2,coal:2,iron:1"
    item=""
    ingredientsList=""
    ingredient=""
    quantity=0
    s=""
    
    Set item to tokenat(recipe, 0, "#")              // dagger
    Set ingredientsList to tokenat(recipe, 1, "#")   // wood:2,coal:2,iron:1
    
    for x=0 to tokencount(ingredientsList, ",")-1
       set s=tokenat(ingredientsList, loopindex, ",")   // wood:2
       set ingredient=tokenat(s, 0, ":")                // wood
       set quantity=int(tokenat(s, 1, ":"))             // 2
    [/code:t3hsihh1]
  • LaDestitute

    In a year time when you look at a recipe "365790" you'll have no idea what it means. So I would recommend having recipes as text keys, not numbers. Say "wood,coal,iron", or with quantities: "wood:2,coal:2,iron:1", or with the final product name: "dagger#wood:2,coal:2,iron:1"

    Create a couple of functions that construct and parse these recipes using tokenat, tokencount expressions.

    You can sort the ingredient names in ascending order to make parsing easier.

    Another good option - create a table of all recipes in Excel, export it to a CSV file, use CSV plugin to search for recipes and ingredients.

            coal  wood  iron  bronze  wool
    dagger, 2,    2,    1,    0,      0
    sword,  2,    3,    1,    1,      0
    armor,  0,    0,    1,    0,      2
    [/code:3djyyg95]
  • If you use C2 Save/Load feature, then yes, dictionary will be saved too.

    Or you can convert it to JSON and save to local storage.

    If you don't save it, then the contents of the dictionary will be lost when you close the browser.

  • Yes, if you want to display either a text or sprites and not repeating, this could be complicated.

    Here is again the easy way - make several instances of a sprite with hints, keep them off-screen. Display one, then destroy it (with Fade behavior).

    https://www.dropbox.com/s/85ns0e0ntz8sm ... .capx?dl=0

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Easy way - use choose("abc", "def", "ghi","jkl",....) to randomly select one of text messages.

    You can add a text object HintText, and do something like this:

    HintText set text to choose("abc", "def", "ghi","jkl")

    Wait 5 seconds

    HintText set text to ""

    If you want your hint messages to not repeat or if you want to highlight letters on your board or something like that - this will require more work.

  • Here you go:

    https://www.dropbox.com/s/mune0lb1tfl7s ... .capx?dl=0

    I left green and blue sprites semi-transparent, but they of course should be invisible.

  • Could you share your capx?

  • Are you using 8-Direction? I think with 8-Direction you can make the same kind of movement, just read gamepad axes and emulate controls.

  • Man, I love F1!

    Not sure if this is 100% correct, but this quick fix seems to work - add "Else" condition:

  • I used the same example - 640x480 map with about 30% fill.

    I also tested with only two colors, selected them at random (like a white noise). The result is pretty much the same - less than 1fps. So it's not the number of colors that matters, but how they are placed.

    I think C2 optimizes performance for tilemap - when there are lots of identical tiles grouped together, they are treated as one big tile or something like that.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 250 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x4
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies