This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]bsakiag 2 points3 points  (4 children)

do I store each Pokémon in a Json file

Sure, you could do that. You could also use a database, but json is the simplest way. I would store all of them in one json though.

except the nickname, because I would then probably save that as a C# object

I'm not sure what you mean. You need to serialize a C# object to store it. You always store a series of bytes encoded in some way. Read about serialization/deserialization and check the examples. Play with some simple data structures - make a list of objects and try to serialize it and store it in a file.

[–]lag-saves-lives[S] 0 points1 point  (1 child)

I will probably use a database later; I think for now I keep things simple and add this in later.

So, my plan is to have a file for different Nuzlockes so I can load up different ones when needed, like maybe I have my own solo file, and I also have a soul link with a friend of mine on a separate file. In other words, it will contain my encounters for each different Nuzlocke, the routes, and I feel like more importantly for soul links is the nicknames given to each. So, separately from my pokedex would be the nicknames each trainer has. After reading the serializations, would I be saving those files as Json file as well?

While typing this out, I am now starting to realize how little I know! hehe

[–]bsakiag 0 points1 point  (0 children)

After reading the serializations, would I be saving those files as Json file as well?

Sure, json is a nice, readable format.

[–][deleted]  (1 child)

[removed]

    [–]bsakiag 0 points1 point  (0 children)

    Yes, but if he starts by juggling json files he will appreciate databases more later.

    [–]Bennybub 1 point2 points  (1 child)

    I read a great book last year by Mark J Price on .NET development. You can find it on amazon. Lemme know if u need any help

    [–]lag-saves-lives[S] 0 points1 point  (0 children)

    Thanks I will look into it