dop2000's Forum Posts

  • I made a sprite font for you:

    dropbox.com/s/n4cxp1mfcbsy678/1999Carolina_SF.c3p

  • Have you tried "NWJS Run" action?

  • I was asking why the total of loops ran isn't the same in 'len(s) to 3' and '3 to len(s)'.

    It is the same! In both cases with 100 characters in the string, the loop will run 98 times.

    But if you start the loop from 3 to 100, at the end of the loop your loopindex will be at position 100, however the string will already be 130 characters long (because you've added ~30 spaces to it). So the remaining 30 characters at the end of the string will be left unprocessed.

  • You can run commands in NWJS. Not sure about sudo, but things like this work in windows:

    NWJS Run "start dir"

    This will open a CMD window and execute dir command in it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • With 8-direction it's a bit more difficult. You can move the character slightly up or down by directly changing its Y coordinate on every tick, for example:

    Character overlapping Vessel
     Character set Y to self.Y-20*dt
    

    However, this can mess with collision detection in 8-direction behavior. If there are solid walls or corners, your character may get stuck or shake.

    The proper way of doing this is by using 8-direction actions - "Set max speed" or "Set Y vector". For example, when the character moves in the direction of the water flow, you need to increase behavior max speed. When it moved against it, decrease the max speed.

  • I've explained this earlier:

    If your string is 100 characters long, and you start from 3 to 100, by the time you reach 100th character, the string will be around 130 characters long, because you are adding spaces after every 3rd character. So the loop will stop at 100 and the remaining portion (30 last characters) of the string will not be processed.

    If you run your loop in reverse, you avoid this issue.

    .

    Another option would be using a While loop, it will run until the full string is processed, even if it grows or shrinks:

    Local variable i=0
    While i<len(s)
    .....(process the string)
    .....Add 1 to i
    
  • Yep, ligatures work with "1999 Carolina" font.

    Can you use another version of this font without the ligatures? Or you can convert it to SpriteFont. I use this tool to easily make sprite fonts:

    construct.net/en/forum/game-development/tools-and-resources-27/sprite-font-generator-v3-64038

  • I think 4K will be an overkill for a mobile game. Full HD or 2K will look almost just as good, but will use much less space and memory.

    For PC you can choose 4K, as PCs are more powerful.

    Having graphics for two different resolutions in one game is also not a good idea. You should pick one resolution that is optimal in quality, size and performance.

  • I tried a font with ligatures, and they don't work in Construct, at least for me..

  • You can't do this. CSS only works with Form Control objects (Button, Text Input etc.)

    You can use BBcode with Text objects.

  • Not sure what you mean.. If you set A=5 and B=20, then "For A to B" loop will only run from 5 to 20, no matter if you change these variables inside of the loop.

  • len(s) is evaluated only once when the loop starts. If the initial length of the string is 100, then the loop will only repeat to 100, even if the string length changes while the loop is running.

  • Because the string grows when you add spaces to it.

    If your string is 100 characters long, and you start from 3 to 100, by the time you reach 100th character, the string will be ~130 characters long. The loop will stop and the remaining portion of the string will not be processed. That's why I'm running the loop in reverse.

  • You put "physics" as tags to this post, that's why I assumed you are using this behavior. If you are using other behaviors (Platform, 8-direction etc.), the solution will be different.

  • Are you using Physics behavior for player movement? You can apply a force when player overlaps blood vessels. For example, you can add an instance variable CurrentDirection, and use "Apply Force 100 at angle BloodVessel.CurrentDirection"