dop2000's Forum Posts

  • I'm on a 5-years old laptop with i7-3630QM, 8Gb RAM, mid-range SSD, Windows 8.1 64-bit.

    Using C2 build 246.

    Startup time for me is always about 5-6 seconds, even after system restart.

    Not bragging, just providing information

    Many people here with this issue have much better computers, which is really odd...

  • Wow, R0J0hound, you never seize to amaze!

  • Hi miggymax

    Have you sent it? I received an email from "Justin", not sure if it's you?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Tetris is a pretty complex game, are you saying you made it by yourself? And you are asking how not to destroy blocks?

    This is all very strange.

    If your question is genuine, please consider posting your capx or a screenshot of your event sheet.

  • If there are performance issues, try increasing the tile size to 2x2. The edges will look a little bit rougher but the performance should be much better.

    I just noticed than in my demo there are 2 identical instances of tilemap object, one on top of another. And it still works pretty fast

  • I think you need to install NW.js

    https://www.scirra.com/manual/162/nwjs

    Then when you export your project from Construct 2, there will an option to select NW.js and it will make the .exe file.

  • I think you need to add gamepad number after "Gamepad":

    angle(0,0,Gamepad(0).Axis(0,0),Gamepad(0).Axis(0,1))

    angle(0,0,Gamepad(1).Axis(0,0),Gamepad(1).Axis(0,1))

    etc.

  • Is there a reason why you need JSON?

    You can install Rex's CSV plugin:

    It's great and I'm using it heavily in my games.

    Another option would be parsing CSV into 2D-arrays with events.

    This is quite easy -

    First loop breaks the file into lines using tokencount/tokenat and line break as separator.

    Second loop breaks each line into values with tokencount/tokenat and comma as separator.

  • Do you see if question object actually contains any text after you click it?

    Maybe there is a space before/after the word? Try adding trim() to remove all spaces and line breaks.

    If question.text is empty, maybe you need to add Round or Int before Random(0,26).

    Also, in event #3 you can use loopindex instead of i.

    If nothing helps, could you share your capx?

  • How can I control which player will be controled by which gamepad. I added player number variables.

    See my first comment.

    Before the game starts, ask each player to press a button. Save gamepad number for each player in a variable/dictionary/array.

    When in the game a button is pressed on gamepad N, you will know which player pressed it.

  • Yeah, if you need very complex (or non-polygon, rounded etc.) shapes and pixel precision, the only option is canvas plugin.

    Or you can make some shapes like pixel-perfect circles, ovals, sine waves etc. with math formulas.

  • matriax

    Yes, your method of building tilemap is definitely better if buildings are rectangular. With complex shape buildings you might need to check overlapping for every pixel.

    What do you mean by sprites with alpha? Your buildings will have transparent parts ("windows") and you want to remove tiles in windows?

    You can make windows as another separate invisible sprite.

    So first you fill tiles where building sprites are, then erase tiles where window sprites are.

    Edit: Made a demo, with complex-shaped windows!

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

    Cheers for the coffee! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    Although it's all based on R0j0's original idea, you should be thanking him.

  • Here is an idea - set "Blend mode=source atop" for buildings and use tilemap as a mask. (and also as a solid surface for tanks)

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

  • I used it to output debug information (Browser->Log)

    https://www.scirra.com/manual/110/browser

  • Yeah, the order of conditions in an event matters.

    "If spr_test.var=0 -> Pick a random instance" first picks all instances with var=0 and then selects one random from them.

    "Pick a random instance -> If spr_test.var=0" first picks a random instance from all instances, and then checks if its var=0. If var<>0, the whole event will not be executed.

    By the way, you can optimize this code a bit. If you add Sprite1, Sprite2, Sprite3 to a family, you can spawn SpriteFamily and a random sprite will be created.

    For each spr_test Order By random(1) -> spr_test Spawn SpriteFamily
                                            spr_test Destroy
        If loopindex=4                   -> Stop loop   
    [/code:1xsq5tgj]
    
    That's it!