Recent Posts

Pages: [1] 2 3 ... 10
1
Off Topic / ?? -?Https://eurowiki.net?????????
« Last post by kristineG on Today at 03:36:44 AM »
???? - ??? ?? ?? ?? / ??? ??? ??
 
??????????. ??? ??
 
???? ??? ?? ???? ????
 
?? ??? ? ??? ??? ???.
 
?? ?? ???? ??? ?? ???? ??? ????
 
??? ?? ?????? ?? ?? ? ??
 
????? ??? ?? ???,????
 
?? ?? ???? ??? ?? ???? ??? ????
 
??????????. ??? ??
 
?? ?? ?? - ??? ???? ??
 
??? ??? ??? ??? ??? ???? ????
?? -?uhi ??????? ??????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ??????
 
2
Game Development / ?? -?Https://eurowiki.net?????????
« Last post by kristineG on Today at 12:23:21 AM »
???? - ??? ?? ?? ?? / ??? ??? ??
 
??????????. ??? ??
 
???? ??? ?? ???? ????
 
?? ??? ? ??? ??? ???.
 
?? ?? ???? ??? ?? ???? ??? ????
 
??? ?? ?????? ?? ?? ? ??
 
????? ??? ?? ???,????
 
?? ?? ???? ??? ?? ???? ??? ????
 
??????????. ??? ??
 
?? ?? ?? - ??? ???? ??
 
??? ??? ??? ??? ??? ???? ????
?? -?uhi ??????? ??????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ?????? ? ???????? ???????? ? ??????? ? ???????? ? ?????? ? ??????? ? ???????? ? ??????
 
3
Also I wanted a number of "many element Enum to/from string"
I just cast the enum to an int (or whatever base type, almost always int) and serialize that.

Quote
(the best way I could figure out to do that was to translate planets to PlanetIndex, then export/import the planet indices)
Oh, goodness, sorry that wasn't obvious. Yea, we always serialize those by index. And if something has a PrimaryKeyID (GameEntity, PlayerAccount, ControlGroup), we use that.

In short, all serialization is primitive types, no binary/blackbox serialization of complex types.

One caveat is that some of the primary-key-id fields are Int64, and serialize without a specific type named in the code (the CLR automatically knows to use the Int64 overload) but in the deserialization you have to do ReadInt64(), not ReadInt32(). On the bright side when you try to actually deserialize in-game it will immediately cause an error if you try to use the wrong one because the type is encoded in the stream, but you won't know until that actual moment of testing because you won't get a compile error assigning "Int64 someLong = buffer.ReadInt32();"

That could be solved by converting from the "Int64 someLong = buffer.ReadInt32();" pattern to the "Int64 someLong; buffer.Fill(out someLong);" pattern, but the latter is less intuitive (I do use it in the XML stuff).

Quote
I suspect if I'd written my code from the beginning to account for the Serialization code paradigm you use then it would have been pretty straightforward.
That was my thought as well.
4
AI War II - Kickstarter Reward Questions / Steam Key "Pending"
« Last post by Austneal on Yesterday at 11:08:20 PM »
I just purchased from the Kickstarter page, but instead of giving a Steam key, it just says "Pending"

Any idea how long this takes to show up?
5
The reason it was so much was that I had a bunch of fields I wanted to save from two different classes, and I decided the best way to do it would be to write distinct "Export All Data" and "Import All Data" functions. So my actual Serialize/Deserialize functions are all trivial and the work is done elsewhere. Also I wanted a number of "many element Enum to/from string" functions as well as a bunch of code to allow me to readily handle Lists of planets (the best way I could figure out to do that was to translate planets to PlanetIndex, then export/import the planet indices).

Overall I think your code is fine, I just made some perhaps imperfect architecture choices on my end. I suspect if I'd written my code from the beginning to account for the Serialization code paradigm you use then it would have been pretty straightforward. Also I think those numbers included some miscellaneous code cleanup, as well as a mechanism for showing me the state of the nanocaust while in game (I added a new bunch of code to print nanocaust status stuff in game).

I'd be happy to take some feedback once I'm sufficiently convinced the code works.
6
I actually enjoy the way we do it, it's just two mechanical steps after adding a new field (because we don't use reflection/attributes to scan the fields automatically). But it wouldn't be the first time my tastes differed from, well, everyone else ;)

Now, when it doesn't work, and you're trying to debug why deserialization barfs halfway through a huge save file, that can be very unpleasant. But even there it's much easier to debug than it used to be.

Lets just say that I'm glad I don't have to actually write much in the way of serialization in Minecraft. The NBT dataobject handles it all and I can treat it like a Map.  1.12 and the JSON stuff is actually a little more hands-on with serialization and even then I don't have to get very hands-on (the few times I have had to, 99% of what I need has already been written and I can copy-paste).
7
I think after about 1200 lines of code I have External XML code and Serialize/Deserialize working for the Nanocaust. Ugh. That really wasn't fun.
I don't know why it should have been so much. I can take a look when I integrate stuff.

Serialization is never fun
I actually enjoy the way we do it, it's just two mechanical steps after adding a new field (because we don't use reflection/attributes to scan the fields automatically). But it wouldn't be the first time my tastes differed from, well, everyone else ;)

Now, when it doesn't work, and you're trying to debug why deserialization barfs halfway through a huge save file, that can be very unpleasant. But even there it's much easier to debug than it used to be.
8
I think after about 1200 lines of code I have External XML code and Serialize/Deserialize working for the Nanocaust. Ugh. That really wasn't fun.

Serialization is never fun
9
I am a fan of "Variations on a Theme" for games like this, so I think these sound like good ideas.

I think after about 1200 lines of code I have External XML code and Serialize/Deserialize working for the Nanocaust. Ugh. That really wasn't fun.
10
Are you considering having the AI try to defend multiple points on a planet like in AIWC? That was a useful mechanism to allow players to slowly grind down a very strong planet piece by piece.
Yep. I had moved away from it because I thought it would be more interesting, but clearly variety is needed. So I think having some planets be monolithic is good, and some planets with a more diverse placement.

Similar with wormholes, I think, though maintaining the "angle from center equals the real angle to the target planet" thing is important. So have some planets as they are now, some planets with the wormholes near the center, some with each wormhole at a different distance.

Quote
That would be a lot harder if the AI concentrated their forces to begin with.
Yea, the idea is that they don't do that unless you bring so much force that you can stomp the whole planet.

There's room for different regional AI personalities, though. An "AHHH! I saw a fly! Send Everything!" personality would be amusing.

Quote
I look forward to seeing how the AI behaves once you've ironed out all the bugs! I'm working on allowing the Nanocaust to fully use ExternalData and ExternalConstants which will be a really nice improvement.
I look forward to seeing how that works out too.
Pages: [1] 2 3 ... 10