abho's Forum Posts

  • I saw the improvements, I think they'll help a lot! I'm still not a fan of the workflow of having to 'list contents' first, but I think the recursive option will be a huge help in how many times it realistically has to be called.

  • Call me silly but I don't fully trust "Wait for previous actions to complete" I almost always use the trigger conditions.

    Yeah, I also do not consider using "Wait for prev." to be an option. It will always wait for previous actions, but it was recently discovered that it also waits for actions outside of the event's scope.

  • I don't mind FileSystem having async operations much. It does lengthen workflow, but I'm surprised NW.js wasn't async anyways.

    Why would the app know what's on disk without checking?

    I dunno, but NW.js seems to know. All I need is a folder path and it can read a file from it. NWjs.ReadFile(dir)

    Outside of sync/async, is that something WebView2 just isn't capable of for technical reasons?

    I guess it could work recursively, but then that is potentially a very slow operation if it is going to end up reading through a lot of folders. That kind of thing definitely cannot be synchronous.

    I would love the option. Maybe a toggle?

    Lastly, I would still like the FileTag workaround I found to be not necessary. You didn't really address the difficulty in using FileSystem with an unknown/customizable amount of files.

  • I used to use NW.js for file operations, but recently tried out FileSystem so that I can support WebView2.

    Technically, there's nothing that's not doable with FileSystem, but the workflow felt cumbersome.

    - 'List contents' has to be run before 'Has file/folder' can be done.

    - You have to 'List contents' even for known directories like "<documents>"

    - 'Has file/folder' cannot be done with a folder path afaik, you have to 'List contents' again if you want a subfolder.

    - To read any file, you need another event, 'On file operation complete'

    - You can't send any data with the read file operation, nor get the name or location of the file. The only data available is FileSystem.FileText

    - If the FileTag of the file operation is varying or unknown, you need to use 'On any file operation complete' and then compare the FileTag. I found the workaround of setting the FileTag to something like...

    "readFile " & fileName & " " & fileDir

    ...to be a good way to send data with the request, then I can get these values with tokenat(FileSystem.FileTag, n, " ")

    The reason I need more data with read file operations is because I have worked on a few games with level editors, and on a recent one, user levels are saved in a location and the player can make as many as they want. Since I don't know how many levels they may have, loading these levels into the in-game UI becomes a little more complicated. I've also experimented with making games moddable, where levels might be loaded from lots of JSON files and assets.

    In any case where the amount of files is unknown, it becomes more annoying to work with FileSystem.

    NW.js's workflow was very compact and easy in comparison, even ignoring the fact that it's synchronous.

  • There's a lot of files in the link you posted (zlib). How do I know which ones to import?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • A lot of it is actually backslashes. I am using dictionaries.AsJSON inside of arrays, and then the arrays are stored as JSON inside another array, so all of the "s have backslashes in order to properly store them. I don't know how I can make that any better.

    Is there any documentation on how to import a JS library into construct? I've been searching all day and haven't found anything.

  • I'd really just like to know how to compress strings please.

  • I also want people to be able to post the string over discord without it being so long that it goes past the preview limit, so there's another reason than just sending it over the server. In bytes, the average string is about 30k large, but it can become even bigger.

    Please help me figure out how to compress the string.

  • In my game, players can make levels. The levels are then stored into a really long string.

    What's the easiest way to compress the string so that it could be sent across a server?

  • As it turned out, the issue had to do with the project file icons being set up incorrectly. I've resolved the issue now.

  • I'm exporting my game with NW.js, and I want to be able to change the icon. For some reason, the WindowsIconUpdater application just doesn't work. It works for other projects just fine, but for my specific one it spits out this error.

  • You do not have permission to view this post

  • If I were to make a replay system in my game based off of inputs, would the physics behavior display the same behavior every replay? It seems pretty random at the moment.

    Tagged:

  • UPDATE: I figured it out, but not in a great way. What I did was give the platform a child object that was slightly bigger than the hitbox, and then added an on collision event with the child object. From there, I performed the same "is entity in front?" check.

    Problems with this method: One, it may glitch out if multiple entities are near the same platform. Two, the player might skip the child object event if their fps is low or something, and end up bumping into the platform before it can be adjusted. (not sure if the second one is true)

  • I had to stop using the Jump-Thru behavior for my one-way platforms because I wanted the ability to angle my one-ways in 4 directions. So I did that, and programming it is simple. If player is in front of platform, enable solid.

    The problem is that I have multiple player objects... I consider moving boxes and enemies under the 'entities' family, alongside the actual player. All of these also use platform behavior and I need them to display the same interaction described above, simultaneously. That, I have no idea how to do.

    Any ideas?