Sep. 12th, 2018

Work Post

Sep. 12th, 2018 05:40 pm
relee: Picture of Relee Starbreeze, Wizard (Default)
5:40pm - I'm at the library near my apartment today since I don't think I can afford to work at the McDonalds this month, with all the other things I need to pay for and have already paid for. My Roomie is away from work for the next month and a half so it's hard to work at home, and the Library is the next best thing. Usually when I've come to work here it's been full of people, but today there's hardly anyone and nobody at the good table. So I'm in luck I guess, or maybe it's just the time of day?

Anyways I'm pretty excited because I came up with a solution for my save/load problem with C# .NET and Unity. I was thinking I'd have to serialize each world independantly, along with an object containing random data, but then I realized just yesterday that I could put references to all of the Worlds and the random data into a single super object just for serializing and saving. A SaveGame object!

This way I can serialize it all at once and put it all in one file neat and tidy. The only problem that remains is actually doing it. I don't have all of the data I want to save modeled yet. I'm considering putting off the save/load functions until a little later, but I'm not sure. I should be able to grow the SaveGame class as the project grows; of course it will render old save games incompatable but that's fine during development.

5:57pm - I'm putting it a bit together now. I made the SaveGame empty class, added some neccesary headers, and made it [Serializable()] and that all seems good so far.

But before I can put it all together I need to make all my Model classes Serializable as well, and decide on a format for the SaveGame class.

I double-checked the original GDD and this first game will have a maximum of 56 World objects. One for each floor of the dungeon, and one for each stage of the town. I wasn't originally planning for the player to be able to go back to previous levels, and I'm still not sure that's something I want in this first game, but it's definately something I want in later games using this code, so I'm up in the air about what to do.

I do think that the dungeon should rebuild itself whenever the player exits though. Not entirely, mind you. Each level of the dungeon will be built when the player reaches it. I don't want to have to build all 50 levels at once every time the player enters, since that'll take a while probably, and it's unlikely that the player will go through all the levels every time.

After giving it some thought, I've decided to allow retraversal; going backwards through the levels. It's allowed in the games I'm using for inspiration; some of them anyways. Nothing new will appear in levels you've already been to, so there's limited advantage to going back. Mostly it'll allow the player to go back to town without using an item, if they have enough hunger-meter to get all the way back, or enough food.

If the player exits the dungeon all the way though, the levels they've been to reset.

6:28pm - Anyways, the idea is that the SaveGame class will have an array or a list of worlds. Probably an array set to 56 elements.

There'll also be another class put into the SaveGame class from the model, which I haven't made yet. A data class for storing player progress and such.

6:55pm - I made the basic empty SaveGame and GameProgress classes. So that's something. I've already been at this for over an hour, time sure flies.

7:18pm - I'm having a hard time thinking up what to do next. I don't have everything ready for saving and loading yet. I've got the 15 steps open and I'm thinking about moving to the next one and doing the loading/saving later when I've got something to load/save.

7:22pm - The more I push the less I'm feeling it. I don't think I can work anymore right now. Shoot. Only an hour and a half, and most of that planning. :/

Alas.

Profile

relee: Picture of Relee Starbreeze, Wizard (Default)
Relee Squirrel

July 2023

S M T W T F S
      1
23456 78
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 30th, 2025 10:36 pm
Powered by Dreamwidth Studios