ID:160116
 
I've recently added some sound to my game, and I was informed that the sound files are downloaded onto each person that plays computer. I was just wondering if there's anyway I can secure these files so that they can only be played by my game.
Fenon wrote:
I've recently added some sound to my game, and I was informed that the sound files are downloaded onto each person that plays computer. I was just wondering if there's anyway I can secure these files so that they can only be played by my game.

Nope. Resources like icons and sound are inherently insecure. If it can be seen or heard by the client, it can be copied. While we may eventually consider putting in some sort of encryption into the resource file, ultimately nothing will stop anyone who's determined to make a copy.

Lummox JR
In response to Lummox JR (#1)
Was my post deleted sir?
In response to Haywire (#2)
Begger... My sound files are only slightly edited from the free sound files I downloaded, but even so.

While I have a topic about sound I might as well ask this other question: If I have a lot of things making sound around the game but the player isn't within the view of the sounds will the get a lot of lag?
In response to Fenon (#3)
I'm not really sure of the lag but...

Better yet why not send only to the people in view?

Haywire
In response to Haywire (#4)
It should only be sent to those people in view, I'm just wondering if all those sounds playing will cause a strain on the hosts computer causing everyone to lag.

This is what I'm using.

view(7) << 'A.wav'

I'm going to add fading sounds to the game when I work out how.
In response to Fenon (#5)
Firstly, is it not sound() which sends the music.

Secondly, As I said earlier I have no clue if it strains the host or not?

Best thing would be to test it, in consideration to BYONDs capibility it should just about be able to handle it.

Haywire
In response to Fenon (#5)
Fenon wrote:
It should only be sent to those people in view, I'm just wondering if all those sounds playing will cause a strain on the hosts computer causing everyone to lag.

This is what I'm using.

view(7) << 'A.wav'

I'm going to add fading sounds to the game when I work out how.

I'm fairly certain that sound is only output to /clients (or movable atoms belonging to /clients), since it would neither be required, nor make any sense, to play it to anything else. Don't take my word on that as law, though.
Well yes they are cached If I recall correctly, also if I recall correctly again, I think BYOND doesn't download a file more than once into a cache, nor do any other programs that I know much of. Other than that you may encrypt the music file with a DLL.

My post in based on the reason that you're trying to stop them using you're cached files after joining your game?

EDIT: THIS POST WAS MEANT TO BE ONE OF THE FIRST POSTS I JUST FORGOT TO CLICK POST =)

Haywire
In response to Fenon (#5)
Fenon wrote:
view(7) << 'A.wav'


I recommend using OGG instead of WAV.
It like like using PNG over BMP.

It is like siding with the godfather instead of a clinically-insane person.

It is better because it keeps (nearly, though the difference is negligible) the same quality with a MUCH lower size.
In response to GhostAnime (#9)
GhostAnime wrote:
Fenon wrote:
view(7) << 'A.wav'


I recommend using OGG instead of WAV.
It like like using PNG over BMP.

It is like siding with the godfather instead of a clinically-insane person.

It is better because it keeps (nearly, though the difference is negligible) the same quality with a MUCH lower size.

I would rather side with a clinically-insane person, but I was wondering if there was a better file type to use. I know nothing about music and not much about computers/file types. Drat my editor doesn't have that type of save file...

Thanks.
In response to Haywire (#8)
If I encrypt the sound files will Byond be able to read them?
In response to Fenon (#5)
I don't think it'll strain the host too much, since the files are cached on your computer...

And like Ghost said, use .ogg. Same quality, lower size.
In response to Fenon (#11)
Nope, Haywire, that won't work unless BYOND gets its own encryption/decryption. If you encrypt it, BYOND won't be able to read it. If you decrypt it, BYOND will be able to read it, and players will be able to steal it.
In response to Fenon (#10)
Fenon wrote:
I would rather side with a clinically-insane person, but I was wondering if there was a better file type to use. I know nothing about music and not much about computers/file types. Drat my editor doesn't have that type of save file...

Thanks.

Nope, no better type. OGG is the smallest you'll get without MP3, and BYOND doesn't support MP3's (it could, but that would involve some license-related things...).

Also, just find an mp3 to OGG converter if you really need to. Or, if it's a simple file, use MIDI (which is very small, but is limited).
In response to Jeff8500 (#14)
Jeff8500 wrote:
Or, if it's a simple file, use MIDI (which is very small, but is limited).

Pretty much any of the mod formats are better than MIDI. They're almost as small (at least smaller than a .ogg version), but sound far better and the sound you get is consistent.
In response to Jon88 (#15)
Yeah I was looking at Midi's but the sound is so bad, it sounds like one of those little electronic keyboards (I forget the name). I'll look into the OGG thing tomorrow, I've already reduced the size of my wav files just about as much as I can, my footstep sound is only 14kb (That one needs to be really small) and some of the music was between 10-20mb and the 20mb one was reduced to 1.39mb (That ones still too big, but others are about 300kb) there is a definate drop in quality even to my untrained ears. I want all the sounds to be tiny, with some of the (Old) larger files the game froze for a second while the sound loaded.
In response to Fenon (#16)
Wow that 20mb file which I reduced to a 1.39mb file, is now 200kb and the quality isn't too bad. The footstep file was 14kb, it's now 5kb.
In response to Haywire (#6)
Is it possible to right click the music files and click property and security to prevent others from opening it and using it.
In response to N0RIP Productions (#18)
No, because BYOND will still have to play it.