Login Register


[C#] Virtual21 - 21 Game Simulator filter_list
Author
Message
[C#] Virtual21 - 21 Game Simulator #1
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!

Reply

RE: [C#] Virtual21 - 21 Game Simulator #2
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 if
~~ Might be back? ~~

Reply

RE: [C#] Virtual21 - 21 Game Simulator #3
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

Reply

RE: [C#] Virtual21 - 21 Game Simulator #4
(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.

Use this library to handle json : http://www.newtonsoft.com/json

Regards,
Hybris

^^
Even better than what I suggested.
~~ Might be back? ~~

Reply

RE: [C#] Virtual21 - 21 Game Simulator #5
(09-23-2016, 12:17 PM)Bish0pQ Wrote: 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 if
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.

Use this library to handle json : http://www.newtonsoft.com/json

Regards,
Hybris
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.

Reply

RE: [C#] Virtual21 - 21 Game Simulator #6
(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.

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 if
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.

Use this library to handle json : http://www.newtonsoft.com/json

Regards,
Hybris
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.

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!

Reply

RE: [C#] Virtual21 - 21 Game Simulator #7
(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.

Btw,
Good work!

There are very simple tools for that though. For example DoItAgain, but still who would bother?
(This post was last modified: 09-23-2016, 03:13 PM by Bish0pQ.)
~~ Might be back? ~~

Reply

RE: [C#] Virtual21 - 21 Game Simulator #8
(09-23-2016, 03:10 PM)hybris.softwares Wrote:
(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.

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 if
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.

Use this library to handle json : http://www.newtonsoft.com/json

Regards,
Hybris
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.

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!
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.

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.
(This post was last modified: 09-24-2016, 12:26 AM by VirtualFrost.)

Reply







Users browsing this thread: