Vangard

It’s only a little thing, but Vangardians are cashing in their XPs and levelling up!


Unn Thorhallasdottir: leveling up from level 3
Sveidi Erlendsson: leveling up from level 3
Thorrir Ragnarsson: leveling up from level 3
Rannveig Gerdasdottir: leveling up from level 4
Thorrir Einarsson: leveling up from level 4
Nor Frostisson: leveling up from level 3
Alof Audsdottir: leveling up from level 3
Bergthora Rannveigsdottir: leveling up from level 3
Hundi Norsson: leveling up from level 4
Ragnhild Bergthorasdottir: leveling up from level 3
Asgerd Thorhildsdottir: leveling up from level 3
Rannveig Thorgerdsdottir: leveling up from level 3

Also, the player entity has a career and a skill list too:

The…the names are really long. And exceptionally difficult to pronounce.

Haha I know that struggle I’m currently coding a game set in Scotland! ;D

The names are authentic and not that bad: Unn, Thorrir, Alof… The second name is just their patronymic name. You just take the first name of the parent and add -sson for a male child and -sdottir for a female.

I haven’t added honorifics to the naming system yet. The vikings were very creative with these:

Harald Greycloak
Eirik Blood-Axe
Mord Kettle
Thorolf Buttered-Bread
Gizur the White

… And so on.

On the other hand, ShadedVertex may have a point, I have been reading Icelandic sagas for decades and while their crazy names may be charming to me it may be a jaw-breaker for others. Normally the game would just use the person’s first name, like Hallgerd, and only use the full name for disambiguation. I might prune the more difficult names from the name lists…

@ags1 I find the names a bit of a mouthful to pronounce, though. I mean, if people want to discuss the game and they feel like talking about a particular NPC or something, they’d want a name a little less … painful … to pronounce :stuck_out_tongue:

The names might be hard to pronounce, but i think they fit the game, as they are real names. I wouldn’t change or remove to many of them…

Agreed. We can’t have vikings called Larry or Bob.

I don’t think the names are any worse than the Tolkienesque names that get slapped on elves in RPGs :slight_smile:

I’ve been sidetracked for a bit with worries about persistence. I’ve ignored this till now but the code base is getting large enough that it would be a pain to add support for saving and loading much further down the line. Also I want to write out a dump of all game state at any instant for debugging purposes.

At the suggestion of princec I am using a simple reflection-based serialization. I may change down the line to a more robust solution like Kryo.

I wouldn’t go for Kryo but probably for a human readable format.
A.e.: https://github.com/EsotericSoftware/yamlbeans

Or even simpler json: https://github.com/EsotericSoftware/jsonbeans

-ClaasJG

I have read in many articles that vector based images can be very slow to render. How did you manage to not cause any serious lag on all those vector graphics being drawn to the game?

@streak324, my graphics are very very simple. And only ~1% of the world is drawn at the widest zoom, and even then many objects or parts of objects are culled by LOD.

@ClassJG, the first version will be to write human-readable TreeML, but down the line I will change to a binary or compressed format to reduce file size.

Ho hum, there’s more to this serialization malarcky than I recalled! Anyways, it’s taking shape.


i : com.c.a.vangard.critters.Entity
	type : Human
	behaviors : com.c.a.vangard.critters.Behaviors
		property : com.c.a.vangard.critters.behavior.NoBehavior
			decisionExpires : -81
			priority : 0
			suspendUntil : 0.0
		property : com.c.a.vangard.critters.behavior.GoToBehavior
			target : -3046054898442482813
			decisionExpires : -236
			priority : 7
			suspendUntil : 0.0
		property : com.c.a.vangard.critters.behavior.SleepBehavior
			nest : -3046054898442482813
			wakeUpAt : 0.0
			decisionExpires : 968
			priority : 7
			suspendUntil : 0.0
		property : com.c.a.vangard.critters.behavior.BodyUpkeepBehavior
			decisionExpires : 1000
			priority : -1
			suspendUntil : 0.0
		property : com.c.a.vangard.critters.behavior.PickUpBehavior
			decisionExpires : 1000
			priority : -1
			suspendUntil : 0.0
		property : com.c.a.vangard.critters.behavior.LevelUpBehavior
			decisionExpires : 1000
			priority : -1
			suspendUntil : 0.0
		property : com.c.a.vangard.critters.behavior.GuardBehavior
			guardChieftain : false
			changeGuardTime : 80192340.0
			onNightShift : false
			decisionExpires : 1000
			priority : -1
			suspendUntil : 0.0
		property : com.c.a.vangard.critters.behavior.TrainingBehavior
			decisionExpires : 1000
			priority : -1
			suspendUntil : 108001980.0
		property : com.c.a.vangard.critters.behavior.CollectWagesBehavior
			decisionExpires : 1000
			priority : -1
			suspendUntil : 108061380.0
