Monday, May 6, 2019

Ongoing game world stuff.

One day till internet..forgot about phone data tethering so using that now.


Been thinking about how the world will work in the ongoing game. Before a lot of the randomized rogue-lite stuff is added, I think it's important to have a world that is dynamic and changes in interesting ways to begin with.

Initially I figured it would boil down to things like

-There are orcs
-There are bug enemies
-There are trees
-Orcs cut down trees
-Bugs lay eggs in trees, so attack orcs.

Because the game will not be a huge single screen, it will more likely be more akin to a boardgame with spaces. Each entity is like a piece that moves each turn (every time you sleep). So for example when the day begins, if orcs and bugs are on the same space, highlighting the space would show that they are fighting. Upon entering the space yourself, the game would read what pieces are in the space (be they resources, or enemies), place them in the screen based on what they're doing, and then the player's actions dictate the outcome of that action.

So for example if a space with orcs says "cutting down a tree", if the player does nothing, the next day this action will complete. If there's another entity that conflicts with this, it may not. Basically, every "piece" would be more like a group, and they would have very specific roles.

Then I started thinking about individual interactions. For example, lets say there's a large monster you can't beat. If you take away 25% HP, what happens? Does it just come back the next day? Instead, I think it would be better if the game keeps track. Monster is hungry > seeks out food. Monster is low HP > avoids other entities. This would make it a bit easier to have dynamic interactions that don't rely on a very specific rock-paper-scissors setup. For example, orcs may have a higher chance of being drawn to trees, but how much can vary. This would make dynamic interactions easier because behavior would still be possible to learn, yet the chaos caused by individual variance would prevent a status quo from going on forever. 5 Orcs may go to the same tree tile, but 1 of them may prefer lakes, so it goes a different way.

The other advantage is that the player could drive interactions between entities. Entities could be made passive by giving them items and befriending them, befriended entities could fight or befriend each other (or fuc). Whether the player fights everything or tries to befriend everything, the movement and introduction of new entities should throw a wrench into any plan. In the background entities will always be killing each other, moving, etc, and the player cant be everywhere at once.

Keeping track of stats should be fairly easy, since every time an entity is created it would be assigned a number (which other entities use to refer to it). An entity's stats would then just be lists; for example love would be a list of 6 values if there are 6 entities.


Where the index is the entity number, and the value is the value of the stat. An interaction would go something like:

entity 0 see's entity 1 (decide on action)
entity 1 is fighting (entity 6)
love stat 1 is (5) love stat 6 is (2)
attack (entity 1)

There would be a lot more calculating to do when deciding what an entity does in a turn (since every entity has to do stuff), however because everything would only happen when you sleep, it could be done without worrying about the game being slowed down to a crawl.

