abho's Recent Forum Activity

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

  • Try Construct 3

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

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

  • 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

abho's avatar

abho

Member since 21 Jul, 2017

None one is following abho yet!

Trophy Case

  • 7-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

13/44
How to earn trophies