u/ArmyOfChickens

Unity 6000.5.8fl
▲ 0 r/unity

Unity 6000.5.8fl

I just finally updated my unity to 6.5.8fl and something i noticed that ive never had an issue with is i go to create a project and it immediately goes to "Enter safe mode?" Prompt. Created a new project just to check out the changes and the damn thing is broke before I get to try it 🤣 any ideas?

u/ArmyOfChickens — 1 day ago
▲ 12 r/godot

Top down 2D

Been working on this one for about 2 1/2 weeks.

Some crafting sequence gameplay, skipped ahead a few times cause chopping and mining everything on video wouldve make it long for more reason

Theres still alot of placeholders right now, artist is working on animations so it quits looking wack lmao. Almost all the ui still needs to be polished later on as well. Functionalityyyyyyy first lol. 5 crafting stations done so far outta 22, ive added.

Theres more functionality in this video as well: (https://m.youtube.com/watch?v=Q0NIm30SNoQ&t=11s&pp=ygUSRGV2bG9nIDE6IDNkIGluIDJk)

Thoughts?

u/ArmyOfChickens — 1 month ago
▲ 231 r/godot

Npcs with advanced Ai

Since starting my journey with godot 3 to being on 4.6 for awhile now. I've played around with ways to make the NPCs feel as alive as possible.

The end result: A highly optimized, chemically-driven Artificial Life (ALife) simulation. Every NPC decides what to do based on their identity, their current emotional state, and pure float math.

​Here is a breakdown of the systems running the NPCs under the hood:

​1. Time-Sliced Processing (The AI Manager)

To handle 60+ complex NPCs without dropping frames, I built a global Autoload manager. Instead of every NPC running complex raycasts and neural math every frame, the manager staggers their processing in batches. At 60 FPS, the entire town recalculates their life decisions exactly 5 times a second. It's visually instantaneous but completely flattens CPU spikes.

​2. The Identity Blueprint (Brain Profiles)

NPCs don't know what their "Job" is. There is no code that says if Job == "Blacksmith". Instead, identity is driven by Custom Resources (.tres) containing neural weights. The Master Builder just happens to have a labor_instinct of 0.9, while the Town Bum has a 0.0. I can create entirely new family lineages and generational roles just by tweaking float sliders in the inspector.

​3. The Endocrine System (VAD Model)

Every NPC has a simulated internal chemistry tracked via three core floats (-1.0 to 1.0): Valence (Pleasure/Pain), Arousal (Energy), and Dominance (Control/Helplessness). These naturally decay toward the specific resting baselines defined by their family lineage.

​4. The 27-State Emotion Matrix

Instead of a massive, laggy if/elif chain, I built a 3x3x3 quantized grid. The system reads the raw VAD chemicals and instantly maps them to one of 27 distinct emotional states (e.g., "Horror", "Excitement", "Boredom", "Jealousy"). This string is then passed directly to the AnimationTree to change their posture and walk cycles.

​5. The Neural Network (Decision Engine)

Decisions are purely mathematical. The Brain looks at environmental inputs (like proximity to a Wood Node or a Player) and multiplies them by their Brain Profile weights and current emotional urgency.

​Example: If a monster portal opens, the "Threat" input spikes. The Brain multiplies this by their Helplessness (inverted Dominance). A civilian's "Flee" score will mathematically overpower their desire to work, while the Mayor (High Dominance) might stand his ground. The highest-scoring action always wins.

​6. Memory Logging & Autonomous Hobbies

When an NPC finishes a task, they log the action and the exact Valence (pleasure) it yielded into a dictionary. If their Emotion Matrix hits "Boredom", they query this Memory Bank for their highest-yielding experience and autonomously go do it as a hobby. Furthermore, there's an overnight decay protocol—if they haven't done something in weeks, the memory's emotional charge fades to 0.0 and is permanently deleted to save RAM.

​7. Chemical Social Webs & Viral Gossip

The Affinity Ledger tracks relationships, but interactions aren't random dice rolls. When two NPCs talk, the math checks for chemical synergy. If two high-Dominance characters talk, they mathematically clash. If their energy levels (Arousal) don't match, it's awkward.

​The Gossip Protocol: If the interaction goes well, they duplicate their most emotionally charged memory (e.g., getting attacked at the Night Portal) and push it directly into the other NPC's brain. The memory's intensity dilutes slightly with each transfer. This means fear and knowledge physically spread block-by-block through the town's rumor mill!

I will be creating a video showcasing this after I feel enough simulations have been ran and all yield success.

🤙🏻🤙🏻 Until next time~

reddit.com
u/ArmyOfChickens — 3 months ago