munawarb / Three-D-Velocity

a fighter jet flight Simulator for the blind and visually Impaired
GNU Affero General Public License v3.0
24 stars 18 forks source link

Trouble using GitHub and GitShell with NVDA and a few other things #24

Closed GreenGablesFan closed 6 years ago

GreenGablesFan commented 7 years ago

Hello, I am interested in how programming works, and I'd like to examine the source code, including how sounds are encrypted so that no one can use them unless they know how to decrypt the sounds. Unfortunately, I don't know where to put the git clone recursive commands, and I'm not sure how accessible GitHub or GitShell is. Finally, how do you obtain the IP address or create a domain for players to connect to? If someone were to continue building this project, how would we get the game to automatically connect to the server without asking for a domain or IP address, such as in the case of other audio games, like Survive the Wild, Entombed, etc? If you can answer my questions that would be excellent. Ulysses from Facebook

munawarb commented 7 years ago

Hi @GreenGablesFan, You asked a few questions here and I'll try to address them as best I can.

I am interested in how programming works, and I'd like to examine the source code, including how sounds are encrypted so that no one can use them unless they know how to decrypt the sounds.

Ok. Sounds in TDV aren't encrypted since it's now open source, but the code to encrypt the sounds still exists in the BPCSharedComponent library. Loading the project and finding the relevant point in the code is beyond the scope of this issue I think, since you need to get familiar with C# and Visual Studio. For that you can find many helpful tutorials online. What I can tell you is that the code to encrypt the sounds is in the file shared/BPCSharedComponent/Encrypter.cs. But, it's not used in the open source version.

Unfortunately, I don't know where to put the git clone recursive commands, and I'm not sure how accessible GitHub or GitShell is.

I use the Git Shell; it's just like a regular command prompt. When you install Git, just run the regular command prompt (cmd.exe) and type git clone --recursive...

You can enter all your Git commands in the regular Windows command prompt once you have installed Git.

Finally, how do you obtain the IP address or create a domain for players to connect to? If someone were to continue building this project, how would we get the game to automatically connect to the server without asking for a domain or IP address, such as in the case of other audio games, like Survive the Wild, Entombed, etc?

You can get someone's IP address by asking them for it. If they set up the server, they'll know their IP address and this is what you'll use to connect.

As far as having the game automatically connect, I won't be putting in such a feature because of the open source nature of the game now. When it was commercial, it was automatically connecting to bpcprograms.com. I've removed that and explicitly ask for the IP so that you can connect to whichever server you want.

If you want to modify the source code to connect to your server automatically, you'd have to find the point in the code where the game asks for an IP and call sign, and change those lines of code to bypass the prompt and instead hard-code a domain or IP to connect on.

Let me know if you have any more questions and I'll be glad to help.

GreenGablesFan commented 7 years ago

Thanks for all this information, @munawarb! L-)

I forgot to mention that I had always curious as to how developers made it possible to process orders on-line, generate keys, utilising the registry, knowing if a license is valid, yata yata yata, including things like not using the computer's date change to restart a game's free trial. I haven't been able to fully get all of these answers, as the majority of people I have spoken to have given me cryptic ones. If you can explain how this works, or if there are any left-over files that allow you to process orders, that would be excellent.

Finally, what is the command for finding out what your IP address is? I remember reading about a command that one could put into CMD to have their main IP and local IP. As to have that IP connected to a domain name using ICAN and DNS records would a completely different topic.

=Ulysses

On 5/3/2017 12:43 PM, Munawar Bijani wrote:

Hi @GreenGablesFan https://github.com/GreenGablesFan, You asked a few questions here and I'll try to address them as best I can.

I am interested in how programming works, and I'd like to examine
the source code, including how sounds are encrypted so that no one
can use them unless they know how to decrypt the sounds.

Ok. Sounds in TDV aren't encrypted since it's now open source, but the code to encrypt the sounds still exists in the BPCSharedComponent library. Loading the project and finding the relevant point in the code is beyond the scope of this issue I think, since you need to get familiar with C# and Visual Studio. For that you can find many helpful tutorials online. What I can tell you is that the code to encrypt the sounds is in the file |shared/BPCSharedComponent/Encrypter.cs|. But, it's not used in the open source version.

