So I followed a tutorial online to set up player and enemy classes.
I have one file BasePlayer that sets up the template that the player will have like speed, etc, and then has a given Class.
I have another file BaseClass that sets up the template that classes will use like the base stats of the class, etc.
I then have two other files, an BaseAlienClass and a BasePlayerClass where each has within it multiple Public Classes that outline specific different classes like Alien Scientist, Alien Fighter, and player classes like Matt, Ashley, Steven (the main characters of the game).
And when I want to make a new enemy in battle, I just call the CreateFighter method and give it the level and class.
But I’m thinking long-term, and if I have a file for Aliens and a file for Players, then I’ll probably end up with a file for Animals, Thugs, Random stuff, etc, etc, etc. It feels like the system would get bloated with ten, twenty, thirty, maybe more files, depending on the number of different enemies I want in the game.
I’ve only been using C#, been making this game, for about a month. I can’t seem to track down a solid path to follow online.
First off, I’d love if enemies had some form of inheritance. So like:
ENEMY
-
Alien
-
Scientist
-
Fighter
-
Human
-
Criminal
-
Politician
-
Wildlife
-
Bear
-
Snake
-
Wolf
-
Random
-
Etc
-
Etc
-
Etc
So that it would be easier to set up classes. Alien Scientist and Alien Fighter would inherit from Alien so their race would automatically be “Alien” and perhaps the aliens would have something in common. From there, I could just setup the main differences between Scientist and Fighter instead of having to write a long version of both from scratch.
I know of the Inheritance that my BaseClass uses as like a template for actual classes, but I don’t think that’s the same kind of inheritance I’m looking to have.
I just really want a simple way to setup a lot of enemies that have a varying amount of stats/abilities/etc.
I’d appreciate any help anyone could give.
And like I put in the title, I’m using C Sharp C#.