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

Поділитися
Вставка
  • Опубліковано 19 чер 2024
  • I implement some of your suggestions here :)
    ------------------
    Source Code:
    github.com/Hopson97/Empire
    Download:
    Normal:
    drive.google.com/open?id=0B-b...
    Laser Edition:
    drive.google.com/open?id=0B-b...
    --------------
    Links:
    GitHub: github.com/Hopson97
    Discord Server: / discord
    Support me on Patreon: / hopson
    Follow me on Twitter: / hopson1997
    Follow me on Twich: / hopsonn
    Subscribe to the subreddit: / hopsoncommunity
    Community Channel: / @hopsoncommunity8184
  • Наука та технологія

КОМЕНТАРІ • 436

  • @HysterS-FT
    @HysterS-FT 6 років тому +155

    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 6 років тому +15

      Ethan that would actually look super badass

    • @MCGodsGaming
      @MCGodsGaming 6 років тому

      FLy1nRabBit fuck you dude. whats ur fricking problem??

    • @HysterS-FT
      @HysterS-FT 6 років тому +22

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

    • @MCGodsGaming
      @MCGodsGaming 6 років тому

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

    • @HysterS-FT
      @HysterS-FT 6 років тому +8

      lol what on earth are you talking about

  • @dustyhob0
    @dustyhob0 6 років тому +332

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

  • @dr_atheist4272
    @dr_atheist4272 6 років тому +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 UA-cam 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 6 років тому +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 5 років тому

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

  • @femimark5021
    @femimark5021 6 років тому +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.

  • @Hopsonn
    @Hopsonn  6 років тому +172

    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 6 років тому +1

      as i said, make it more complex
      *laugh*

    • @mekquake5879
      @mekquake5879 6 років тому +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 6 років тому +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 6 років тому +3

      Here I was hoping for you to code Victoria III

    • @quil180
      @quil180 6 років тому

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

  • @preuen4339
    @preuen4339 6 років тому +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?

  • @minecraft-planestrainsanda486
    @minecraft-planestrainsanda486 6 років тому +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 6 років тому +7

      the swimming with more strength sounds good

    • @Lyestria
      @Lyestria 5 років тому

      Minecraft - Planes,Trains and Automobiles z

    • @kamm6001
      @kamm6001 3 роки тому

      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

  • @NewSchattenRayquaza
    @NewSchattenRayquaza 6 років тому +22

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

  • @lolatomroflsinnlos
    @lolatomroflsinnlos 6 років тому +2

    +1 for Aquatic Ambience

  • @algorythm4354
    @algorythm4354 6 років тому

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

  • @ItsClassified
    @ItsClassified 6 років тому +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!

  • @wesofx8148
    @wesofx8148 6 років тому +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 6 років тому +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 6 років тому +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.

  • @jackpaulreuter101
    @jackpaulreuter101 6 років тому

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

  • @appelpuree5236
    @appelpuree5236 6 років тому +1

    I was waiting for this

  • @subcinericius
    @subcinericius 6 років тому +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 6 років тому +2

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

  • @Terraphice
    @Terraphice 6 років тому

    First video I watched of yours, thanks for this!

  • @luscher10
    @luscher10 6 років тому

    This stuff is so good. Ceep it up man!

  • @Plutoniumcube
    @Plutoniumcube 6 років тому +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.

  • @bryanha7927
    @bryanha7927 5 років тому +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.

  • @Rynosaur94
    @Rynosaur94 6 років тому

    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.

  • @kevinjohnson1899
    @kevinjohnson1899 6 років тому

    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.

  • @kasparthorngirl
    @kasparthorngirl 6 років тому +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.

  • @appa3535
    @appa3535 6 років тому +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.

  • @TheEightfoldPath_
    @TheEightfoldPath_ 6 років тому

    The choice of swimming music was perfect lol

  • @suedonym3296
    @suedonym3296 6 років тому +1

    oh shit, that equilibrium was rad

  • @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.)

  • @Joe0400
    @Joe0400 5 років тому +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

  • @alexinman
    @alexinman 6 років тому

    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.

  • @zhop951
    @zhop951 6 років тому +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.

  • @Erzis
    @Erzis 6 років тому

    Love it dude

  • @heasterian2508
    @heasterian2508 6 років тому +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 6 років тому +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 6 років тому

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

    • @divitos1212
      @divitos1212 6 років тому +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 6 років тому

      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.

  • @DannyWilliamH
    @DannyWilliamH 6 років тому

    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.

  • @hereisyoursign6750
    @hereisyoursign6750 6 років тому +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

  • @kolegaramic260
    @kolegaramic260 6 років тому +2

    You know what to do :D, part 3

  • @youngspunky2835
    @youngspunky2835 6 років тому

    I just love the idea of this game

  • @saassees9392
    @saassees9392 6 років тому

    I like your dragon quest background music... loved that game

  • @lion2808
    @lion2808 6 років тому

    keep on your so motivating

  • @USBEN.
    @USBEN. 6 років тому

    Cool stuff mane.

  • @kRySt4LGaMeR
    @kRySt4LGaMeR 6 років тому

    Awesome video, keep it up ;)

  • @chriswashingtonbeats
    @chriswashingtonbeats 6 років тому +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

  • @Tucsky
    @Tucsky 6 років тому +3

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

  • @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.

  • @pinho4023
    @pinho4023 6 років тому +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

  • @alekseykozin8108
    @alekseykozin8108 6 років тому +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

  • @canadianmapper7279
    @canadianmapper7279 6 років тому +18

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

  • @AdriansNetlis
    @AdriansNetlis 6 років тому

    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...

  • @bulutsonmez2951
    @bulutsonmez2951 6 років тому +3

    Fantastic

  • @TheMilkyMoose
    @TheMilkyMoose 6 років тому

    I'm loving the dragon quest music :D

  • @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

  • @gamerofgolds
    @gamerofgolds 6 років тому

    I love empire continue with it

  • @rad8078
    @rad8078 6 років тому

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

  • @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.

  • @shwb9
    @shwb9 6 років тому

    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.

  • @snakemanson6352
    @snakemanson6352 6 років тому

    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.

  • @BluBOo_
    @BluBOo_ 6 років тому

    I love the dragonquest music :D

  • @fisshbone
    @fisshbone 6 років тому

    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.

  • @Cropod
    @Cropod 6 років тому

    Love the dragon quest music!

  • @MelchiorPhilips
    @MelchiorPhilips 6 років тому

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

  • @divitos1212
    @divitos1212 6 років тому

    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.

  • @quakquak6141
    @quakquak6141 6 років тому

    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)

  • @oscill8ocelot
    @oscill8ocelot 6 років тому

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

  • @rcookie5128
    @rcookie5128 6 років тому

    love this channel (pretty new here still)!

    • @rcookie5128
      @rcookie5128 6 років тому

      awesome background musik btw.
      I recognized:
      1. ??? 2. DQ9 Heavens Prayer, 3. something from Earthbound (I knooow it, but forgot the name), 4. seems familiar, but not sure

  • @FourKelvin
    @FourKelvin 6 років тому +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 6 років тому

      share it. i want to see this.

    • @FourKelvin
      @FourKelvin 6 років тому

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

    • @FourKelvin
      @FourKelvin 6 років тому

      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 6 років тому

      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 6 років тому

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

  • @syedshamikhshabbir576
    @syedshamikhshabbir576 6 років тому

    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  6 років тому

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

  • @insireus8815
    @insireus8815 6 років тому

    Yay new vid

  • @perdexD
    @perdexD 6 років тому

    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

  • @jakubk.8836
    @jakubk.8836 6 років тому +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!

  • @javasea8097
    @javasea8097 6 років тому

    OMG This is heaven

  • @datdogedatsdowndastreet7150
    @datdogedatsdowndastreet7150 6 років тому

    Amazing

  • @EnderAnimationsEnderAnimations
    @EnderAnimationsEnderAnimations 6 років тому

    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.

  • @powergannon
    @powergannon 6 років тому

    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

  • @TheElusiveMrAlmond
    @TheElusiveMrAlmond 6 років тому

    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.

  • @RamiSlicer
    @RamiSlicer 4 роки тому

    I really like the new gooey.

  • @Edgarmario64
    @Edgarmario64 6 років тому +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 6 років тому +1

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

  • @azhadial7396
    @azhadial7396 6 років тому

    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.

  • @lizlewis238
    @lizlewis238 6 років тому

    For the discrete bridges, maybe have a look at the map from the Risk board game as it has a similar system for ocean travel I think

  • @NatjoOfficial
    @NatjoOfficial 6 років тому

    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

  • @ladyViviaen
    @ladyViviaen 3 роки тому

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

  • @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.

  • @Waffles_Syrup
    @Waffles_Syrup 6 років тому

    hey is there a list of songs used in the video?

  • @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.

  • @InfernoKaygaming
    @InfernoKaygaming 6 років тому

    Love the dragon quest music

  • @maginth
    @maginth 6 років тому

    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

  • @gwenrichard7507
    @gwenrichard7507 6 років тому

    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.

  • @krakor92
    @krakor92 5 років тому

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

  • @kazootie8687
    @kazootie8687 6 років тому

    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

  • @TheAmericanFox
    @TheAmericanFox 5 років тому

    well if you are going to make a part three in the future even though it's going on a year this video was uploaded, you could put in a chance that a croup of people will break off creating two separate colonies

  • @MrMontugar
    @MrMontugar 6 років тому

    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.

  • @AlexVasiluta
    @AlexVasiluta 6 років тому

    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

  • @Stypox
    @Stypox 6 років тому

    What developing program do you use?

  • @lilyrooney
    @lilyrooney 6 років тому

    Noice man

  • @quarkstuff
    @quarkstuff 5 років тому

    could you have it so that when you go to the end of a image it loops over, so if you go right or left long enough you'll end up on the other side and the same with up and down, like a globe, sorta?

  • @guntruckfella653
    @guntruckfella653 6 років тому

    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  6 років тому

      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 6 років тому

      Hopson thanks.

  • @Pac0Master
    @Pac0Master 6 років тому +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 5 років тому

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

  • @eggmon9668
    @eggmon9668 6 років тому

    What are the songs playing in the background?

  • @maciejswiechowski5888
    @maciejswiechowski5888 4 роки тому +1

    What is the music you used at 5:18? Can I use it too for my presentations?

    • @Hopsonn
      @Hopsonn  4 роки тому

      I think it is aquatic ambiance from donkey kong 2, and yeah sure why not

    • @maciejswiechowski5888
      @maciejswiechowski5888 4 роки тому

      @@Hopsonn cheers, good man

  • @Nugcon
    @Nugcon 6 років тому +7

    0:07 Hey mom I'm famous

    • @ilayws4448
      @ilayws4448 4 роки тому

      are you "the nugget bacon"?

  • @devanmetz
    @devanmetz 6 років тому

    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.

  • @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?