A strange request for Construct 1....

New releases and general discussions.

Post » Fri Aug 27, 2010 5:10 am

[quote="6Fix":ypo1kns5]Sensing a little defensive response there, so take it easy. I meant the need to rename something just to keep a casual user from realizing it's an image/whatever. That's the silly part.

I don't think the extension issue itself is silly, so relax.[/quote:ypo1kns5]

He explained his reasons quite well. If you can't see what Krush is talking about and think it is silly, then really it's your opinion. It's also fairly obvious you either didn't read, or didn't fully understand his post explaining why.

Not intending to nit-pick... but you should really avoid reserving judgement for things that may not make sense to you.

*EDIT*
Just to clarify, so you don't think I'm being a bastard... I thought the same thing as you when I first read the original post. After reading Krush's reasoning/explanation I completely agree with what he says.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Fri Aug 27, 2010 5:32 am

You both are reading WAY too deeply into my use of silly ... and I am not even referring to the ability to change the extension. Merely the idea that it would be added security.

I read every word and in fact switch file extensions quite frequently for work. I fully support the fact that an ogg file (in this case) should load with a different extension ... my ONLY point was the security factor.

Edited for sarcasm :lol:
B
2
S
2
G
4
Posts: 156
Reputation: 1,762

Post » Fri Aug 27, 2010 6:03 am

[quote="6Fix":1gf5z8sv]Anyhow, please don't respond to me again, and let it go now. I realize you're the "King of OT" and somehow a moderator, but nothing else needs to be said.[/quote:1gf5z8sv]

Check your PM's

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Fri Aug 27, 2010 12:12 pm

Woah.
Time to take a step back 6Fix.
My reasons for wanting to change the file extension is genuine, and I don't think I could have done any more to explain the reasons for it.

If you don't get what I was saying, or don't agree with it, then fine.
But to say it is a silly request because of either reason is not right.

And if you have read my posts, you'll see that I never said it was for security reasons. Not once.
In fact, I went to great lengths to show otherwise.
Have you read the post where I explain what happened years ago with previous users messing with external files?
If so, your comments about security and the request being silly is even more baffling.
Maybe you've never released anything, and have never had to give support for it.

And as for defensive, damn right.
When someone who clearly hasn't bothered to read the reasons behind what I'm saying decides to make a judgement on it, I can't be anything else.

If Ash was to post here saying that allowing the renaming of ogg files would mean spending time away from more important things, or that XAudio2 does require file extensions, then I'd be glad of the info and look to other ways of deterring people from messing with files.

I have a couple of other ideas.
One of which is similar to what Ultimate Play The Game (Rare) used on their 16k Spectrum games in 1982, which ironically, I learned when taking their software apart nearly 30 years ago. lol

Thanks to Sol and everyone else who understood what I was saying, even if it was something that they had no use for themselves.

And thanks for not locking the thread.
I'm still hoping to hear from Ash on the subject.

Cheers,
Krush.
B
2
S
2
G
3
Posts: 406
Reputation: 2,062

Post » Fri Aug 27, 2010 12:39 pm

Is this specific to XAudio2? You didn't mention XAudio2 in the OP, but it should be pretty straightforward to tweak the file loader if it's just that. (Sorry, in a rush, answer might be in the thread somewhere)
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Fri Aug 27, 2010 1:35 pm

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.
B
5
S
2
G
3
Posts: 234
Reputation: 1,818

Post » Fri Aug 27, 2010 2:01 pm

[quote="Ashley":3cyg1xy9]Is this specific to XAudio2?[/quote:3cyg1xy9]
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.
B
2
S
2
G
3
Posts: 406
Reputation: 2,062

Post » Sat Aug 28, 2010 5:01 pm

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. :)
B
3
G
2
Posts: 31
Reputation: 737

Post » Sat Aug 28, 2010 5:45 pm

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\ 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\ 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.
B
2
S
2
G
3
Posts: 406
Reputation: 2,062

Previous

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests