In OOP, this refers to a lower-level class using the definition for a higher-level class' methods or properties.
2
votes
1answer
135 views
Spell classes and inheritance
I'm currently developing a small game, that includes spell casting.
My class structure looks like this:
AbstractSpell
AbstractDamageSpell
AbstractClickableSpell
...
1
vote
1answer
112 views
How to use/apply class inheritance in Enchant.js
You're developing a game using Enchant.js and you just need an Enemy class which multiple enemy classes derive from and every enemy has its own sprite and stuff.
4
votes
2answers
336 views
Game state management: the buck doesn't stop “here” soon enough
I realize there are already many Q&As on this site about GameState/GameScreen management, state machines, state stacks, etc. This question is meant as a follow-up:
Suppose hypothetically I ...
5
votes
2answers
384 views
How should I plan the inheritance structure for my game?
I am trying to write a platform shooter in C++ with a really good class structure for robustness. The game itself is secondary; it is the learning process of writing it that is primary.
I am ...
2
votes
1answer
556 views
Custom inventory items based on inheritance
So, here's the scenario:
I'm building an RPG. Like most of the other RPGs on the market, my game will feature an inventory and of course, inventory items. So far I've worked well with using a single ...
7
votes
2answers
595 views
Doesn't multiple inheritance solve all problems that entity systems do?
The question is pretty self explaining: doesn't multiple inheritance solve all the problems that entity systems also solve?
I just remembered a term called "multiple inheritance", and that seems to ...