Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Lamentation

  • Rank

Personal Information

  • Role
  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Lamentation

    Spell System - turn based combat

    Thanks, but not really sure how that helps me. Do you mean like I have it up there, generic spell class with activate(Cast()) function?
  2. Hello everyone. For the last few days I've been trying to come up with a good way to implement spell system for my turn-based (grid) game. I recently found out about Scriptable Objects and they seem like a perfect tool for implementing this system. First I started with thinking about different types of spells and effects that I'd have in a game. So what I came up with is, buffs and debuffs (single and multi target, last through X turns), auras, direct damage spells (single target, aoe(multiple tiles)) with or without projectiles and on-hit effects. I believe SOs would be a good idea because they would make it easy(hopefully) to customize different spells just through inspector. I'm having a hard time with starting all of this. I have an idea but I feel like it's very inefficient and just a mess overall. Ok, so direct dmg spells seem like an easiest thing of the bunch, but for buff/debuffs, I think I should have an array of those in each Unit class so I can add them when they are cast and check at the start of turn if they should be removed or not. First thing that came to my mind is make a base abstract class for all spells. public abstract class SpellEffect : ScriptableObject { public string spellName; public string description; public Sprite icon; public float cost; public abstract void Cast(); } And then make a sub-class for each type. public class StatusEffect : SpellEffect { public int numOfTurns; public float modAmount; public float modPerTurn; public StatType statType; public TargetType targType; public override void Cast() { } } public class DirectDamage : SpellEffect { public float damage; public Projectile projectile; public StatusEffect debuff; public bool useProjectile = false; public bool useDebuff = false; public TargetType targType; public override void Cast() { } } Something like that. I really don't know where or how to begin exactly. I would really appreciate some help and pointers. Thanks.
  3. I was also thinking about this problem when I started making my game (also pixel art). I decided to go this route and just scale 2x,3x... and then letterbox if their resolution is not the same aspect ratio and my game. I'm doing it in 16:9 aspect ratio and 640/360 as my native resolution. That seems to be the best solution.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!