Okey, this is much better.
-
Okey, this is much better.
My earlier mistake was pretty dumb. I have a "level of desperation" an amount of time that passes where, if the NPC does not find any food. It will change direction.
Initially the direction was "forward". So they always went to the center of the stage.
But!... I had coded a function to randomize between going home OR going to one of the play area's edges.
BUT!... I never actually changed the decision making to call that random spot function.
-
Okey, this is much better.
My earlier mistake was pretty dumb. I have a "level of desperation" an amount of time that passes where, if the NPC does not find any food. It will change direction.
Initially the direction was "forward". So they always went to the center of the stage.
But!... I had coded a function to randomize between going home OR going to one of the play area's edges.
BUT!... I never actually changed the decision making to call that random spot function.
In Conway's Game of Life, there's death and reproduction. I'm not gonna invent new math here but I wanna do a dumbed down version. So, now I want to have some rules for NPCs to have (in order of complexity):
1. Death. if energy is depleted.
2. Reproduction. Instead of spawning NPCs have them seek a mate reproduce
3. Tools. Have something in the field besides energy pellets. Maybe something that helps the individual NPX that picks it up
4. Factions. Plus joining/attacking other factions.
-
Okey, this is much better.
My earlier mistake was pretty dumb. I have a "level of desperation" an amount of time that passes where, if the NPC does not find any food. It will change direction.
Initially the direction was "forward". So they always went to the center of the stage.
But!... I had coded a function to randomize between going home OR going to one of the play area's edges.
BUT!... I never actually changed the decision making to call that random spot function.
@afreytes in a game I have recently played, a dev mentioned that their scheme is to have a "wave function" - presumably some combination of sines, that creates a value at every point on the map corresponding to a likelihood of something - a spawn point, a food discovery, whatever. A discovery is enabled when a random roll at a time-step, exceeds the wave function at that point. There can be as many wave functions as food items, or as many as NPCs, they are not very complex functions. fwiw
-
In Conway's Game of Life, there's death and reproduction. I'm not gonna invent new math here but I wanna do a dumbed down version. So, now I want to have some rules for NPCs to have (in order of complexity):
1. Death. if energy is depleted.
2. Reproduction. Instead of spawning NPCs have them seek a mate reproduce
3. Tools. Have something in the field besides energy pellets. Maybe something that helps the individual NPX that picks it up
4. Factions. Plus joining/attacking other factions.
After, if I finish that, then I would like to see how to make that decision making faster or more efficient.
Right now I'm just spawning nodes in Godot until frames drop below 30. 120 NPCs means 120 "NPC brain" scripts.
How many NPCs can be supported with that, versus... Trying to have all the NPCs decision run separately on just one script.
I'm trying to make it "work". Then make it "complete". Then make it "fast".
-
@afreytes in a game I have recently played, a dev mentioned that their scheme is to have a "wave function" - presumably some combination of sines, that creates a value at every point on the map corresponding to a likelihood of something - a spawn point, a food discovery, whatever. A discovery is enabled when a random roll at a time-step, exceeds the wave function at that point. There can be as many wave functions as food items, or as many as NPCs, they are not very complex functions. fwiw
@CadeJohnson This is a nice idea! I like it.
Edit: I keep meaning to try to incorporate Wave Function Collapse for terrain generation. But using it to also spawn items is worth exploring.
-
After, if I finish that, then I would like to see how to make that decision making faster or more efficient.
Right now I'm just spawning nodes in Godot until frames drop below 30. 120 NPCs means 120 "NPC brain" scripts.
How many NPCs can be supported with that, versus... Trying to have all the NPCs decision run separately on just one script.
I'm trying to make it "work". Then make it "complete". Then make it "fast".
ok... uh... I kinda forgot I left the simulation running...
these guys are desperate... and there's no food anywhere...
-
@CadeJohnson This is a nice idea! I like it.
Edit: I keep meaning to try to incorporate Wave Function Collapse for terrain generation. But using it to also spawn items is worth exploring.
@afreytes I think real terrains are fractal. I don't know much more about it than that - but you can often see it on coastlines - repeated patterns of points and bays along the north coast of a beloved island, or the repeated forking of tidal creeks are examples - while no two bays or forks are identical, they resemble each other, and slowly give way to some other pattern(s) over distance (so maybe that is where some kind of standing wave-pattern is used to describe which patterns are in force, and to what extent.
-
ok... uh... I kinda forgot I left the simulation running...
these guys are desperate... and there's no food anywhere...
@afreytes Poor guys
-
@afreytes Poor guys
@GreenSkyOverMe đ YES! I feel so bad! đŤ
-
ok... uh... I kinda forgot I left the simulation running...
these guys are desperate... and there's no food anywhere...
Pretty pleased with my simple NPCs.
They can:
Scan for energy
Pick from closest pellet
Move near pellet
Consume pellets
Die from no energyThere's some balance between spawning pellets, spawning NPCs, and how much energy the NPC has at the start, in order for population to keep increasing.
Wait, am I making one of those Primer simulation videos? đ¤
-
undefined oblomov@sociale.network shared this topic on