Posted August 03, 2026 by GOZOHO
I’ve completed a new prototype that allows the player to switch control between the default player character and a villager.
Until now, villagers were treated only as NPCs. However, one of the main ideas behind the project is that any character in the world may eventually become playable.
To support this, I introduced a shared BaseCharacter structure and separated the character itself from the system controlling it.
The current structure is:
BaseCharacter └─ BaseNPC ├─ Villager └─ King
Characters can now be controlled by different controllers:
AI Controller Player Controller
Pressing the C key switches control between the default player and Villager01.
Only one character receives player input at a time.
BaseCharacter is now based on CharacterBody2D.
The character is responsible for:
Controllers are responsible only for producing movement intent.
Controller - Reads player input or makes an AI decision - Sends a movement direction to the character Character - Calculates velocity - Calls move_and_slide() - Handles collision - Updates the visual direction
This means the same villager can use both AI movement and player movement without implementing separate physics systems.
The previous static NPC collision was moved to the shared character body.
The following elements now move together:
The existing King, other villagers, interaction areas, and character appearances remain compatible with the new structure.
This is still a control-switching prototype rather than the final character system.
The camera and player UI still follow the original player character.
The next major tasks include:
The important result is that a villager is no longer permanently limited to being an NPC.
The same world character can now alternate between AI control and player control.