...

Playing with territorial control as well. I have a relatively simple formula to determine which areas are owned by whom.

______________________________+aaaaaaaaa+_______________________________________+bbbbbbbbb+_________ _____________________________+aaaaaAaaaaa+_____________________________________+bbbbbBbbbbb+________ _____________________________+aaaAAAAAaaa+_____________________________________+bbbBBBBBbbb+________ ____________________________+aaaAAAAAAAaaa+___________________________________+bbbBBBBBBBbbb+_______ ____________________________+aaaAAAAAAAaaa+___________________________________+bbbBBBBBBBbbb+_______ ____________________________+aaAAAAAAAAAaa+___________________________________+bbBBBBBBBBBbb+_______ __________________________+++aaaAAAAAAAaaa+___________________________________+bbbBBBBBBBbbb+_______ __________________________+++aaaAAAAAAAaaa+___________________________________+bbbBBBBBBBbbb+_______ _______________________+++++++aaAAAAAAAaa+_____________________________________+bbbBBBBBbbb+++++++__ _____________________++aaaaa+aaaAAAAAAAaa+___+_________________________________+bbbbbBbbbbbb+bbbbb++ ____________________+aaaaaaaaaaaAAAAAAAaa+++++__________________________________+bbbbbbbbbbbbbbbbbbb ___________________+aaaaaAaaaaaaAAAAAAAaa+++++__________________________________+++bbbbb+bbbbbbBbbbb ___________________+aaaAAAAAAAAAAAAAAAAaa+++++__________________________________++++++++++bbbBBBBBbb __________________+aaaAAAAAAAAAAAAAAAAAaaa++++__________________________________++++++__+bbbBBBBBBBb __________________+aaaAAAAAAAAAAAAAAAAAaaa++++__________________________________+++++++_+bbbBBBBBBBb __________________+aaAAAAAAAAAAAAAAAAAAAaa++++_________________________________++++++++++bbBBBBBBBBB __________++++++__+aaaAAAAAAAAAAAAAAAAAaaa++++____________________________________+++++++bbbBBBBBBBb __________++++++__+aaaAAAAAAAAAAAAAAAAAaaa++++____________________________________+++++++bbbBBBBBBBb ___+++++__++++++++++aaaAAAAAAAAAAAAAAAAaa+++++++_________________________+++++___+++++++++bbBBBBBBBb _++aaaaa+++++aaaaa+aaaaaaAaaaaaaAAAAAAAaaa+aaaaa++_____________________++bbbbb++_+++++++++bbBBBBBBBb +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaAAAAAAAaaaaaaaaaaa+___________________+bbbbbbbbb++++++++++bbBBBBBBBb aaaaaAaaaaaaaaaAaaaaaa+aaaaa+aaaAAAAAAAaaaaaaAaaaaa+_________________+bbbbbBbbbbb+++++++++bbBBBBBBBb aaaAAAAAAAAAAAAAAAaaa+++++++++aaAAAAAAAAAAAAAAAAaaa+_________________+bbbBBBBBbbb+++++++++bbBBBBBBBb aaAAAAAAAAAAAAAAAAAaaa+++++++aaaAAAAAAAAAAAAAAAAAaaa+_______________+bbbBBBBBBBbbb+++++++bbbBBBBBBBb aaAAAAAAAAAAAAAAAAAaaa+++++++aaaAAAAAAAAAAAAAAAAAaaa+_______________+bbbBBBBBBBbbb+++++++bbbBBBBBBBb aAAAAAAAAAAAAAAAAAAAaa+++++++aaAAAAAAAAAAAAAAAAAAAaa+_______________+bbBBBBBBBBBbb+++++++bbBBBBBBBBB aaAAAAAAAAAAAAAAAAAaaa+++++++aaaAAAAAAAAAAAAAAAAAaaa+_______________+bbbBBBBBBBbbb+_____+bbbBBBBBBBb aaAAAAAAAAAAAAAAAAAaaa+++++++aaaAAAAAAAAAAAAAAAAAaaa+_______________+bbbBBBBBBBbbb+_____+bbbBBBBBBBb aaAAAAAAAAAAAAAAAAAaa+++++++++aaaAAAAAAAAAAAAAAAAaa+_+++++___________+bbbBBBBBbbb+_______+bbbBBBBBbb aaAAAAAAAaaaAAAAAAAaaa+aaaaa+aaaaaaAaaaaaaAAAAAAAaa_+bbbbb++_________+bbbbbBbbbbb+___+___+bbbbbBbbbb aaAAAAAAAaaaAAAAAAAaaaaaaaaaaaaaaaaaaaaaaaAAAAAAAaabbbbbbbbb+_________+bbbbbbbbb+++++++++++bbbbbbbbb aaAAAAAAAaaaAAAAAAAaaaaaaAaaaaaa+aaaaa+aaaAAAAAAAa+bbbbBbbbbb+______+++++bbbbb+++++++++++++++bbbbb++ aaAAAAAAAAAAAAAAAAAAAAAAAAAAaaa+++++++++aaAAAAAAAaabbBBBBBbbb+____+++++__+++++++++++++++++++++++++__ aaAAAAAAAAAAAAAAAAAAAAAAAAAAAaaa+++++++aaaAAAAAAAaabBBBBBBBbbb+__++++++_____++++++++++++++++++++____ aaAAAAAAAAAAAAAAAAAAAAAAAAAAAaaa+++++++aaaAAAAAAAaabBBBBBBBbbb+_+++++++_____++++++++++++++++++++____ aAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaa+++++++aaAAAAAAAAaabBBBBBBBBbb++++++++++____++++++++++++++++++++____ aaAAAAAAAAAAAAAAAAAAAAAAAAAAAaaa+++++++aaaAAAAAAAaabBBBBBBBbbb+_+++++++_____++++++++++++++++++++____ aaAAAAAAAAAAAAAAAAAAAAAAAAAAAaaa+++++++aaaAAAAAAAaabBBBBBBBbbb+__++++++_____++++++++++++++++++++____ aaAAAAAAAAAAAAAAAAAAAAAAAAAAAaa+++++++++aaAAAAAAAaabbBBBBBbbb+____+++++__+++++++++++++++++++++++++__ aaAAAAAAAaaaaaaAaaaaaaAAAAAAAaa+++++++++aaAAAAAAAa+bbbbBbbbbb+______+++++bbbbb+++++bbbbb+++++bbbbb++ aaAAAAAAAaaaaaaaaaaaaaAAAAAAAaa+++++++++aaAAAAAAAaabbbbbbbbb+_________+bbbbbbbbbbbbbbbbbbbbbbbbbbbbb aaAAAAAAAaaa+aaaaa+aaaAAAAAAAaa+++++++++aaAAAAAAAaa_+bbbbb++_________+bbbbbBbbbbbbbbbBbbbbbbbbbBbbbb aaAAAAAAAaa+++++++++aaAAAAAAAaa+++++++++aaAAAAAAAaa+_+++++___________+bbbBBBBBBBBBBBBBBBBBBBBBBBBBbb aaAAAAAAAaaa+++++++aaaAAAAAAAaaa+++++++aaaAAAAAAAaaa+_______________+bbbBBBBBBBBBBBBBBBBBBBBBBBBBBBb aaAAAAAAAaaa+++++++aaaAAAAAAAaaa+++++++aaaAAAAAAAaaa+_______________+bbbBBBBBBBBBBBBBBBBBBBBBBBBBBBb aAAAAAAAAAaa+++++++aaAAAAAAAAAaa+++++++aaAAAAAAAAAaa+_______________+bbBBBBBBBBBBBBBBBBBBBBBBBBBBBBB aaAAAAAAAaaa+_____+aaaAAAAAAAaaa+_____+aaaAAAAAAAaaa+_______________+bbbBBBBBBBBBBBBBBBBBBBBBBBBBBBb aaAAAAAAAaaa+_____+aaaAAAAAAAaaa+_____+aaaAAAAAAAaaa+_______________+bbbBBBBBBBBBBBBBBBBBBBBBBBBBBBb aaaAAAAAaaa+_+++++_+aaaAAAAAaaa+_______+aaaAAAAAaaa+___________+++++_+bbbBBBBBBBBBBBBBBBBBBBBBBBBBbb aaaaaAaaaaa_+ddddd+_aaaaaaaaaaa+_______+aaaaaaaaaaa+_________++ccccc+_bbbbbbbbbbbbbbbBbbbbbbbbbBbbbb +aaaaaaaaa_dddddddddd+aaaaaaa+___________+aaaaaaa+__________+cccccccccc+bbbbbbb+bbbbbbbbbbbbbbbbbbbb _++aaaaa+_dddddDddddddddddddddd+_______+ddddddddddd+_______+cccccCccccccccccccccc_+bbbbb++_++bbbbb++ ___+++++_+dddDDDDDDDDDDDDDDDddd+_______+dddDDDDDddd+_______+cccCCCCCCCCCCCCCCCccc+_+++++_____+++++__ ________+dddDDDDDDDDDDDDDDDDDddd+_____+dddDDDDDDDddd+_____+cccCCCCCCCCCCCCCCCCCccc+_________________ ________+dddDDDDDDDDDDDDDDDDDddd+_____+dddDDDDDDDddd+_____+cccCCCCCCCCCCCCCCCCCccc+_________________ ________+ddDDDDDDDDDDDDDDDDDDDdd+_____+ddDDDDDDDDDdd+_____+ccCCCCCCCCCCCCCCCCCCCcc+_________________ ________+dddDDDDDDDDDDDDDDDDDddd+++++++dddDDDDDDDddd+_____+cccCCCCCCCCCCCCCCCCCccc++++______________ ________+dddDDDDDDDDDDDDDDDDDddd+++++++dddDDDDDDDddd+_____+cccCCCCCCCCCCCCCCCCCccc+++++_____________ _________+dddDDDDDDDDDDDDDDDDdd+++++++++ddDDDDDDDdd+_______+ccCCCCCCCCCCCCCCCCCcc+++++++_____+++++__ _________+dddddDddddddDDDDDDDdd+++++++++ddDDDDDDDdd+_______+ccCCCCCCCcccCCCCCCCcc++++++++__++ccccc++ __________+dddddddddddDDDDDDDdd+++++++++ddDDDDDDDdd_________ccCCCCCCCcccCCCCCCCcc++++++++++ccccccccc __________+++ddddd+dddDDDDDDDdd+++++++++ddDDDDDDDdd+_______+ccCCCCCCCcccCCCCCCCcc+++++++++cccccCcccc __________++++++++++ddDDDDDDDdd+++++++++ddDDDDDDDdd+_______+ccCCCCCCCCCCCCCCCCCcc+++++++++cccCCCCCcc __________+++++++++dddDDDDDDDddd+++++++dddDDDDDDDddd+_____+cccCCCCCCCCCCCCCCCCCccc+++++++cccCCCCCCCc __________+++++++++dddDDDDDDDddd+++++++dddDDDDDDDddd+_____+cccCCCCCCCCCCCCCCCCCccc+++++++cccCCCCCCCc _________++++++++++ddDDDDDDDDDdd+++++++ddDDDDDDDDDdd+_____+ccCCCCCCCCCCCCCCCCCCCcc+++++++ccCCCCCCCCC ________________+++dddDDDDDDDddd+++++++dddDDDDDDDddd+_____+cccCCCCCCCCCCCCCCCCCccc+++++++cccCCCCCCCc ________________+++dddDDDDDDDddd+++++++dddDDDDDDDddd+_____+cccCCCCCCCCCCCCCCCCCccc+++++++cccCCCCCCCc ___+++++________++++dddDDDDDddd+++++++++ddDDDDDDDdd+_______+cccCCCCCCCCCCCCCCCCcc+++++++++cccCCCCCcc _++ddddd++_____+++++dddddDddddd+++++++++ddDDDDDDDdd+_______+cccccCccccccCCCCCCCccc+ccccc+ccccccCcccc +ddddddddd+++++++++++ddddddddd++++++++++ddDDDDDDDdd_________+cccccccccccCCCCCCCccccccccccccccccccccc dddddDddddd+++++__+++++ddddd++++++++++++ddDDDDDDDdd+_________++ccccc+cccCCCCCCCccccccCcccccc+ccccc++ dddDDDDDddd+++++++++++++++++__++++++++++ddDDDDDDDdd+___________+++++++ccCCCCCCCCCCCCCCCCccc+++++++__ ddDDDDDDDddd++++++++++++++____+++++++++dddDDDDDDDddd+_____________+++cccCCCCCCCCCCCCCCCCCccc++++____ ddDDDDDDDddd++++++++++++++____+++++++++dddDDDDDDDddd+_____________+++cccCCCCCCCCCCCCCCCCCccc++++____ dDDDDDDDDDdd++++++++++++++___++++++++++ddDDDDDDDDDdd+_____________+++ccCCCCCCCCCCCCCCCCCCCcc++++____ ddDDDDDDDddd+_++++++++++++____+++++++++dddDDDDDDDddd+_____________+++cccCCCCCCCCCCCCCCCCCccc++++____ ddDDDDDDDddd+__+++++++++++____+++++++++dddDDDDDDDddd+_____________+++cccCCCCCCCCCCCCCCCCCccc++++____ dddDDDDDddd+++++++++++++++++__++++++++++ddDDDDDDDdd+___________+++++++ccCCCCCCCCCCCCCCCCCcc+++++++__ dddddDdddddd+ddddd+++++ddddd++++++++++++ddDDDDDDDdd+_________++ccccc+cccCCCCCCCcccCCCCCCCccc+ccccc++ +ddddddddddddddddddddddddddddd++++++++++ddDDDDDDDdd_________+cccccccccccCCCCCCCcccCCCCCCCccccccccccc _++ddddd+ddddddDdddddddddDddddd+++++++++ddDDDDDDDdd+_______+cccccCccccccCCCCCCCcccCCCCCCCccccccCcccc ___+++++++dddDDDDDDDDDDDDDDDddd+++++++++ddDDDDDDDdd+_______+cccCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCcc ______+++dddDDDDDDDDDDDDDDDDDddd+++++++dddDDDDDDDddd+_____+cccCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc ______+++dddDDDDDDDDDDDDDDDDDddd+++++++dddDDDDDDDddd+_____+cccCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc ______+++ddDDDDDDDDDDDDDDDDDDDdd+++++++ddDDDDDDDDDdd+_____+ccCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC ______+++dddDDDDDDDDDDDDDDDDDddd+++++++dddDDDDDDDddd+_____+cccCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc ______+++dddDDDDDDDDDDDDDDDDDddd+++++++dddDDDDDDDddd+_____+cccCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc ___+++++++ddDDDDDDDDDDDDDDDDDdd+++++++++ddDDDDDDDdd+_+++++++ccCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc _++ddddd+dddDDDDDDDdddDDDDDDDddd+ddddd+dddDDDDDDDdd_+ccccc+cccCCCCCCCccccccCcccccccccCccccccCCCCCCCc +dddddddddddDDDDDDDdddDDDDDDDdddddddddddddDDDDDDDddcccccccccccCCCCCCCcccccccccccccccccccccccCCCCCCCc dddddDddddddDDDDDDDdddDDDDDDDddddddDddddddDDDDDDDd+ccccCccccccCCCCCCCccc+ccccc+++++ccccc+cccCCCCCCCc dddDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDdcccCCCCCCCCCCCCCCCCcc+++++++++++++++++++ccCCCCCCCc ddDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDdccCCCCCCCCCCCCCCCCCccc+++++++++++++++++cccCCCCCCCc ddDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDdccCCCCCCCCCCCCCCCCCccc+++++++++++++++++cccCCCCCCCc dDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDdccCCCCCCCCCCCCCCCCCCcc+++++++++++++++++ccCCCCCCCCC ddDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDdccCCCCCCCCCCCCCCCCCccc+_______________+cccCCCCCCCc ddDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDdccCCCCCCCCCCCCCCCCCccc+_______________+cccCCCCCCCc dddDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDddcccCCCCCCCCCCCCCCCccc+_________________+cccCCCCCcc dddddDdddddddddDdddddddddDdddddddddDdddddddddDdddd+ccccCcccccccccCccccc+_________________+cccccCcccc

