A strange request for Construct 1....

This forum is currently in read-only mode.
From the Asset Store
Casino? money? who knows? but the target is the same!
  • If this is at all related (or even if it's not) to how you can't reference sound files put in the Files folder by name in an expression, I am one who really wants that feature added. Doesn't warrant its own thread I don't think... I think I put it on the tracker once.

  • Is this specific to XAudio2?

    Yeah, I'm using .ogg files for both music and fx, loading them with

    -> XAudio2: Load file "c:\audio.ogg" to channel 1 (No loop)

    and then playing them with

    -> XAudio2: Set channel 1 position to 0 seconds

    -> XAudio2: Play channel 1

    All works fine across many layouts with the .ogg extension, but with a different extension I get no sound from that channel.

    No error message from Construct saying that it wasn't loaded.

    I even tried loading .ogg files without an extension, but I had the same result.

    Krush.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just my two cents, but this is probably why virtually every support service from game companies begins with... "reinstall your game and try again."

    Because I'm sure they've wasted countless hours trying to fix games people tinkered with and broke.

    Something else you could try is preemptive file screening. It would be a little bit of an upfront time sink, and possibly more complicated than it needs to be... but do an md5 hash of all your files and store them in your compiled source. Then at run time you could scan and compare your external files to the md5 hash (for example).

    If the file signatures don't match, politely inform the user there's a problem with the file, tell them to reinstall it, and quit.

    If you use thousands of external files, this would suck. If you use less than 50, it's probably not too difficult to do this. EDIT: Alternatively, you could zip archive your files and use zlib to access them... then just do one hash of the zip archive (this isn't hard to do in C++, but in construct it might be tricky... Though there are python zlib and md5 scripts out there).

    That's just one idear I had off the top of my head.

  • Yeah, I've had a quick test run with checking the files before the game runs, with some success.

    Another one that I'm thinking might be a winner:

    :: Place all external files in a \data[/b] folder with custom extensions

    :: Check files are present and correct size before running the game

    :: While the splash screens as showing at start of game, take each file, copy to \data\cache[/b] folder and rename to filenames and extensions that Construct can use

    :: Optionally, delete the renamed files on game exit, but that's not really important because they'll be overwritten next time the game is run.

    It sounds a lot, but with no more than 40 or 50 files at most, it'll be finished long before the splash screens are done, and the user won't notice anything.

    Krush.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)