GameDevStory 4. Various Attack Type
Hello Medium! :D
I just finished developing all 4 elements. Each element has different attack and skill method. Today I’ll talk about how I implement many different types efficiently.
Default Class (Common class)
Even if each element has different attack method, there’re many similar things between that methods. For example, dealing damages, shooting bullets or waiting delay. Each element character could have different maximum HP. But It’s the same that they have HP.
So I created 3 common class; Character, Skill and Bullet. I implement common functions and properties in both class. In later, I would create derived element class or element’s bullet class from Character, Skill or Bullet class.
In Character class, it handle movement input and getting damage. so it has some properties to handle that, like HP, MaxHP or TeamID.
Overriding Default Class
Definitely new element character might be immortal or couldn’t move. In that case, that functions could be overridden. Let’s check out this case with bullets.
I made bullet destroyed when they hit anything. Because I thought many bullets what I would make will be destroyed in that case. So I’d like to set that case as default.
But wind element’s skill need to keep alive even if it hit anything. So I overrode hit event of wind element’s.
Introduction of 4 Elements
I finally created 4 elements; Fire, Wind, Water and Earth. Each class is the same role with Magician, Archer, Healer and Tanker.
Fire element has high damage per one bullet but casting delay is long. It has explosion skill which could make high damage in short time. I want to make Fire element as Nuker who can deal highest damage in short time.
Wind element has long range attack with low damage, but fast speed. It also has whirlwind skill. when a whirlwind is summoned, it move slow first but become faster. It make damage all crossed enemy. Yes, it is the same with Janna’s W skill in LOL. I want to make Wind element as damage supporter. Because whirlwind has slow speed first, I thought many users can avoid that. So I felt it’s enough to support dealing damage at back, long distance.
Water! The Cleric Class! Water element’s default attack is heal for allies, or damage to enemies. It has range between short or medium. The reason is to make killing Water element easy. It’s not fun that only healers remain in battle field at final. Because they have low attack damage. Also, It could be boring If killing healer is very hard because It cause battle time too much longer.
So, to set healer’s position like below, I set their attack range short.
Enemies)….. Tanker <— >Water <—> Fire <—> Wind
The final element is Earth and it is Tanker class. Earth has melee attack and dash skill.
When I record above Earth’s skill demo, I just found something. In my previous game project(which is base of this project), I couldn’t make dash skill’s movement smooth. It was dull feeling. Against that, In this time I could make dash skill smooth.
I felt it’s not better then previous. Because there are no tensions with smooth movement. It just like Heroes of the Storm. I don’t like that feeling. I think I should change this more dull adding breaks.
There is common skill for every elements. That is “Blink” skill. The next step is making Blink skill and set map up to play online demo.
I’m looking for a job in Canada. Please check my Linked profile and contact me (email@example.com).