Unfortunately, I don't know where to put the git clone recursive
commands, and I'm not sure how accessible GitHub or GitShell is.

I use the Git Shell; it's just like a regular command prompt. When you install Git, just run the regular command prompt (cmd.exe) and type |git clone --recursive...|

You can enter all your Git commands in the regular Windows command prompt once you have installed Git.

Finally, how do you obtain the IP address or create a domain for
players to connect to?
If someone were to continue building this project, how would we
get the game to automatically connect to the server without asking
for a domain or IP address, such as in the case of other audio
games, like Survive the Wild, Entombed, etc?

You can get someone's IP address by asking them for it. If they set up the server, they'll know their IP address and this is what you'll use to connect.

As far as having the game automatically connect, I won't be putting in such a feature because of the open source nature of the game now. When it was commercial, it was automatically connecting to bpcprograms.com. I've removed that and explicitly ask for the IP so that you can connect to whichever server you want.

If you want to modify the source code to connect to your server automatically, you'd have to find the point in the code where the game asks for an IP and call sign, and change those lines of code to bypass the prompt and instead hard-code a domain or IP to connect on.

Let me know if you have any more questions and I'll be glad to help.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/munawarb/Three-D-Velocity/issues/24#issuecomment-299014610, or mute the thread https://github.com/notifications/unsubscribe-auth/AayeU_FWAIBkTdXsFrhkODosJgNlBbxWks5r2NjYgaJpZM4NPR6f.

munawarb commented 7 years ago

Hi @GreenGablesFan,

I forgot to mention that I had always curious as to how developers made it possible to process orders on-line, generate keys, utilising the registry, knowing if a license is valid, yata yata yata...

How you process orders online is dependent on what system you use for payment processing. I used to use PayPal. They allow you to enter information that will send a notification to your server when someone makes a purchase. Your server then takes that information and generates a license. That license unlocks the game for the purchaser. For example, I would ask the user for their hardware ID during their payment, and the payment would not process unless they provided this ID. Once my server received a notification from PayPal that they'd made a purchase, it would send me the hardware ID they provided. With the hardware ID in hand, it's easy enough to generate a license and deliver it to the user.

Generating a license is also a highly custom process, which is probably why you're not getting direct answers. Typically it involves finding some data that is unique (such as a MAC ID or drive serial number) and encrypting it. The encrypted form is called the license. The trick is to make the encryption process elusive enough where it's hard to guess how your game generated the encrypted version of whatever unique string you used. There are infinitely many ways to generate the license. You can complement bits, use a cipher pad, etc. Getting into encryption means you should have an understanding of encryption algorithms and it's far beyond what we'll discuss here. Essentially it boils down to taking the unique string and "playing with it."

Once you have your encryption procedure down, testing for a valid license is simple. Your game will have the unique string, and the license, both of which are provided to it as part of the registration process. The game then takes the unique string, and performs the encryption on it to get the license. If the license it generates matches what the user said their license was given the unique string, the license is valid.

For example, assume you had a unique string X, encryption algorithm E, and resulting license Y. During payment, the user provides X. X is put through E, and results in Y. This is all done by the server. The user then provides Y to the game.

Next, when the game loads, it either knows X already because it's generated by a hardware fingerprint or a self-generated unique string, or it's been provided to the game by the user. The game knows E, so it does exactly what the license server did: it puts X through E, and gets Y (we'll call this Y'.) Finally, if Y is equal to Y', the license is valid.

including things like not using the computer's date change to restart a game's free trial.

For this, all you have to do is find some super-secret place on the computer to store the trial information, like a hidden file somewhere. Only your game knows where that hidden file is. You can keep track of the trial expiration and all that in there and not rely on the date.

If you can explain how this works, or if there are any left-over files that allow you to process orders, that would be excellent.

There are none left in TDV. I stripped it of all that before releasing it as open source.

Finally, what is the command for finding out what your IP address is?

Just type ipconfig at the command prompt.