dop2000's Forum Posts

  • Looks cool!

    So how many tilemaps are there?

  • Is your glow effect a sprite?

    Add Glow and Enemy to the same container. (not family!)

    You will not need to create or destroy Glow - this will be done automatically when Enemy is created or destroyed. And Glow will be logically linked to Enemy.

    https://www.scirra.com/manual/150/containers

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

  • 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.

  • matriax

    I tested the tilemap with 256 colors - it's insanely slow, less than 1fps. When each building is one uniform color, it's fine. But if each pixel is a different color, everything comes to a halt. So forget this idea.