BattleJenkins's Recent Forum Activity

  • I'm working on a game that could really benefit from being able to read, write, and share data in the form of QR codes, but I can't seem to find any resources for doing that in Construct 3 - C2 seems to have a few of them available, but I couldn't find any C3 equivalents. Does something like this exist yet?

  • Also the PlainText expression doesn't exist on the Sprite Font object type for some reason! You can copy the text to a separate Text object to get the PlainText there as a workaround, but it's a bit inconvenient.

  • Checking it against my own current method, which actually does account for checking tiles multiple times, it seems about the same - in any case, there's probably more optimization gains to be made elsewhere besides the flood fill method itself (like restricting it to only relevant areas on a bigger map, or only checking when potential loop-closing pieces are placed). One thing I've done to make it a little less CPU-intensive is to only run the loop ~200x a frame instead of making it a 'while' loop and having the tilemap update visually after it's complete (using a separate tilemap object) - that way, it doesn't cause the game to hitch and the delay can easily be worked into the animation aspect with ample time for the logic to complete before it updates the map visually.

    That said, seeing your example did help me clean it up in places and eliminate some unnecessary variables, so I appreciate the help all the same!

  • Got it! Thanks a lot for your help - it looks like I was on the right track generally, but this implementation is much more elegant.

  • Woah, neat...! Is there any way to tweak it to where diagonally adjacent tiles don't count as enclosed?

  • Hi there! I'm starting to tinker around with new projects, and I'm interested in making a puzzle game where creating closed-off spaces on a tilemap is part of the gameplay - as such, I'm experimenting with flood fill methods, but I can't seem to get one that works efficiently and instantly.

    Here's my quick and dirty example - left click places walls, right click erases them, and middle click wipes the board and checks for enclosed spaces. (adjacent corners don't count as enclosed for my purposes!)

    battlestudio.com/tilefill

    And here's the .capx file:

    battlestudio.com/tilefill/TileFlood.capx

    As you can see, it works, and you can watch it work, but it's definitely way too slow. I'm sure there must be some ideal, optimal way of doing this - I'm hoping for something efficient enough that I can check it every time a piece is placed on the board without bogging things down. Any help would be appreciated!

    -- EDIT: UPDATE --

    I did a bit more tinkering and I think I found a solution! I'd still appreciate having my work double-checked though:

    battlestudio.com/tilefill-2

    And the .capx:

    battlestudio.com/tilefill-2/TileFloodFill-v2.capx

    This time around, instead of creating a sprite that multiplies itself, it adds the tiles to change represented by coordinate strings in an array - the array serves as a queue of tiles to check, and behaves much like the flood fill object did, but this time it runs in a 'while' loop and thus happens instantly. It seems to work well! Is this the best way to go, or are there even more efficient solutions? I noticed if I add any animated elements, it does hitch slightly upon flood-filling, so any even more optimized solutions would be appreciated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Turns out I was using the wrong Steam SDK version. I fixed that and now it's working great! Wahoo!

  • For the record, I tried downgrading to NW.js 0.28 and seeing if it would work that way, but when I did the window wouldn't even open at all. I switched back to NW.js 0.32 and I'm back to getting the black screen.

  • Heya! I followed all the instructions in the Quick Start guide, and just made a build of my game with some achievements set up (both published in Steamworks and in my client) - but whenever I launch the game (either by itself, or after replacing the local files and launching it through Steam) I get a black screen with nothing going on. I see a few others have had this issue - is there anything I might be doing wrong that's causing it?

  • Gotcha! I'll use 0.32 until then.

  • Hey there! Just checking in - does this plugin work with the latest version of nw.js (v0.33.3)?

  • I fixed it! Apparently, the solution was to delete all color profiles in the Windows color management tool.

    whatever.

BattleJenkins's avatar

BattleJenkins

Member since 13 Jul, 2013

Twitter
BattleJenkins has 1 followers

Trophy Case

  • 11-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

13/44
How to earn trophies