Anyhow, enough babbling for now.


  1. This concept seems so fragile, but like such a cool idea. There's so many things these kinds of interactions could bring, like maybe some exclusive equips!

    I wonder what kinds of interactions would lead to new types of enemies though...
    Maybe slimes that go near bodies of water that have fish would be able to shoot bubbles due to consuming the fish, and would also reduce the amount of fish that are able to be caught in the area?
    Or maybe viney tentacle beasties would be on alert because there are some orcs or (insert whatever monster consumes/uses wood here) around and would have slightly higher range and be more aggro?

    Whatever the case, this all seems fun and awesome, but be sure not to overwhelm yourself. We care about you!

    1. Essentially everything would follow the basic system, and layered on top of that would be unique interactions. (like an enemy changes based on location, or changes based on time of day, etc)

  2. So what you're referring to is basically to make the ongoing game a "systemic game". A game where the game mechanics not only effect the player and what they interact with, but a game where the entities act independently to the context of the player (along with the player input still being an important factor). Game Maker's Toolkit also made a video on this and honestly it's a system that every developer should try and make for their game, at least on a very basic level if they can at all.

    If you've played Breath of the Wild, that's probably the best modern example of a systemic game.


    - Enemies will interact with Link by fighting him
    - Link can interact with animals by hunting them for food (some put up a fight, others run away)
    - Some animals will try to hunt Link for food but will flee if badly injured
    - NPCs are by default friendly with Link and hand out quests plus rewards (some are enemies in disguise)
    - Mountable animals are afraid of Link by default but can be tamed in for riding


    - Enemies will attack both animals and NPCs when close enough
    - NPCs will fight back but can be saved by Link (Link is rewarded for doing so)
    - Enemies can tame their own mountable animals
    - Most enemies will sleep at night and will leave their weapons close-by (will make a run to try and grab them if alerted)
    - Some NPCs are seen physically travelling one location to another

    I don't want to list EVERYTHING of course but it's a game worth taking small examples from if your looking into systemic mechanics.
    An example I do love however in BotW is how much power weather and time of day has to change the way that not only entities behave, but also the environment.

    - Lightning is capable of striking anything metal (including your metal weapons and armour)
    - Metal weapons can be purposefully thrown at enemies during a lightning storm (with the right timing) to deal extra damage and paralysis
    - When raining, there's spots on the map that will literally fill up with water and create a small pond or lake and will eventually dry up during sunny days
    - NPCs will run for the nearest shelter when raining and have different in-game objectives at night
    - Climbing is a bloody pain in the ass when it rains

    It's the idea that players can learn how things collide with each other differently which makes games like these so fun. I'd love to see that in your game, even if it's on a much smaller scale. Only thing I'll say though is don't rush to have that as an immediate feature of the ongoing game. If it's ongoing, maybe make that a bigger update if you can't implement it easily enough.

    But just to name a few examples, I think it'd be neat that if you had a travelling merchant in your game, they might also get attacked and violated on their way to the next town/settlement or whatever. Choosing to help them could give you an item from their shop for free or at a discount. On the other hand, if left to their own devices, maybe they'd win the fight without your help, or perhaps if they lose, maybe there's a stat which determines if they can get addicted to breeding with monsters. If this stat exists on the NPC, it might mean that the more they lose, the less chances you have actually encountering this merchant out in normal towns and such. By the time they've lost too much against orcs and the like, they might have changed their destination from towns to monster habitats, meaning you can only buy from that particular merchant by entering more dangerous areas. Of course this all depends on how you choose to implement this, but I think the examples you gave yourself are probably the simplest options.

    1. In Breath of the Wild, a lot of things only happen when you're around, and it's what I think of as "open world illusion". You come across an event, or NPCs have simple behaviors, but don't really have persistent activities (or they are simplified). Ongoing game would probably have some things like that, that are more like "events", such as a guy showing up at your front door, even though he didn't spawn somewhere else and travel there.

      The rest, such as enemy activity would be more persistent, if only because it's made easier by it not being a huge seamless world. Once everything is in an area and the game is playing, you would basically have the specific interactions always play out (like if an enemy always dies to fire in one hit, or seeks and eats rocks, etc), but then also the universal simple behavior interactions such as "I like this other entity, so I will move towards them". Map actions like "cutting down trees" could probably be done offscreen if I wanted to be lazy about it.

    2. Yeah, I suppose I was going more into how the mechanics spiral and interact together more than how things actually act on their own from the player, but if we were to scale it back again, maybe Majora's Mask is kind of a better example in those terms?
      Everything runs on a clock so I suppose it doesn't really count, but if say the default of a game ran by a schedule like Majora's Mask did BUT instead, it was possible for RNG to disturb the balance of that schedule, things would get rather interesting.
      SAYING THAT, I don't know if a game based on procedural generation can really have a schedule unless the AI was built to work around that.

    3. Things wont have a schedule so much as each entity has stats, and acts upon them. Entities will also come and go when they die and new things take their place. So unless the player interacts with an orc and makes sure it sticks around, that orc may leave the world eventually.

      The number of "spaces" would also be finite.

    4. Now you're making me wish for a hidden stat where the longer you interact with an enemy, the higher chances it has to survive and come back later almost as a unique one. Kinda Shadow of Mordor vibes where you can get a nemesis based on what orc kills you/had a special run-in.
      But yeah, I see what you mean. Either way the system you plan to put in place in general will definitely be what stops the game from feeling bland.

      A lot of games think they can make it interesting just because the terrain is generated randomly. If the entities don't adapt and react within that, you're simply putting in moving pieces to decorate a room. I'm pretty sure you know what you're doing.

    5. Well, there will probably be some factors that affect survival. Not sure yet.
      My current plan is that all entities will have stats/behavior values and can level up. Names will be randomized (or initially, it might be that you have to name an entity yourself if you want to keep track of it)

      Titles can also be applied based on actions fairly easily. (Vile)(Grasshop) the (Seedgiver).

      In that sense, every enemy is unique from the beginning. Entities will have base stats, but have variance. Unique properties can be applied to any entity (like if there was a shrine, and any enemy who goes there has a 5% chance of getting buffed, etc.) Or if the player raises friendship or sexual stats with an enemy, it would probably stick around more and would behave differently.

      Basically, most enemies will generally do what you expect, but there will be exceptions, and if you really want to you can shape specific entities into what you want. So it sort of doubles as a way of injecting constant flux, while also allowing some possibilities for the player to mess around.

    6. Oh hell yeah, I'm definitely all for that.

  3. Replies
    1. The game will be free and ongoing, and will be updated every week or two.
      It's what I'll be making on the side while I work on normal games that will be finished and sold as usual.

      I just moved so I'm a bit slow at the moment, but I'll be back to work as normal in the next few days.

  4. Two scales interaction seems good.

    -Close, you affect what happens in an area unless defeated, so the result at the end of day for this tile is more likely to be what you intends to make happen.

    -Far, things happens on a rock-papper-scisor way between loading/sleep times.
    (still affected by changes you made (collect ressource, defeat ennemy type) even if you left for another tlle, since you broken the balance)

    I guess the best is to divide "balance breaks" into simple types and assign one of them per ennemy type of a zone, for temporary events. Long term changes like transforming the human village into an orc stronghold you have to recapture may impact the flow (shops unavaiable, house probably occupied, etc) so it's tricky.

    At best, adding a ressource type (like planting flowers that attract a new monter type, but can be trampled by other creatures if you don't defend it regularly) may works for long-term zone changes since it's more likely to disappear over time

    Temporary/time-limited events on the other hand are easely managable. There's signs of a raid coming up, either intercept it, or defend the village (with help of NPCs?).

    -You intercept, loot is your but no special reward.
    -You win the defense, get rewards, but less enemies/loot.

    -You lose the defense, shops offer less content for a while since they got raided.
    -You lose interception, dice is rolled to see if the villagers won the defense.

    So, about the trigger types...
    Temporary events (mostly "raid" or "flee" events):

    -ressource missing (intellegent races)
    (no more wood to cut, minerals to mine, time to make a big move!)

    -Ennemy type missing 1 (predatory species)
    (No preys for beasts, time to approach this village! But creatures stay in the zone)

    -Random (because why not? Joke/collab events are fun too)
    (Welp, that's a dragon above the bank, guess you hoarded too much gold)

    Long-term events (mostly zone-change, not affecting the house/village):

    -Monopoly (intellegent races if left unchecked after "big move"?)
    (Single race, no predators left and enough ressources to make a stonghold? change the zone from natural to inhabited by the said race. Maybe there's war with your village, maybe there's exclusive merchands...who knows. Defeat the leader to reset the zone.

    Or use diplomacy if befriended. I guess the "consent" events may be linked to these special occurences, transforming the hub/village into race-type village, making humans ennemies until befriended. Mostly changing your spawn/stating point/house spot on the world map)

    -Nature left unchecked (Lead of a duo in synergy)
    (plant-monsters eat insects, but keep enough to proliferate. without orcs the forest overgrow in a more dangerous form. Forest stay overgrown even if insects disappear, hunt the zone boss to reset the zone state.

    I don't relly see a "diplomacy" for this one...At best befriending would transform the zone into safe/sanctuary for the village to evolve? Could be a coexistence route locking the zone into this state unless you betray the zone boss to reset the zone)

    -Ennemy type missing 2 (Synergy-dependant species)
    (no more plants for insects they move out, raiding the village along the way (or fleeing the other way around with an exclusive boss you only encounter if you intercept them) then being absent until plant-monsters appear again)

    -Special/Arbitrary (holidays skins or whatever)
    (The whole world changed for no reasons in this build and will reset on next version, I guess? Special equipment may still be transfered as rewards if saves are compatibles)

    I guess more and more pieces of the puzzle start coming together. How to justify "successor/child" pseudo-endings, a more organic world that evolves...There's lots of potential in this one game.

    How's going the other projects? The "mario/sonic" doggy game looked like lots of fast-paced fun. Still hoping it will be resumed soon and wishing you the best for your project. ^^

    1. I like the idea that a species can straight up go extinct, especially if you keep the system he was considering in mind, where you create the different worlds to explore.
      Like if orcs get extremely overpopulated in a world, that would kind of be the driving motif of that one world. I think that would be pretty memorable. The problem I see is that if it's not balanced correctly you would probably see that same motif showing up again and again, kind of ruining the personality that once belonged to that one world

    2. @first anon:
      The outcome of an action would depend on the action. For example, "cutting down trees" or "Stealing the treasure chest" would likely have the entities grouped around the trees, with maybe something indicating they are working, even if it's not a cutting animation.

      Killing or beating up or distracting those entities would probably prevent it, and there would be indication when it happens that the action was canceled.

      Things like monsters interacting (like if a cat girl falls in love with an orc)
      would have a chance of happening offscreen, and would not be indicated as an action on the map. Though the map might indicate non-violent interactions are happening, and not what the result is going to be. Interaction would also happen in-map, if it physically happens, even if the two entities were not shown to be about to interact on the map.

      Among the things you mentioned, the best example of the sort of thing I'll be going for is the monster village. If enough monsters group, it can change the type/role of the space on the map. Areas may also have individual houses spawn if an entity meets certain conditions (or there might be a house building entity, or the player). There would also be mixed race villages that are basically just a few houses where the inhabitants like or are not hostile towards each other. Most events would not be specifically crafted, but driven by the generic system. A giant monster might attack a village because there's a lot of food and it's starving, etc, and "buildings destroyed" might be a result that occurs based on the home owners dying, or some other factor. Even a slime could destroy a village if the villagers are exceptionally weak.

      @second anon:
      I don't think that anything will go extinct, per se. Basically I imagine that things will come and go. For example if you have 10 orcs on the map, 5 of them might get killed by something, die of "offscreen age", leave the map, etc. Even if they are all gone, other orcs may appear at the edges of the map, or within it. There may be a limit to how many entities are on the map, but there will probably be natural forces that ensures things are switched up.

      That said, it is possible that once the game gets to the stage of having multiple worlds, a world could have a proclivity towards certain things over others. Or the ecosystem may be more fragile by design, compared to the "peaceful" world, which is meant to go on forever and mess around in.

  5. Have you thought about setting up a Ci-en blog at all? A lot of H-game devs use the site. It might be a good way to reach out to Japanese users.

  6. Those are some very interesting concepts. It's kind of like putting together a life simulator or something.

    1. Yeah, abeit a very basic one.
      A lot of interactions will probably be limited by how animations I do for enemies. A lot of things will probably be limited to emotion bubbles, and basic poses that are re-used.

    2. basically Dwarf Fortress II: The Lewdening

    3. Basically Dwarf Fortress 0.005: Except it's an action game.

  7. The ideas you have for this game sound real good like. I have some suggestions for your gameplay.

    - assign dash to a button primarily so the game is faster paced and the player won't have to murder his/her fingers to be cool
    - have your attack animations be faster by removing a frame or too so the player can attack quickly and then zoom out of danger
    - an alternative is just removing one startup frame but making the ending frames (of each individual attack) dash-cancelable
    - weapons like a greatsword or greathammer could use the original 1 hit animation, but remember that you can vary frame speed in order to cut your animation work load down
    - slightly increase dash speed for game speed upp
    - make sure spell damage/utility is HIGH. If the game ends up being fast paced, stopping for a second to cast a spell will be risky, so the reward needs to be good enough to make the risk worth it
    - make sure the enemies still pose some form of a threat to the player so the player isn't just straight-up invincible due to their speed
    - Orcs: Massive size means player can't normally jump-dash over. A grab attack that throws the player backwards to prevent just damage-boosting through these massive threats. Large health pools. Several slow starting but incredibly damaging AOE moves to prevent attack spamming.
    - Bees/Bugs: Super fast aerial movement which is much higher than the player's. Able to actively dodge attacks (as most bugs do) when not in the middle of attacking or other actions. Lower attack damage and health. Many attacks which utilize its movement capabilities.

    Basically what Im thinking your game could end up being is Rouge-Lite Megaman Zx: The H-Game Where Enemies Aren't Useless Garbage and Actually Pose A Real Threat to the Player and the Environment.

  8. Attack speed will be different depending on the weapon. That said I don't plan on having medium weight weapons have fast start up. I want weight, risk, and commitment, since movement and abilities of the player and enemies are limited.

    A frame or two will be the difference between many weapons.

    The way it's set up now is so that actions can't be canceled in such a way that attack frequency is drastically increased to the point of imbalance. If I may it possible to cancel attacks sooner, I need to add delay in other areas. You can already cancel start up by blocking, so the only difference I would make is making it so you can cancel the start up with a dash, rather than it buffering a dash after the attack.

    Pressing up or down on a keyboard isn't really difficult, not sure what you mean. That said, controls will be rebind able.

    All weapons will use the same animation, can't spend too much time animating clothing frames. (doesnt seem like much, but keep in mind I have to make economy choice dozens of times, and the frames add up quick.)

    Frame speed for weapons doesn't affect workload; The player attack animation's speed is altered via code. A fast weapon is faster using the same frames, so each set of clothing only needs the one animation, and the rest is automatic.

    Dash speed might be slower or faster based on stats, however fast dash speed = long jump distance which = enemies cant catch you. For this to be balanced, enemies would have to either be very mobile, or dashing would have to cost absurd amounts of stamina to avoid over using it. Alternatively dash jump could be low, but that would probably feel somewhat awkward. I don't plan on the game being very fast paced.

    Not sure what spells will be at all, yet. Damage will be within reason (weighed against resource and stamina cost), and cast time will likely vary in the same way as attacks, using the same animation. (though spells could have more than one animation, probably one for shooting and one for AOE/self cast, since animations will be shorter)

    As for all the enemy stuff, like I said I don't really plan on making the game super fast paced. Because stamina will play a role and interactions with entities could end up being more personal/varied, the combat will likely be slow and deliberate.

    Basically, the reason why movement will probably be nerfed is because the combat will be notably unlike Megaman, due to the nature of the attacks and the ability to defend/parry. To be honest it's entirely possible that the dash gets replaced with a front step that resembles the backstep.

    1. I see what you're sayin. I just getting ZX vibes from the demos. As for the frame thing. What I was talkin about not increasing/decreasing the framerate for the entire animation, but rather holding/removing startup and ending frames for heavy/light weapons. This way all weapons will appear to have a noticeable weight without you having to put the effort into new animations for each weapon weight. To keep it somewhat realistic you can also make it so the clothes have an animation for each part of the attack. Like:

      Weapon Startup --> Weapon Strike --> Weapon Follow-Through --
      (w/ possible hframes) (no hframes) (w/ possible hframes) |
      [repeat hframe count for subsequent strikes]

      Clothes Startup --> Clothes Strike w/ Clothes Follow-Through -----
      (no hframes) (no hframes) |
      [can possibly be reused for both swing types depending on anim.]
      O R
      ----------------------> Clothes ~Woosh~ ------------------------------
      | (no hframes) |
      [Repeat same ~Woosh~ per strike]

      If ~Woosh~ method, then you can make one MAX ~Woosh~ and take out frames as needed so w/ lighter weapons, the ~Woosh~ will be small sized, but w/ really heavy weapons, the ~Woosh~ size will be MAX. Or just make one ~Woosh~ animation that can work w/ all swings, no matter the weapon weight.

    2. Not sure what you mean. I already have things decided (and programmed) as far as how weapons and clothing are handled though, so I'll go over it to clarify.

      There are 10 frames used in the attack. Let's call these the "attack frame pool".

      These frames are used to form a longer animation. Some frames are re-used in different positions; for example the first frame (leaning forward) is also used at the end of the animation, and is re-used in other animations (such as turning around, and some transitions for things like blocking.)

      When animating clothing, this means that I don't animate a "turning around", "light attack", and "heavy attack" animation, I only animated the 10 frames in the pool. The rest is handled through code.

      A simplified version of how the weapons work is like this (number is a arbitrary representation of section duration);

      Medium weapon: Wind up(6)---swoosh(1)---follow_through(6)
      Light weapon: Wind up(3)---swoosh(1)---follow_through(3)

      The Swoosh is always the same duration, regardless of the weapon. The swish effect can be any number of frames, or can also be a projectile, depending on the weapon.

      The follow through is roughly the same as the wind-up, since the attack loops.

      Each weapon uses the same player-frame pool to make the player part, the duration of each part is just stretched. Clothing doesn't have to be animated more than once for any speed of attack, or weapon. The weapon itself is a separate layer, and the cut effect is also seperate.

      Because the animations all use the same frames, it also means that based on stats, magic, etc, a weapon's swing can be sped up or slowed down.

      The only other possibility is that there could be more player frames in the "swoosh" section. Arms at each angle, rather than straight to follow through.
      This would mean 2-4 more frames to animate for every weapon, and 4-8 more frames to animate for each set of clothing (since there is a jump version)

      Attacks would have to be handled and programmed differently since there is now a more defined swing (aside from the cut), however it wouldn't really change the intention to have a slow startup for medium and heavy weapons. Would be more of a question of economy.

      Also, the cut effect will be different for each weapon.

    3. Also, to note: the faster version in the control test would be a medium speed weapon.

      Weapons like daggers would be faster.

    4. P much what I was tryin to say lol

  9. Starting to sound like a Civ game.

    Also, hunting down a low HP enemy while it is actively running from you, while realistic, has got to be one of the most pain in the ass things to do.

    1. While the sim elements will be there, they will generally be pretty simplified, especially initially. Games like Civ have a lot of variables going on, whereas this will have small set of variables that pretty much everything operates on (hunger, like dislike, etc). Things like towns and area types will be introduced slowly as development progresses.

      As for enemies running in-map, hadn't really considered it. Enemies will avoid things on the board, but that's more down to where they choose to go per-sleep/turn. I havn't decided how moving throughout spaces will work for the player, yet, but I think the player will be far more mobile on the board than enemies are. They may only be able to move once per sleep while the player can move multiple times.

  10. Replies
    1. Haven't played it unfortunately. Only played Tri and the original.

    2. Monster Lewder Vored

  11. Hey Kyrieru, great work as usual. Will you ever release a demo of that Mario/ Sonic style game you previewed a while back?

    1. Yes, it's one of the games that will be finished and released.

  12. Now if only there was that attention to detail and enjoyment with the eroge mechanics.

    1. Well, the desire to do sim stuff originated from the desire to have sim H elements (marriage, pregnancy, relationships etc), so there will be a lot more to it than the average H game.

  13. This is a great idea! Faction systems, alliances, and natural predation makes for a living world.

    What ticks me off in most games is why everyone is hostile only to the player, say in an rpg - giant rats and snakes would join forces to attack ignoring their natural enemies. This creature group system would be great.

    Say, consider adding corruption mechanics to the heroine like slimification, fungal infections, demonization, vampirism, lycanthropy, etc., and make the associated creatures become friendly (along with granting special cosmetic looks, abilities and buffs... and weaknesses too maybe.), and gameplay would be awesome, varied and chaotic.

    Though it might be a humongous amount of work adding each cosmetic version to animations... just thinking about the number of frames scares me.

    Anyways, I'll be looking forward to this game. All the best Kyrieru!

    1. It will only be viable because I plan on cheating a bit. Clothing will only use "universal" animations. Meaning if I add an enemy, I dont have to add "leather armor orc H", I just do "leather armor H, 1,2,3", and those are used for all enemies.

      When an enemy has an animation for which clothing frames dont exist, the player will be stripped. That said, there will be some clothing/form/enemy specific animations. (Like if you have a vampire form, maybe you can fuck the vampire enemies with unique animations, etc)

      Enemies will all use basic poses on each other, which is why any male (or equipped female) will be able to have sex with any female enemy.