![]() |
|
[C#] Virtual21 - 21 Game Simulator - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Visual Basic & .NET Framework (https://sinister.ly/Forum-Visual-Basic-NET-Framework) +--- Thread: [C#] Virtual21 - 21 Game Simulator (/Thread-C-Virtual21-21-Game-Simulator) |
[C#] Virtual21 - 21 Game Simulator - VirtualFrost - 09-23-2016 https://github.com/VirtualFrost/Virtual21 This is the second project I have completed in C# so all feedback is really appreciated. Also I want to possibly try get it so it saves data so each time you quit and come back it all stays there, just not sure how I want to save it unless I make it create a directory on their computer under My Documents or something. Apart from that, feel free to try it out, break it etc and I hope you guys like it! RE: [C#] Virtual21 - 21 Game Simulator - Bish0pQ - 09-23-2016 Looks pretty good already, would be interesting to see how this turns out. For what you asked and saving the data, you could link to an online Access or SQL database? Or you can create a directory in the same directory as the file is ran from. I don't know what it is exactly in C# but in VB.NET it would be Code: Dim strStartupPath as String = My.Application.Info.DirectoryPath & "\Foldername\"
If Directory.Exists(strStartupPath) = True Then
'## Do something
Else
Directory.Create(strStartupPath)
End ifRE: [C#] Virtual21 - 21 Game Simulator - hybris.softwares - 09-23-2016 you could create a json file to store settings, and save it as "settings.json" inside the program folder. Use this library to handle json : http://www.newtonsoft.com/json Regards, Hybris RE: [C#] Virtual21 - 21 Game Simulator - Bish0pQ - 09-23-2016 (09-23-2016, 01:27 PM)hybris.softwares Wrote: you could create a json file to store settings, and save it as "settings.json" inside the program folder. ^^ Even better than what I suggested. RE: [C#] Virtual21 - 21 Game Simulator - VirtualFrost - 09-23-2016 (09-23-2016, 12:17 PM)Bish0pQ Wrote: Looks pretty good already, would be interesting to see how this turns out.I would have considered SQL but as of now I have no web servers to run a database on to store information so I'm only thinking locally as of now. (09-23-2016, 01:27 PM)hybris.softwares Wrote: you could create a json file to store settings, and save it as "settings.json" inside the program folder.I'll check that out in the morning, thanks! I've also had pointed out to me about the random being initialized each button press and that has been fixed. RE: [C#] Virtual21 - 21 Game Simulator - hybris.softwares - 09-23-2016 (09-23-2016, 02:38 PM)VirtualFrost Wrote:(09-23-2016, 12:17 PM)Bish0pQ Wrote: Looks pretty good already, would be interesting to see how this turns out.I would have considered SQL but as of now I have no web servers to run a database on to store information so I'm only thinking locally as of now. The button initializing random each time would not be a real security issue, unless the player is able to click it multiple times per millisecond, which i think is pretty impossible. Btw, Good work! RE: [C#] Virtual21 - 21 Game Simulator - Bish0pQ - 09-23-2016 (09-23-2016, 03:10 PM)hybris.softwares Wrote: The button initializing random each time would not be a real security issue, unless the player is able to click it multiple times per millisecond, which i think is pretty impossible. There are very simple tools for that though. For example DoItAgain, but still who would bother? RE: [C#] Virtual21 - 21 Game Simulator - VirtualFrost - 09-24-2016 (09-23-2016, 03:10 PM)hybris.softwares Wrote:Oh no not a security issue, just unnecessary to need to keep doing it. Basically trying to practise to do things 'properly' so I won't have these minor mistakes when I create bigger projects.(09-23-2016, 02:38 PM)VirtualFrost Wrote:(09-23-2016, 12:17 PM)Bish0pQ Wrote: Looks pretty good already, would be interesting to see how this turns out.I would have considered SQL but as of now I have no web servers to run a database on to store information so I'm only thinking locally as of now. and thank you! My last two projects are kinda small, I'm just trying to find ways I can go just a little bit further each time, next one I'll probably end up making is just a basic MySQL login, I feel I could do this so it should be exciting for me. EDIT: Ahh such a rookie mistake, I forgot to clear the Computers value each time a new game started so it kept the same value from the last game. |