Combat System

You spent weeks on enemy sprites. They look amazing. But they all feel exactly the same because they all just deal "damage." Players can't tell your ice wizard from your fire demon except by color.

Freeze Enemies. Stack Poison. Make Combat Memorable.

You spent weeks on enemy sprites. They look amazing. But they all feel exactly the same because they all just deal "damage." Players can't tell your ice wizard from your fire demon except by color.

Great combat isn't about art—it's about game feel. Freezing enemies should _slow time_. Poison should _create tension_ as health ticks down. Fire should _spread panic_. That's what makes players remember your game.

Building this from scratch means weeks of programming: hitbox detection, damage calculations, status effect timers, stacking logic, visual feedback systems. Most indie developers settle for "everything just does damage" because the alternative is too much work.

CraftMyGame gives you complete combat systems through configuration. Pick "Freeze" from a dropdown. Set duration. Watch enemies slow to a crawl. That's it. Every status effect, damage type, and combat interaction is pre-built, tested, and just works.

Combat Depth Through Design, Not Code

The best combat systems come from good design decisions, not complex programming. CraftMyGame lets you focus on what makes your game unique:

Every option is a dropdown or a number field. Configure damage, add a status effect, and test immediately. No compiling, no debugging, no waiting.

  • Make weapon choice matterShotgun (cone spread, close range) vs. Sniper (line pierce, long range) vs. Grenades (explosion radius). Players should feel the difference, not just see it.
  • Create tactical decisionsFast weak attacks vs. slow devastating strikes, area damage vs. single-target. Give players meaningful choices in the heat of battle.
  • Reward player masteryInvincibility frames for dodging, critical hits, combo multipliers. Skilled players should feel powerful.
  • Add strategic depthFire melts ice shields, poison bypasses armor, magic ignores physical defense. Rock-paper-scissors dynamics keep combat interesting.

Combat System Settings

Set up your game's combat rules in one place. These global settings shape how all combat feels across your entire game:

Enable/Disable Combat — Turn combat on or off. Useful for puzzle sections, safe zones, or games that don't need combat at all.

Health Resource — Choose which resource represents health. Use the default, or pick a custom resource like "shields" or "hull integrity" for sci-fi games.

Damage Multiplier — Scale all damage up or down with a single slider. Perfect for difficulty modes: set 0.5x for Easy, 1x for Normal, 2x for Hard. Balance your entire game in seconds.

Friendly Fire — Allow or prevent player-to-player damage. Essential for co-op games (off) or competitive modes (on).

Death Behavior — Choose what happens when health hits zero:

Show Damage Numbers — Display floating numbers when hits connect. Helps players understand combat and feels satisfying.

Hurt/Attack Animations — Set which animations play when entities take or deal damage. Visual feedback that makes combat feel responsive.

  • DestroyEntity is removed. Good for enemies and single-life games.
  • RespawnEntity returns after a delay. Great for action games and multiplayer.
  • SpectatePlayer watches others play. Perfect for battle royale or elimination modes.

Attack Bindings

Connect player inputs to combat actions. This is how your players actually fight.

Input Types:

Trigger Modes:

Repeat Rate — For held attacks, control how fast they fire. 100ms for rapid-fire weapons, 500ms for heavier attacks.

Each binding connects to a list of actions. A single button press can spawn a projectile, play a sound, and trigger a screen shake. Chain multiple actions together for complex attacks.

  • KeyboardAssign attacks to specific keys. Space for melee, E for special ability, number keys for weapon switching.
  • PointerMouse clicks on desktop, aim joystick on mobile. Automatically works on both platforms.
  • PressFire once per button press. Best for deliberate actions like sword swings or grenade throws.
  • HoldContinuously fire while held. Perfect for machine guns, flamethrowers, or beam weapons.
  • ReleaseFire when the button is released. Great for charged attacks or drawn bows.

Damage Types That Create Strategy

Different damage types force players to think. Instead of "hit enemy until dead," they ask "what's the best way to handle this enemy?"

Physical — Standard melee and projectile damage. Blocked by armor. Your bread-and-butter damage for swords, arrows, and bullets.

Magical — Spells and abilities that bypass physical defense. Give players a reason to use mana instead of just swinging a sword.

Fire — Burning damage with optional damage-over-time. Enemies catch fire and keep taking damage. Creates urgency.

