I’m excited to share something special with you today from my upcoming adventure game project that has character of Fera-182. While I’m keeping the full game under wraps for now (stay tuned!), I wanted to give back to the developer community by sharing the code and design process for one of our characters: Fera-182, a skilled warrior with a unique combat style.
Fera-182 Character Concept
Fera-182 is a warrior who combines agility with precision. Her design emphasizes practical combat gear while maintaining a distinctive aesthetic. The character features:
- A sleek blue combat outfit
- Dynamic flowing hair that responds to movement
- A signature silver sword
- Fluid animation states for combat sequences
Technical Implementation
The character is built with Kotlin, making it perfect for Android game development. Here’s how we structured the core character system:
Base Character Stats
kotlinCopydata class Position(val x: Float, val y: Float)
data class AnimationState(val currentFrame: Int, val totalFrames: Int)
class Fera182(
private var position: Position = Position(0f, 0f),
private var health: Int = 100,
private var stamina: Int = 100,
private var isDefending: Boolean = false
) {
private val baseAttackDamage = 25
private val baseDefense = 15
private val movementSpeed = 5f
// ... (core stats setup)
}
Combat System
The combat system is built around three core mechanics:
- Fluid Movement: Dynamic positioning system for smooth combat flow
- Stamina Management: Strategic resource management during fights
- Defensive Capabilities: Balanced defense mechanisms
Visual States
We’ve implemented four primary visual states:
- Overview Stance: Default position showing character personality
- Combat Ready: Side view with drawn sword
- Attack Position: Dynamic action pose
- Defensive Stance: Strategic defensive position
Behind the Design Decisions
Combat Mechanics
kotlinCopyfun attack(): Int {
if (!isDefending && stamina >= 20) {
isAttacking = true
stamina -= 20
return baseAttackDamage
}
return 0
}
fun defend() {
isDefending = true
stamina -= 10
}
Each combat action is designed to feel impactful while maintaining game balance. The stamina system prevents spam attacks and encourages strategic play.
Animation Framework
kotlinCopyfun updateAnimation() {
currentAnimationState = AnimationState(
(currentAnimationState.currentFrame + 1) % currentAnimationState.totalFrames,
currentAnimationState.totalFrames
)
}
The animation system is built to be expandable, allowing for easy addition of new move sets and combat combinations.
Open Source Code
data class Position(val x: Float, val y: Float)
data class AnimationState(val currentFrame: Int, val totalFrames: Int)
class Fera182(
private var position: Position = Position(0f, 0f),
private var health: Int = 100,
private var stamina: Int = 100,
private var isDefending: Boolean = false
) {
// Character stats
private val baseAttackDamage = 25
private val baseDefense = 15
private val movementSpeed = 5f
// Animation states
private var currentAnimationState = AnimationState(0, 8)
private var isAttacking = false
// Basic movement
fun move(dx: Float, dy: Float) {
position = Position(position.x + dx * movementSpeed, position.y + dy * movementSpeed)
}
// Combat actions
fun attack(): Int {
if (!isDefending && stamina >= 20) {
isAttacking = true
stamina -= 20
return baseAttackDamage
}
return 0
}
fun defend() {
isDefending = true
stamina -= 10
}
fun takeDamage(damage: Int) {
val actualDamage = if (isDefending) damage / 2 else damage
health -= actualDamage.coerceAtLeast(0)
}
// State getters
fun getHealth() = health
fun getStamina() = stamina
fun getPosition() = position
fun isDefending() = isDefending
// Animation update
fun updateAnimation() {
currentAnimationState = AnimationState(
(currentAnimationState.currentFrame + 1) % currentAnimationState.totalFrames,
currentAnimationState.totalFrames
)
}
}
I’m releasing this character code as open source because I believe in the power of community-driven development. Feel free to:
- Use this as a base for your own character systems
- Modify and enhance the combat mechanics
- Adapt the animation framework for different game styles
- Share your improvements with the community
Future Plans
While I can’t reveal too much about the game itself yet, I’ll be sharing more character development insights in the coming weeks. Some areas we’re exploring:
- Advanced combo systems
- Environmental interaction mechanics
- Character progression systems