Coding "Empire" Cellular Automaton in C++/SFML - Part 2

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024

Комментарии • 434

  • @Hopsonn
    @Hopsonn  7 лет назад +171

    I feel like this may not be my best video, mostly due to the fact I was unable to add all the great suggestions people were giving in part 1 :(
    This is only because of the nature of this program, being a cellular automaton and all, things like people building cities and prefering political parties kinda doesn't work :P

    • @boggyautodog
      @boggyautodog 7 лет назад +1

      as i said, make it more complex
      *laugh*

    • @mekquake5879
      @mekquake5879 7 лет назад +2

      Absolutely fascinating video and its so nice to see you acknowledge suggestions! thanks for the video man, looking forward to seeing more stuff from you :D

    • @Inthecookiemind
      @Inthecookiemind 7 лет назад +2

      Hopson idk if you're still taking suggestions, but would making it so that as cells strength increases, the distance that they can move also increases (perhaps at an exponentially decaying rate of increase). Could be a way to allow some cells to move across oceans and to islands
      Could you also add different terrains that affect cells in different ways, such as yellow, desert tiles which could speed up the rate cells age or grey mountain tiles that have a chance of stopping or slowing movement.
      I love watching these kinds of videos, so either way I hope to see more of them in the future.

    • @steinardarri
      @steinardarri 7 лет назад +3

      Here I was hoping for you to code Victoria III

    • @quil180
      @quil180 7 лет назад

      You should do series where you teach how you make them...
      Hopson

  • @HysterS-FT
    @HysterS-FT 7 лет назад +153

    Another suggestion: perhaps when the occupants of cells die, the cell that they were in remains colored until it is taken over by an opposing colony. This would likely make the map look a lot more like an actual map of empires and would also likely fix the video quality issues.

    • @FLy1nRabBit
      @FLy1nRabBit 7 лет назад +15

      Ethan that would actually look super badass

    • @MCGodsGaming
      @MCGodsGaming 7 лет назад

      FLy1nRabBit fuck you dude. whats ur fricking problem??

    • @HysterS-FT
      @HysterS-FT 7 лет назад +22

      lol wtf man, he's literally just saying it'd look cool

    • @MCGodsGaming
      @MCGodsGaming 7 лет назад

      Ethan he just fucking said my mom is a fat bitch. What are u talking about

    • @HysterS-FT
      @HysterS-FT 7 лет назад +8

      lol what on earth are you talking about

  • @dr_atheist4272
    @dr_atheist4272 7 лет назад +44

    "Not the greatest video" you say. Part of being a good programmer is being honest about things you fail to implement properly instead of trying to convince yourself you can do anything. One thing that irks me about RUclips programmers sometimes is that they already have programmed the project once before and then make it seem like they are programming gods when everything works first time around. I appreciate it that you can tell us when something doesn't work.
    EDIT: I completely forgot to comment on the actual content of the video. You got some pretty interesting features added. I particularly like the "scripting" which allows you to create custom people types. Also zoom/pan could come in handy as well.

  • @heroj2068
    @heroj2068 7 лет назад +30

    You press a button and see which people are diseased and which are not. Another press and you see people by strength, and then age, and then back to colony.
    That will be great.

    • @ayogodd6038
      @ayogodd6038 6 лет назад

      Hello can you please help me download and play this? I can get it to work

  • @dustyhob0
    @dustyhob0 7 лет назад +331

    This video has inspired me to finaly tell my parents that they are adopted.

  • @minecraft-planestrainsanda486
    @minecraft-planestrainsanda486 7 лет назад +48

    Maybe you could make it so there is an even smaller chance that 5 - 10 people will form a 'boat' and go to the nearest land possible.
    Swimming might work better if a certain strength(say, 400) was required to swim.
    Also - another cool feature would be IQ (smartness?).
    People with a higher IQ have a chance to kill 2 people when they fight one, for example, or maybe they could be the only ones who could swim. They could even have a small chance of destroying thousand of the other colony at a time, or giving the other colony a disease.
    Another fun thing to implement would be different types of land, maybe with some increasing disease, or increasing reproduction.
    It would also be nice to be able to pause the simulation
    Lastly, It would be cool if you could interact with them - like generate a random colony where you click or cull half a colony, or even drop 'bomb' that destroy everything in a 50 pixel radius.
    Thanks for making great videos as always!

    • @boomerboxer3574
      @boomerboxer3574 7 лет назад +7

      the swimming with more strength sounds good

    • @Lyestria
      @Lyestria 6 лет назад

      Minecraft - Planes,Trains and Automobiles z

    • @kamm6001
      @kamm6001 4 года назад

      i like that, these are my only suggestions if he does decide to ever edit this again.
      though i would like to see if enough time has passed *after* completing a swim action, or coming from someone who did swim, a new colony would form

  • @femimark5021
    @femimark5021 7 лет назад +3

    0:50 that is one of my favorite DQ9 tracks. I love your work, you have inspired me to take up C++ programming as a hobby now. Wish me luck.

  • @NewSchattenRayquaza
    @NewSchattenRayquaza 7 лет назад +22

    Love it! How about makeing more/less habitable places that make survival easier/harder :D (indicated by colore maybe)

  • @preuen4339
    @preuen4339 7 лет назад +10

    I think a small fix to the problem of the two colonies living in equilibrium when they can swim is to make people age faster when swimming ( it makes sense, in the olden days long trips on ships were dangerous). This fix will make swimming and "colonizing" new lands harder. If that doesn't work, you could also just decrease the strength of people permanently when they swim, so when they land it will be hard to conquer new lands.
    If your wondering how that might fix the equilibrium, the answer is that the equilibrium is caused be people constantly moving and colonizing parts of land owned by enemies, so this will make the colonization more difficult.
    Another suggestion is that you could perhaps change how age and strength works and make strength a function of age:
    Strength =
    OriginalStrength/.01(Age)
    Basically strength would be determined at birth and then would decrease with age (because people often get weaker when they get old). It could then be see that when Strength gets below a certain point people die.

    • @rateeightx
      @rateeightx 5 лет назад

      Maybe Strength Increases With Age For A While, And Then It Starts Decreasing?

  • @wesofx8148
    @wesofx8148 7 лет назад +40

    Try adding random elements to the combat or a rock-paper-scissor element. For example, life could have slash/stab/blunt strength/resistance which effect random numbers in combat.

    • @tamed4171
      @tamed4171 7 лет назад +1

      Problem with that is that normal RNG algorithms a repeat over time, and since RNG would be called several times per second, then the RNG would become predicable and practically useless.

    • @wesofx8148
      @wesofx8148 7 лет назад +5

      Tamed, that's not entirely true. RNGs do repeat, but most of the C++ Standard Library random number generators can generate extremely long sequences. Additionally, the chaos from a Game of Life simulation mean you don't even need a high quality RNG. In fact, a repeating sequence of numbers would appear random in this case.

    • @mrmastaofdesasta6994
      @mrmastaofdesasta6994 6 лет назад

      And you could make it that different colonies have different tendencies in "training" their childs. So one empire may be more proficient with blunt weapons, while another one may specialise in slashing, and yet another one trains stab and slash. The people would then probably tend to have resistance against the same type of attack that they are using.

  • @Plutoniumcube
    @Plutoniumcube 7 лет назад +1

    I feel like you could make some sort of lore about a randomly generated landmass while running this and having the outcomes as the plot and make an adaptation of it as a graphic novel or something. You could fill in a lot of the blanks, but still have a core story to follow that you don't even know.

  • @algorythm4354
    @algorythm4354 7 лет назад

    I think it's absolutely fantastic that there's a RUclips channel like this where someone just kinda does cool stuff.

  • @bryanha7927
    @bryanha7927 6 лет назад +1

    This may be a late suggestion but I think that, to better emulate the world, we can make small networks of maritime trade routes. These are narrow lines by which have relatively low chances of being entered... since these lines are narrow the cells are limited in movement directions, making them waste more time at sea, realistically this would make them more prone to disease, requiring a certain level of strength (technology) for longer distance travels.
    This is similarly the case with the discovery of the Americas, which are only made possible by the invention of certain maritime utilities. Indian Ocean trade routes are among the more famous examples of usage of maritime technology, so if this is applied correctly this would expose more of south asia to the other continents (such as south eastern asia, Oceania and east Africa), thus making it evolve to adapt and contend with other powerful empires near asia. This also enables water body centered empires such as Roman Empire.
    Also, I believe that the swimming problem is caused by the cells having, by chance, reached competitive equilibrium. Worry not, this is common. We see this often in the ecosystem as a population balancing mechanism of evolution. Historically, this results in one of two things: the countries merge into one, as you may have seen, and very slowly the superior on takes over (this happens very slowly and is very unnoticeable) or one takes over the other and splits it up within the land which only occasionally suffers from small rebellions which are subjugated almost immediately after.
    If the idea of swimming is to be applied instead of land bridges and trade routes, I believe that they should still clump around the trade routes (kind of as if it were a best-fit line) as that would likely prevent random nonsensical courses. This can be done by reapplying the old swimming (without turning around) and routes (which functions like land and doesn’t need to abide by the straight trajectory of the swimmer) that lead to the other land (the routes are not directly connected to land and can only be reached through short distance swimming). Once on route, swimmers can once again reproduce but are prone to disease. This will force a certain standard of power to enable long distance travels. Again, these networks should be situated:
    -Between the Americas, Europe, and North Africa (This allows for imperialism but only when nations have the appropriate strength)
    -From North-west Africa to southern tip of Africa to Madagascar to east africa Indian ocean network
    -Within the Indian Ocean (This likely results in an increase in exposure of south asia to east Africa, south east asia and Oceania)
    -Within the Mediterranean (This is the more interesting addition as it allows for empires like the Roman Empire)
    On a side note, land bridges are nice but they expose the continents to each other too early but not enough to allow conquest. This is like a vaccine... the countries adapt but they aren’t conquered. They also can’t conquer because the land bridges are to narrow and are easily reconquered. As a result, we are often left with Afro-Eurasia, Oceania, and the Americas.
    So yeah! Just trying to get it out there for someone to try it I guess. If these ideas, however, fail to grasp the concept of cellular automaton then I would like to know why. I find this kind of tinkering very interesting.

  • @subcinericius
    @subcinericius 7 лет назад +6

    Something cool would be mountains that give the defender extra strength would be cool. Could make things such as the iberian peninsula more defendable and create steady empires in between mauntains.
    Edit: Maybe using brown in the map to indicate mountain ranges.

    • @maxthexpfarmer3957
      @maxthexpfarmer3957 7 лет назад +2

      Also, moving from a plain to a mountain range permanently decreased strength.

  • @zhop951
    @zhop951 7 лет назад +2

    I have an idea for this:
    As you said, Cities would not work out too well as full cities, but maybe make them dots that randomly appear on land (mostly on coastline) and have a limit based on how many people there are, and then make the cities increase birth rate of the surrounding area and provide more strength to the people around them.

  • @appa3535
    @appa3535 7 лет назад +14

    If you ever make a part 3, I got a suggestion. Although it would kinda ruin the idea of cellular automation, it would be kinda cool. Add a mode where, instead of small pixels run around, you can make them invisible, and whenever they move to a spot, it gets added to their "Empire", and they'd have borders and stuff. It would be like one of those history map videos (if you've ever seen those), with each border the colour of the empire/colony. Moving to the spot wouldn't be the best because there'd just be a bunch of small unclaimed spaces, but you could do something if there's unclaimed territory sorrounded by an empire's invisible cells, it'll claim the inside territory. Also maybe a menu when you start to choose between border/normal.

  • @heasterian2508
    @heasterian2508 7 лет назад +22

    Mybe u will try to add height and temperature? (maps are in web, it will change speed of reproducing, medium temperature will be best (depending od red and blue colors) and in 2 high people will move slower)

    • @divitos1212
      @divitos1212 7 лет назад +2

      Kinda working on that with a similar cellular automaton I'm making. Biggest change in it I thought would be interested is including the general livability of the land through including a soil fertility map that effects the rate of spread.

    • @aaronhpa
      @aaronhpa 7 лет назад

      And also you can make a betrayal feature where in a fight the loser can switch sides to the winning colony

    • @divitos1212
      @divitos1212 7 лет назад +2

      That already kind of happens because the winner inhabits the losing cell. Something that would be interesting though is a civil war esque feature where colonies split off from the bigger one as the empire grows too large.

    • @aaronhpa
      @aaronhpa 7 лет назад

      I was thinking in absorving the best gens, like, 0,1%-1% growing with the strenght, also, your idea is good, would make harder to grow a superempire.

  • @lolatomroflsinnlos
    @lolatomroflsinnlos 7 лет назад +2

    +1 for Aquatic Ambience

  • @lodgin
    @lodgin 6 лет назад

    Things you could possibly add:
    1. Have a cell track how many cycles it has been since annexation and use that for various metrics. For example, the less war torn a cell, the longer the cell's lifespan.
    2. If as cell has four alive cardinal neighbours, have disease be... doubly likely? Even more so if surrounded on all sides and corners.
    3. Have a cell's strength scale depending on whether it has adjacent allies, this to encourage war fronts and not spiked invasions.
    4. Have a cell keep its colour from the previous owner if there is no new owner (it died, wasn't annexed)
    5. If a cell is surrounded by its own territory (dead or alive), that cell should have a weighted decision towards reproduction, not migration.
    6. If a cell is on a war front, then it should focus on migration, and the direction should be highly weighted towards moving away from the highest concentration of nearby allied cells, aka, invading enemy territory.
    7. A cell should have a small chance (~1%) of becoming a different colony, or a new colony. If it does so, it should flood fill in a circle around it depending on its strength. (The chance can also consider lifespan. It should also be more likely for cells with only a vestigial connection between two communities. For example, Australia looks like it's only connected by a land bridge 1 or 2 pixels wide, so those cells should be catalysts for secession movements.)

  • @ItsClassified
    @ItsClassified 7 лет назад +2

    I was just watching your minecraft in a week video again, im new to coding and watching your code is so nice haha keep it up mah ddude!

  • @Rynosaur94
    @Rynosaur94 7 лет назад

    I'd really like to see more types of land rather than just grass and water. Desert, Mountains, forests, ect.
    This series is really neat, can't wait for more.

  • @alexinman
    @alexinman 7 лет назад

    Building on one of the suggestions from the last video. Buildings (or walls/structures/obstacles).
    Each person has a small chance at building a wall where they're standing.
    Walls cannot be travelled on but can be attempted to be destroyed by members of other colonies. (Depending on strength of attacker and strength of the wall, perhaps?)
    Maybe have a higher chance at building a wall beside another wall. (To encourage a long chain of walls as a defence, instead of just a scattered map of random single walls that don't help much)
    It might be a good idea to make it so that a wall cannot be built if there are more than 1 or 2 walls adjacent to the current location, to prevent walls being built on every location and to help prevent the scattered mess of walls everywhere)
    Maybe have a craftsmanship skill/trait on people that dictate how strong their walls are when they build walls.
    It'd be interesting to see if this mechanic would allow the colonies to create well-supported areas (i.e. cities or empires) that are harder to take down by other colonies. Or if it would just result in utter chaos with walls being put up in random locations everywhere that would end in a stalemate.
    Great work on this so far though, very interesting to watch.

  • @appelpuree5236
    @appelpuree5236 7 лет назад +1

    I was waiting for this

  • @Tucsky
    @Tucsky 7 лет назад +3

    Can you make that when we drag the mouse over the colony name it highlight it in the simulation ?

  • @Edgarmario64
    @Edgarmario64 7 лет назад +7

    I don't think swimming was an issue. The issue you saw can happen without swimming if you left it on for long enough.

    • @javasea8097
      @javasea8097 7 лет назад +1

      Yeah it's an issue that I think he isn't actually noticing

  • @TheEightfoldPath_
    @TheEightfoldPath_ 7 лет назад

    The choice of swimming music was perfect lol

  • @kasparthorngirl
    @kasparthorngirl 7 лет назад +2

    Make it so there is a slight chance for a person "rebel" and form there own empire/colony the further from the first few people it is the more likely it would be.

  • @alekseykozin8108
    @alekseykozin8108 7 лет назад +9

    Hi, Hopson
    I really like your programs, can you check me idea and if like it then implement it?
    Basically you need to do an automaton which determines each pixel color on what colors were around that pixel on prev step
    But the rules of the transformation are not predefined, they can be randomly generated in run time
    Each set of random rules define an "universe" aka unique physical laws of this universe
    You run simultaneously thouthands of this universes and make entropy analyses each of them
    If you find an universe with not HIGH and not LOW entropy aka MIDDLE entropy, then you output it visually cuz it may look very cool
    I hope you like my idea :D

  • @DannyWilliamH
    @DannyWilliamH 7 лет назад

    Exaxtly. Had you not gotten that tip at the end I was going to post it here.
    Adding very thin land bridges was the easiest and best solution for the problem of water traversal.

  • @Pac0Master
    @Pac0Master 7 лет назад +1

    Little idea for that little game of yours
    Basically, classes.
    Rules:
    - At the start, the classes are distributed randomly,
    - Each new generations have an 80% chance to inherit the class of their parents.
    List of Classes
    - Peasants: = High birth rate/fertility, Low Strenght.
    They make the majority of the population.
    - Warrior: Low birth rate/Fertility, High Strenght.
    They're the ones who are the most likely to survive when invading the territories of others.
    - Scientists: = Very low birth Rate/Fertility, 0 Strenght, Slowly Increase Tech level over time
    Game mechanic
    - Tech level= Tech level increase Life longevity proportional to the level. The game start at 0. Can also be used to make Warrior deal more damage

    • @rcksnxc361
      @rcksnxc361 6 лет назад

      Pac0 Master 0 strength would kill scientist straight away wouldn’t it?

  • @Joe0400
    @Joe0400 6 лет назад +1

    To fix swimming, make it disadvantageous for the colony to attack onto land. Like a 75% combat strength modifier.

    • @chappie3642
      @chappie3642 5 лет назад

      Then he'd have to make an AI for the person to understand what is the best thing to do

  • @hereisyoursign6750
    @hereisyoursign6750 7 лет назад +5

    You should add basic geographic barriers in the form of different on map colors, if you wanted these barriers to be discreet you could make it a slightly different color hex and boom, so a slightly darker green pixel then counts as a high mountain, a high mountain can't be traversed, or just very hard to do so, this can make sure that colonies don't expand in such a smooth and unrealistic manner we see in the simulation, another good geographic tile would be desert, which is traversable but has a high chance of causing death and weakness, geographic features which would shape how colonies grow would make things realistic and allow you to meddle with the map more, so no more world superpowers growing out of the Sahara, or the Himalayan mountains, hope you see this, keep up this awesome work

  • @kevinjohnson1899
    @kevinjohnson1899 7 лет назад

    Your first video on this inspired me to write something similar of my own! Thanks!
    Not sure if this was changed later but when you showed the wrapping part it looked like going south from the buttom put you at the very top. For some maps this seems fine but for planet-type maps like Earth or Mars you should wrap to the other side of the buttom of the map. e.g. going south 1/4th from the left of the map should make you wrap around so you're now going north 1/4th from the right of the map. Maybe make it an option for each map.

  • @jackpaulreuter101
    @jackpaulreuter101 7 лет назад

    This is a wonderful series! Keep up the great work!

  • @suedonym3296
    @suedonym3296 7 лет назад +1

    oh shit, that equilibrium was rad

  • @snakemanson6352
    @snakemanson6352 7 лет назад

    Something that could very cool is if certain areas on land would be a different shade of green, indicating that it is "fertile land" which will give a lower chance of dying or increasing reproduction or something like that.

  • @Terraphice
    @Terraphice 7 лет назад

    First video I watched of yours, thanks for this!

  • @FourKelvin
    @FourKelvin 7 лет назад +1

    I programmed something similar to your Empire Automaton in the last couple of days. It's not really a automaton, since there can be multiple people on one cell and cells have plenty of properties, like habitability, fertility (for a food growth/starvation mechanic) and upgrade costs.
    Since people can share cells now, I changed the reproduction mechanics and assigned a sex to every person. That way the colonies don't spread exponentially across the map, but stay more localized for a while.
    Citizens also gain a social point, for every person that shares a cell with them. As soon as they reach 75 points, they choose a random profession: Traveler (can embark, but move randomly in water), Warrior (fights with double strength), Farmer (slowly upgrades the fertility of the cell he's on), Architect (improves habitability) and Doctor(increases LifeExpectancy of one random person he shares a cell with every turn).
    Most of the effects are barely noticable, so I made different rendering modes (Faction colors , total Habitability/Fertility, Upgraded Habitability/Fertility, Population density)
    I used C# and Unity for rendering (only really used one mono behavior, rest is regular normal C#). Yesterday the performance was mediocre, but I made some optimizations and now have multiple threads doing the updates. Now even with >300k people it runs fairly decent.
    If you want I can share the project.

    • @khoiduongminh5111
      @khoiduongminh5111 7 лет назад

      share it. i want to see this.

    • @FourKelvin
      @FourKelvin 7 лет назад

      sure, do you have any filesharing sites you trust where I should upload it?

    • @FourKelvin
      @FourKelvin 7 лет назад

      I actually added a lot in the mean time, Tiles can now be specialized, at first only to Academys (produce research) but later, when a tribe has sufficient research points, to Boot Camps (improves strength) and even Nuclear Launchers (anihilates an area and makes it uninhabitable for a while), Mind Control Devices (Area of effect that converts citizens to their faction) and Laser Satellite Centers (basically super overpowered sudden death mechanic, so that simulations don't go on forever, Satellites just move across the map and destroy everything that's under them, at least if it's from a different tribe)
      It's a lot more gimmicky now. It also works on my tablet but it's slow as fuck.
      My source code may not be documented properly, if you've got any questions, just ask

    • @FourKelvin
      @FourKelvin 7 лет назад

      bitbucket.org/Hanfkeks/civ-automaton
      Do you have access there?
      You'll need unity (just the normal personal edition), I didn't push the binaries because my upload is shit.

    • @khoiduongminh5111
      @khoiduongminh5111 7 лет назад

      how to run this in unity? sorry i am an absolute beginner at it

  • @jakubk.8836
    @jakubk.8836 7 лет назад +1

    Thanks for making a Westeros map included :P
    Can you add different terrain colours that influence the environment. so whiter green means snow or cold therefore strength is increased slower or actions take longer.
    thanks!

  • @jim4686
    @jim4686 6 лет назад

    I think for it to be a more interesting simulator you need to have some preference for groups of people to stay in one place, as if they're actual civilizations, and expand from there. That way it won't just be waves of people moving through the world randomly.

  • @canadianmapper7279
    @canadianmapper7279 7 лет назад +18

    MY MAP IS IN A HOPSON VIDEO!!! :DDD

  • @kolegaramic260
    @kolegaramic260 7 лет назад +2

    You know what to do :D, part 3

  • @chriswashingtonbeats
    @chriswashingtonbeats 7 лет назад +1

    Maybe instead of just fighting and killing each other to get land, there is a chance that both colonies will agree to not inhabit that square ! So the colonies can be diplomatic :D

  • @shwb9
    @shwb9 7 лет назад

    Something that would be interesting would be different types of people/cells, such as "companies" where they dont attack, but rather kill by defending, where when they are attacked you check theirs and every cell of their own type nearby, albeit at a reduced rate per cell, and maybe too many around the cell would actually reduce its strength, rather than boosting it, which would help control their population, or maybe a co-dependent type, where they dont attack, but rather join a random faction and boost their strength just by being nearby, but have a massively reduced life span, just some ideas to make it more interesting.

  • @pinho4023
    @pinho4023 7 лет назад +2

    Hi,loved the vid, here's a suggestion
    can u make it so that when a colony has been on one spot for 1000 years, it starts knowing that spot, having +100 streght there? i think it would be cool
    keep it up

  • @fisshbone
    @fisshbone 7 лет назад

    You should create extreme weather zones. The further a cell gets to the poles, the more likely they are to freeze to death, and the further towards the equator a cell goes, the more likely they will suffer from heat fatigue.
    You could even have a variable that changes with each new birth in a heat/cold zone, the more resilient a cell is likely to become through mutation.

  • @jasonlouw4846
    @jasonlouw4846 5 лет назад

    Was that the actual speed of your simulations or are they sped up also did you use multiprocessing? loved both of the videos you made would love to try make something like this.

  • @oscill8ocelot
    @oscill8ocelot 7 лет назад

    Is that 'Aquatic Ambiance' I hear in the background? Donkey Kong Country Hype!

  • @azhadial7396
    @azhadial7396 7 лет назад

    In my opinion, it would be cooler if multiple colony could live together: if they could invade a territory and stay here (these would be countries) but they would have random chances of becoming ally to a neighbor colony or hostile and attack it. This could create interesting behaviors, and also make the simulation a simulation of a real word instead of having a colony necessarily dominating all others.

  • @AdriansNetlis
    @AdriansNetlis 7 лет назад

    ThinMatrix on the suggested video on the right. Cool. You two are just amazing. Being able to code OpenGL engine from scratch is quite impressive. Once I managed to make pretty decent renderer with some nice BRDFs(GGX microfacet model), but when I tried implementing normalmaps, something didn't work and even after trying to fix it for multiple hours trying out everything that came in my mind, it still didn't work, I ended up giving up...

  • @luscher10
    @luscher10 7 лет назад

    This stuff is so good. Ceep it up man!

  • @powergannon
    @powergannon 7 лет назад

    It would be awesome if you could make the disease system more complex. Here is my suggestion:
    People have multiple disease slots. Random mutations at birth can cause a new disease that has a random damage level and individual flag (created by global variable of how many diseases exist.) A nearby person has a chance of catching that disease and it fills a single disease slot. (there is also a chance to pass on the diseases to children) In this way, diseases that are not very damaging can kind of work like antibodies; taking up disease slots and protecting the person from catching a worse disease

  • @quakquak6141
    @quakquak6141 7 лет назад

    It would be interesting to have a drawback to being strong, so that depending on the situation a certain colony will randomly evolve stronger or weaker (basically if they are at war they will get stronger otherwise they'll get weaker)

  • @TheMilkyMoose
    @TheMilkyMoose 7 лет назад

    I'm loving the dragon quest music :D

  • @youngspunky2835
    @youngspunky2835 7 лет назад

    I just love the idea of this game

  • @jamesgabor9284
    @jamesgabor9284 5 лет назад +1

    I have a good idea, how about if there’s a small chance that a rebellion will start in an empire, it would make a random amount of people in the same areas color different and mutate everyone in there’s strength to be nice to watch. Also maybe make it that the rebels will have a higher chance of moving into the squares with the origin empire than others. This part may ruin the purpose but you could also make rebels more common on other continents from where the empire started, for example if their was a empire that took over all of Asia and then Australia, there’d be a higher chance of rebellion in Australia than Asia

  • @rad8078
    @rad8078 7 лет назад

    All different abilities to different races please, I love your videos and hope to see more Dev videos.

  • @Cropod
    @Cropod 7 лет назад

    Love the dragon quest music!

  • @perdexD
    @perdexD 7 лет назад

    The small colonies inside each other (also the equilibrium with the swimming) seems odd, since a surrounded group should be quickly overwhelmed. One possible fix would be that the group behind a square would help with the "fighting". It could even be made while keeping this a pure cellular automaton: for example, a fighting cell could "steal" power from an ally that is not fighting

  • @MelchiorPhilips
    @MelchiorPhilips 7 лет назад

    I'd love to see large colonies having a chance to split up into smaller colonies.

  • @mrmastaofdesasta6994
    @mrmastaofdesasta6994 6 лет назад

    Something that I feel would be a bit more realistic is that people should have different tendencies to move at all. If you think about it, most people stay in one place their entire life. If you changed that stat according to how many people live next to each person, so it would almost never move if lots of people are nearby, and always move if no people are nearby, you could get citys and "adventurers" who travel around.
    Now that I think about it, you would only need a boolean stat called "travelling spirit" to determine that. If a person has this stat, it could move just like in your simulation, and if not, it would have a 0.75 chance of just staying where they are. As I said before, this chance could also be boosted or decreased according to how many people are near them.

  • @krakor92
    @krakor92 5 лет назад

    *Talk about a swimming feature*
    *Use Aquatic Ambiance as a background music*
    Perfection.

  • @maginth
    @maginth 7 лет назад

    What i miss from these simulations is the possibility do switch between maps showing individual stats in a gradient color scale. Maps for : age, strength, diseases, reproductive value, maybe a walked distance counter...
    In particular i was interested in the "population wave" phenomenon. My hypothesis is a population wining a territory tends to fill it with younger and more healthy people, whereas in the losing side the population is more old and diseased. So even if the winning population is weaker sometime : less victory > more victory - higher mortality rate
    Maybe you could balance this phenomenon by adding a chance to contract a disease when one kills a diseased person.
    Then looking at your code i notice strange things :
    it seems person.giveDisease() give a 100% chance to contract the disease not 50%, it might be a mistake.
    Mutations can only decrease the strength, it seems only natural selection prevent it to plunge (shorter life, less children)
    maybe at the end of Person.cpp change :
    child.strength *= Random::get().floatInRange(0.0, 1);
    with :
    child.strength *= Random::get().floatInRange(0.0, 1.1); // 10% chance to have beneficial mutation
    To make the game even funnier my suggestion would be to get ride of the discret colonies, and rather have mutations on the 3 components r g b of the color of each individual. Then when 2 individuals bump in each other, they fight if : (r1 - r2)² + (g1 - g2)² + (b1 - b2)² > xenophobia threshold
    Even funnier would be to make the xenophobia threshold an individual trait that can mutate over generation for cooperation vs agression cultures

  • @EnderAnimationsEnderAnimations
    @EnderAnimationsEnderAnimations 7 лет назад

    You should implement borders, so that both colonies don't go into each other attacking constantly, which should give either one colony some time to prepare something before going into war against the other colony.

  • @kazootie8687
    @kazootie8687 7 лет назад

    I think it would be cool if you were to add more types of terrain to the map. For example: mountains, deserts, and jungles. The cells could have different reproductive rates in these areas along with different movement speeds to make the program more realistic. Mountains could also have a higher chance of death because its cold and deserts because its hot. :D I want this added so bad xD

  • @NatjoOfficial
    @NatjoOfficial 7 лет назад

    Okay, I don't know if this is possible (could be) but have it be possible for certain colours not attack each other. Like making colony 1 not attack colony 3 and 4, essentially creating fractions? I mean, it could be possible to make something like it in the pre-game config area/custom empire but... yeah, I won't blame you if you can't :D

  • @InfernoKaygaming
    @InfernoKaygaming 7 лет назад

    Love the dragon quest music

  • @gwenrichard7507
    @gwenrichard7507 7 лет назад

    You could make patterns make things. Such as 3x3 kills the middle cell. A ring makes a city, this would have a long life and spawns twice as fast. You could even make. Cities could pass along movement bias.

  • @Nugcon
    @Nugcon 7 лет назад +7

    0:07 Hey mom I'm famous

    • @ilayws4448
      @ilayws4448 4 года назад

      are you "the nugget bacon"?

  • @TheElusiveMrAlmond
    @TheElusiveMrAlmond 7 лет назад

    Would it be possible to make different terrains? Such as deserts being less hospitable, and therefore making it more difficult for people to move through them, you could also have more snowier areas further away from the equator.

  • @divitos1212
    @divitos1212 7 лет назад

    Hey Hopson, loving these Cellular Automaton video. I'm working on making a similar simulation with slightly more depth in the rules of attacking but kinda worried it's gonna be too close to your videos.

  • @dtraptor6864
    @dtraptor6864 5 лет назад

    I may be a little bit late, but maybe there could be a "war" implement that just stops the colonies from taking over each other until some random variable is true.

  • @tommarch.4493
    @tommarch.4493 7 лет назад

    adds the alliances, they can withdraw after a period of time, create themselves randomly.
    Cities, that some "humans" remain in places and form cities.
    Treaties of peace, after the fall of all the cities of an empire, they change color (variable of the victor) or the last city exists and in alliance with the winner.

  • @kahlyzb
    @kahlyzb 7 лет назад

    Hey, I hope this doesn't sound too critical, but I'm a bit confused - why was swimming the next step? The fundamental philosophy of your simulation is that you're using land and water to bias the motion of your colonies - so why not extend it to add other biases in the form of secondary, tertiary, etc, maps? For example, a gradient that runs from the equator outward that modifies disease generation rates would be a simplified first step at modifying the habitability of different areas. A height map that biases growth direction might represent geological features, and could certainly make the dynamical representations more interesting to watch.
    To restate my question, it seems likely that you've already considered this - is there a reason you ruled it out?

  • @skwirl3014
    @skwirl3014 6 лет назад +1

    I'm currently writing a 3d cellular automation and a directional pointcloud renderer. We could share our ideas and projects. Are you on discord or anywhere?

  • @tomfu430
    @tomfu430 7 лет назад

    I really like this project and the whole idea behind it, though it looks weird when few single colonist travel through a massive "empire", ending at one end and turning back again. Also I dislike the weird green space between the citizens (might be a personal thing) but I rather liked how it looked in the first part at min 5:05.

  • @bitterlemonboy
    @bitterlemonboy 7 лет назад +2

    Some "maps" i made:
    us_flag.png: i.imgur.com/9v5NkEG.png
    africa.png: i.imgur.com/jerKMOE.png

  • @Alforest22
    @Alforest22 7 лет назад

    I love empire continue with it

  • @devanmetz
    @devanmetz 7 лет назад

    How about when there is a group of people that get to a certain strength they create a castle or some sort of fortifications, this would increase the overall strength and also lower disease in that small area. Limit it to 1 or 2 per colony as a sort of capital and also limit the size based on the population, so that the village can grow to be like 10% of the population, but will not get lowered unless the village itself is taken over. This would need like set coordinate boundaries when it is created, based on the population. This may also allow slightly weaker colonies to stand a chance and maybe hold their ground in the world. Also make a shift in color or an outline around a village to signify that it is there. I think it would look awesome when the world comes to equilibrium with a bunch of different colonies and sort of countries scattered around. Also I think it would be cool if like the weakest 10% or 20% of colonies would not fight each other and instead strengthen each other when they meet, or even combine their colors when they meet and turn into one stronger colony. Im not sure how easy it would be to implement any of these things, but I hope this suggestion helped.

  • @quarkstuff
    @quarkstuff 5 лет назад

    I think I know why the two colonies didn't exactly die, it was because they had either equal, or close to the same strength value.
    Meaning for every kill a colony makes the other also earns a kill.I recommend the value being instead a kill/death ratio, where they have a higher chance to either kill or die, this will differ on every individual.

  • @MrMontugar
    @MrMontugar 7 лет назад

    would it be possible to implement a fitness function that took distance from colony start position into account? that way the different groups would be biased to remain close to their origins and "defend" when other colonies encroach.

  • @liammccoy2208
    @liammccoy2208 6 лет назад +1

    Why is there always one group that is constantly migrating and spreading in small packets around the big empires?

  • @pluransart1795
    @pluransart1795 7 лет назад

    Would it be hard to get tribes to form after being disconnected for a certain amount of time, from the main body of the expanse. Maybe the tribe will get a new colour and turn hostile towards another colour

  • @gian2kk
    @gian2kk 7 лет назад +1

    Put in climate and bonus/malus to people moving too much around different climate zones

  • @RamiSlicer
    @RamiSlicer 5 лет назад

    I really like the new gooey.

  • @drazile1720
    @drazile1720 7 лет назад

    The bright green background makes some colours (such as yellow) more difficult to see. Perhaps a white or grey background would be clearer?

  • @ladyViviaen
    @ladyViviaen 4 года назад

    i sat and watched this game play out for 3 hours lol

  • @tistatos
    @tistatos 7 лет назад

    Perhaps you should add that cells fight with combined strength of cells in close vicinity?
    I'm thinking that technically if one colony managed to breed one single mega-cell it could eradicate a whole colony by itself.
    and if in a situations with 10 vs 1 - It seems unlikely the single cell would win.

  • @syedshamikhshabbir576
    @syedshamikhshabbir576 7 лет назад

    Hi Hopson,
    I love the work you are doing here. I have one question though, where to find ideas for making these kind of simluations. I want to make one but I dont really have a clue what to make or where to begin
    Help me out a bit
    Thanks

    • @Hopsonn
      @Hopsonn  7 лет назад

      I'd start with Conway's Game of Life, it's the most famous cellular automaton and fairly trivial to create

  • @bulutsonmez2951
    @bulutsonmez2951 7 лет назад +3

    Fantastic

  • @AlexVasiluta
    @AlexVasiluta 7 лет назад

    It would be cool to make some speed buttons (pause, slow, medium, fast, very fast), more positive and negative colony modifiers (like quicker aging, further distance to travel oceans etc.) and (maybe not this one) save all positions to a file so you can play a "timeline" if set as option in the config file

  • @homosapienssapiens19
    @homosapienssapiens19 7 лет назад

    Maybe swimming would work if each turn you're in the water you lose some strength/age faster, thereby making swimming an actual challenge to do.

  • @epic312archive7
    @epic312archive7 7 лет назад

    You know you're a dedicated Hopson fan when you wait for 5 minutes and get the 1000th like

  • @eaglewings41
    @eaglewings41 7 лет назад

    On the idea of cities, you can make a cell born with an attribute of city founder. If at birth the surrounding cells have a certain population density within a given radius, the city founder cant move, doubles in strength, and produces offspring at triple the rate. This may present a problem when founding coastal cities, so you may want to remove ocean cells from the density calculation. Cities will grow if the city spawns another city founder. because cities spawn founders, you may need to play with the strength and reproduction rates.

  • @tuckercraft5972
    @tuckercraft5972 7 лет назад

    Perhaps a way to prevent equilibrium would be to increase overall strength based on how many cells are in the empire

  • @jdmeesey
    @jdmeesey 5 лет назад

    Jumped when I suddenly heard Earthbound in the background 1:45

  • @EthanMcFarlinCraft
    @EthanMcFarlinCraft 7 лет назад

    Make it so that over time, a large colony will fracture into smaller, individual colonies

  • @liamsullivan5783
    @liamsullivan5783 6 лет назад

    I tried programming this and I use a grid and I expand based on chance every 20 ms and after it fills up it tends to drift leftward and upward. Any idea why?

  • @guntruckfella653
    @guntruckfella653 7 лет назад

    Hey Hopson, what music do you use in your videos? It’s great background music, and I would like to possibly use it myself. P.S, as a new programmer, you’re videos are REALLY good. Keep it up!

    • @Hopsonn
      @Hopsonn  7 лет назад

      It's generally music from old video games.
      In the future, I'll put the music in the description :p (I tend to re-use songs a lot)

    • @guntruckfella653
      @guntruckfella653 7 лет назад

      Hopson thanks.

  • @androumac1169
    @androumac1169 5 лет назад

    what this is really missing is mountains; cells move far slower on those than normal tiles, and their strength is far lower