I guess a “A” means, that this part is controlled by “A”, the “a” means it is controlled by “A”, but not that save and “_” means that this part is neutral right?
But what does the “+” mean?

The + is for the tiny little “a” or “b” I don’t have :slight_smile: You can normally infer from context which nation it belongs to. Each character represents one hectare of territory.

You’re right about the A, a and + representing levels of control. It represents which laws apply where, how much tax the lord can extract, how ‘wild’ the areas are and so on.

So for every “+”, you need to search for neighbour territories and look, how many adjacent territories each nation has right?

Yeah, I’m just visualising the formula. In game there will be be a coloured map.

Ah okay, so In-Game you need to calculate the territories (including the "+"es) only once and cache them then using a color.

[quote]It represents which laws apply where, how much tax the lord can extract, how ‘wild’ the areas are and so on.
[/quote]
Does the level of control also affect taxes and laws or are the lower levels of control only not that save?

Actually I think I will calculate the map one line per logic frame, at sunrise and sunset. There are many factors that influence the map so it is pretty dynamic, but no need to do all that thinking all in the space of one logic frame. So the whole map will update in the course of three seconds every twelve minutes (assuming the game is running at x1 speed).

I think I will cheat and also use this map as a guide to placing wild creatures. They will spawn in the less controlled areas and migrate away from areas with strong human influence.