Ice — Cold damage that can slow or freeze. Control the battlefield by slowing dangerous enemies.

Poison — Toxic damage that ticks over time. Stack it up and watch enemies melt. Rewards patient, tactical play.

Custom — Create your own types. Electric damage that chains between enemies. Holy damage against undead. Shadow damage that ignores shields. Whatever your game needs.

Each type has independent resistance calculations. Fire demons resist fire but take extra ice damage. Armored knights block physical but crumble to magic. This creates the strategic depth that makes combat interesting.

Status Effects That Change Combat

Status effects transform simple combat into something memorable. They create tension, reward strategy, and make every encounter feel different.

Poison — Damage ticks over time. Stacks for increasing pressure. That moment when a player poisons a boss and watches the stacks build is incredibly satisfying.

Burn — Fire damage that keeps hurting. Enemies panic. Players feel powerful. Creates urgency on both sides.

Freeze — Complete movement stop. Perfect for dramatic moments: freeze the enemy, line up your shot, shatter them.

Stun — Interrupt actions and leave enemies vulnerable. The core of combo-based combat systems.

Slow — Reduce speed without full immobilization. Control dangerous enemies without making fights trivial.

Heal — Restore health over time. Counteract damage-over-time, create support characters, or give players regeneration.

Buffs/Debuffs — Temporary stat changes. Rage that boosts damage, fear that lowers defense, shields that absorb hits.

Custom — Build any effect you can imagine. Bleeding that gets worse when enemies move. Curses that transfer on death. Power-ups that expire.

Effect Configuration:

Effect Actions:

Create combinations like "apply 5 poison stacks then trigger explosion" or "burn that spreads to nearby enemies on death."

  • DurationHow long it lasts. Set to 0 for permanent effects like curses or blessings.
  • StackableCan it stack? Poison that gets worse with each hit adds tension.
  • Max StacksCap the stacking. 10 stacks of poison is scary; 100 is just math.
  • Tick IntervalHow often it triggers. Fast ticks for urgent effects, slow ticks for lingering dread.
  • IconVisual indicator so players know what's affecting them.
  • On ApplyTrigger actions when the effect starts. Flash the screen, play a sound, slow time.
  • On TickTrigger actions at each interval. Deal damage, spawn particles, check conditions.
  • On ExpireTrigger actions when it ends. Explode, spread to nearby enemies, leave a pool of fire.

Entity Immunities

Immunities prevent your combat system from being trivialized. Without them, players could freeze every boss and skip the challenge.

Configure immunities per entity. Create enemies that counter specific player builds, forcing adaptation and rewarding versatility.

  • Bosses immune to stun and freezePlayers must face the boss head-on instead of crowd-controlling them into oblivion.
  • Fire elementals immune to burnMakes thematic sense and forces players to switch strategies.
  • Undead immune to poisonNo blood to poison. Encourages using fire or holy damage instead.
  • Mechanical units immune to all status effectsRobots and golems become a different kind of challenge.

Weapons With Distinct Personalities

Every weapon should feel different. A dagger should feel fast and scrappy. A greatsword should feel slow and devastating. A staff should feel mystical and powerful.

Configure complete weapon behaviors:

Attack Patterns:

Single — Precise, focused strikes. Swords, spears, single-shot weapons. Rewards accuracy.

Line — Piercing attacks through multiple enemies. Railguns, laser beams, throwing spears. Reward positioning.

Cone — Shotgun spreads and breath attacks. Devastating up close, weak at range. High risk, high reward.

Circle — 360-degree spin attacks and explosions. Clear crowds, but leave yourself vulnerable during the windup.

Custom — Define unique attack shapes for special weapons. Boomerangs, chain lightning, anything you imagine.

  • Damage and typeHow much it hurts and what kind. A fire sword deals fire damage. A poison dagger deals poison. Simple.
  • Range and cooldownClose-range brawler or patient sniper? Fast attacks or slow, powerful strikes? These define how the weapon feels.
  • Resource costsMana for spells, stamina for heavy swings, ammo for guns. Create meaningful resource management.
  • RequirementsLevel requirements, stat requirements, or quest unlocks. Give players goals to work toward.
  • Projectile spawningRanged weapons automatically spawn projectiles. Configure the projectile separately for full control.

Projectiles With Character

