![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
5:58pm - Well today was an interesting one. I got up really early in order to trim my beard and have a nice long shower before an appointment, but the appointment had to be postponed since one of the ladies I was going to see was ill. Alas. ^.^;;
It's probably a good thing I trimed my beard and showered anyways, right? I don't do that enough. :P
Anyways I'm getting a bit burned out on video games all the time and I thought the best solution would be to not go back to bed and ruminate for hours but instead to work on my video game projects!
I say projects but I hardly ever work on anything besides the Roguelike project, do I? XD
Last time I worked on it I had some trouble with the serialization loop warning because I had a List of Actors which circuitously had a reference back to the World that was listing them. Oddly I didn't have this issue with the Linked List of Actors I already had in the World. This makes me worry that either my Linked List won't be serialized when I try to save the game, or that the loop will occur in that one too but it doesn't get a warning because it's too complex and trusts me to know what I'm doing. ^.^;;
I'm at a bit of an impasse because of that problem though. See, I was considering using Object Pooling of indexes to overcome the problem of the List issue, but then it occured to me at the last minute that I could also just do another Linked List.
So I guess I have to figure out if Linked Lists can be Serialized, and if they can, if the circle of references will cause an endlessly long save file.
6:10pm - Well that was fast. A quick look at the MSDN and yes it can be Serialized.
So let's consider the Linked List compared with the ordinary List.
A List is basically a resizable array, and when it's serialized, each member has all of it's properties serialized, and each of those properties has its members serialized, thus causing the looping problem.
A Linked List is a series of interconnected nodes like a chain. This is specifically a doubly linked list so it's more like a loop of chain. Hmm... That's an interesting point; how does it serialize a doubly linked list when each member references the one fore and after? I'll look a bit deeper.
6:19pm - I'm getting the distinct impression that the way I implemented the LinkedList it's either not serializable or it requires a special data structure to be passed to it to get serialized.
Maybe instead of depending on the automatic Serialization of C# I should implement my own Serialization when it comes time to save the game. Then I won't have to worry about any of this.
7:38pm - Okay so I've been kinda goofing off since I removed the automatic Serialization from my classes. ^.^;;
I'm going to get a snack and then maybe get back to work.
8:58pm - I got a snack and then got back to work. I then got distracted again, so it's a bit unfinished. XD
I got to do a thing in a game that I needed a hand for though. Well, I thought I'd need a hand, but it was pretty easy with the two of us; I might have been able to solo it. I dunno.
I'm pretty hungry now but I also want to keep working, so I'm a bit conflicted. I'll try working a little then getting something to eat while I wait for dinner with Rob.
9:15pm - I thought I'd have a simple thing to fix there and that'd be that and I could get something to eat, but it looks like I just discovered a big bug in my main loop.
Near as I can tell, instead of waiting for the player to input a command on their turn, it's moving on to the AI turns and having them think, but not act on those thoughts.
So, I'll have to figure out why the game is skipping the wait for the player.
9:32pm - Ahh phew, it turned out it was just a bug with the BrainChase class after all. There's still a bug in the BrainChase, it's reporting that it saw or didn't see everything twice. But that's a problem for future me. Rob just got home and I'm hungry.
It's probably a good thing I trimed my beard and showered anyways, right? I don't do that enough. :P
Anyways I'm getting a bit burned out on video games all the time and I thought the best solution would be to not go back to bed and ruminate for hours but instead to work on my video game projects!
I say projects but I hardly ever work on anything besides the Roguelike project, do I? XD
Last time I worked on it I had some trouble with the serialization loop warning because I had a List
I'm at a bit of an impasse because of that problem though. See, I was considering using Object Pooling of indexes to overcome the problem of the List
So I guess I have to figure out if Linked Lists can be Serialized, and if they can, if the circle of references will cause an endlessly long save file.
6:10pm - Well that was fast. A quick look at the MSDN and yes it can be Serialized.
So let's consider the Linked List compared with the ordinary List.
A List is basically a resizable array, and when it's serialized, each member has all of it's properties serialized, and each of those properties has its members serialized, thus causing the looping problem.
A Linked List is a series of interconnected nodes like a chain. This is specifically a doubly linked list so it's more like a loop of chain. Hmm... That's an interesting point; how does it serialize a doubly linked list when each member references the one fore and after? I'll look a bit deeper.
6:19pm - I'm getting the distinct impression that the way I implemented the LinkedList it's either not serializable or it requires a special data structure to be passed to it to get serialized.
Maybe instead of depending on the automatic Serialization of C# I should implement my own Serialization when it comes time to save the game. Then I won't have to worry about any of this.
7:38pm - Okay so I've been kinda goofing off since I removed the automatic Serialization from my classes. ^.^;;
I'm going to get a snack and then maybe get back to work.
8:58pm - I got a snack and then got back to work. I then got distracted again, so it's a bit unfinished. XD
I got to do a thing in a game that I needed a hand for though. Well, I thought I'd need a hand, but it was pretty easy with the two of us; I might have been able to solo it. I dunno.
I'm pretty hungry now but I also want to keep working, so I'm a bit conflicted. I'll try working a little then getting something to eat while I wait for dinner with Rob.
9:15pm - I thought I'd have a simple thing to fix there and that'd be that and I could get something to eat, but it looks like I just discovered a big bug in my main loop.
Near as I can tell, instead of waiting for the player to input a command on their turn, it's moving on to the AI turns and having them think, but not act on those thoughts.
So, I'll have to figure out why the game is skipping the wait for the player.
9:32pm - Ahh phew, it turned out it was just a bug with the BrainChase class after all. There's still a bug in the BrainChase, it's reporting that it saw or didn't see everything twice. But that's a problem for future me. Rob just got home and I'm hungry.