Projectiles are where combat feels most tangible. A slow, glowing fireball creates tension. A lightning-fast bullet feels powerful. A lobbed grenade creates anticipation.

Speed and Lifetime — Fast bullets for hitscan feel, slow fireballs for dodgeable attacks. Lifetime determines range naturally.

Piercing — Arrows and lasers that punch through multiple enemies. Creates those satisfying "lined them up" moments.

Max Targets — Limit how many enemies a piercing shot can hit. Prevents overpowered attacks while keeping the piercing feel.

Gravity — Lobbed grenades and arcing arrows. Players learn to lead targets and account for drop. Adds skill expression.

Target Categories — Control what the projectile can hit. Player-only for enemy attacks, enemy-only for player attacks. Prevents friendly fire chaos.

Explosion Radius — Area damage on impact. Rockets, grenades, magic explosions. Crowd control that rewards good aim.

Explosion Delay — Time between impact and boom. Creates that tense moment watching a grenade sit there. Players scramble. Enemies scatter.

Knockback — Push enemies back on direct hits. Makes guns feel powerful. Creates space when overwhelmed.

Explosion Knockback — Push all enemies in the blast radius. Send groups flying for chaotic, fun moments.

Cooldown — Time between shots. Balance powerful weapons with slower fire rates. Fast weapons feel frantic, slow weapons feel deliberate.

You configure the behavior. CraftMyGame handles the physics, trajectory calculations, and collision detection automatically.

Knockback System

Knockback is the difference between combat that feels impactful and combat that feels like clicking on health bars. Every hit should have weight.

Directions:

Force — Control how far enemies fly. Light taps for small weapons, massive force for explosions and heavy attacks.

Knockback integrates with the physics system. Enemies collide with walls, bounce off obstacles, and interact with the environment. Knock an enemy into a pit. Slam them against a wall for bonus damage. Send them flying into other enemies for a chain reaction.

  • ForwardPush in the direction of the attack. Shotguns blast enemies backward. Charges send them flying.
  • BackwardPush away from the attacker. Melee attacks that create space. Shield bashes that repel.
  • UpwardLaunch enemies into the air. Uppercuts, explosions, juggle combos. Opens up aerial follow-ups.
  • DownwardSlam enemies to the ground. Ground pounds, meteor strikes, crushing blows.

Defense Configuration

Defense is half of combat. Without meaningful defenses, every enemy is just a health pool with a different number. Defenses create variety and force players to adapt.

Armor — Flat damage reduction. High armor means chip damage from weak attacks. Players need to bring heavy weapons or find armor-piercing options.

Type Resistances — Percentage reduction per damage type. Create meaningful weaknesses:

- Armored knights resist physical (50%) but crumble to magic - Fire elementals resist fire (100%) but take extra ice damage (-50% resistance) - Anti-mage characters resist magic but have no physical defense

Block Chance — Percentage chance to block attacks. Creates tension and unpredictability. Did the block proc? Do you go for another attack?

Block Reduction — How much damage is reduced when blocking. 100% for perfect blocks, 50% for partial blocks.

Can Take Damage — Toggle invulnerability on or off. Perfect for cutscene moments, tutorial sections, or temporary power-ups.

Can Deal Damage — Toggle whether an entity can harm others. Useful for peaceful NPCs, environmental hazards that hurt but can't fight back, or disarmed states.

Status Display System

Players need to understand combat to enjoy it. Clear visual feedback shows them what's happening and helps them make better decisions.

Health Bars:

Resource Bars:

- Display mana, stamina, ammo, or any custom resource - Multiple bars for entities with several resources (health + mana + stamina) - Players always know what they can afford to use

Damage Numbers:

- Floating numbers on every hit. Players see exactly how much damage they're dealing. - Color-coded by damage type. Red for fire, blue for ice, green for poison. Instant recognition. - Critical hit emphasis. Bigger numbers, different colors, maybe a screen shake. Make crits feel special.

Combat feedback is the difference between "did that hit?" and "that hit!" Every number, every flash, every bar movement tells players their actions matter.

  • StylesHorizontal, vertical, or circular. Match your game's aesthetic.
  • PositionAbove, below, or beside entities. Keep them visible without cluttering the screen.
  • VisibilityShow for all entities, only damaged ones, or only when targeted. Control information density.