Skip to main content
Post Closed as "not a real question" by Philipp, Laurent Couvidou, Anko, House, Nicol Bolas
added 13 characters in body
Source Link
Gntem
  • 143
  • 6

I'm having a difficult time to understand , how to implement the behavior of an enemy in a tile based game,

  • movement
  • attack
  • behavior per enemy level ( higher level enemies should be hard to kill)
  • defend
  • other behavior

since the game is a tile game written in javascript, the behavior of the enemies shouldcould be implement as functions like

  • Chaser - hunts its opponents
  • Brave - does not start running if with low HP
  • Sensitive - when damaged might take additional damage

and using the standard entity class , based on the configuration ofdefined for the enemy, could it be extend the as the behavior?

Or write like standard enemy behavior and additionally write separate scripts per enemy on how they should behave against the opponent, surroundings, etc..

I'm having a difficult time to understand , how to implement the behavior of an enemy in a tile based game,

  • movement
  • attack
  • behavior per enemy level ( higher level enemies should be hard to kill)
  • defend
  • other behavior

since the game is a tile game written in javascript, the behavior of the enemies should be implement as functions like

  • Chaser - hunts its opponents
  • Brave - does not start running if with low HP
  • Sensitive - when damaged might take additional damage

and using the standard entity class , based on the configuration of the enemy, could extend the behavior?

Or write like standard enemy behavior and additionally write separate scripts per enemy on how they should behave against the opponent, surroundings, etc..

I'm having a difficult time to understand , how to implement the behavior of an enemy in a tile based game,

  • movement
  • attack
  • behavior per enemy level ( higher level enemies should be hard to kill)
  • defend
  • other behavior

since the game is a tile game written in javascript, the behavior of the enemies could be implement as functions like

  • Chaser - hunts its opponents
  • Brave - does not start running if with low HP
  • Sensitive - when damaged might take additional damage

using the standard entity class , based on the configuration defined for the enemy, could it be extend as the behavior?

Or write like standard enemy behavior and additionally write separate scripts per enemy on how they should behave against the opponent, surroundings, etc..

Source Link
Gntem
  • 143
  • 6

How to implement tile enemies behavior?

I'm having a difficult time to understand , how to implement the behavior of an enemy in a tile based game,

  • movement
  • attack
  • behavior per enemy level ( higher level enemies should be hard to kill)
  • defend
  • other behavior

since the game is a tile game written in javascript, the behavior of the enemies should be implement as functions like

  • Chaser - hunts its opponents
  • Brave - does not start running if with low HP
  • Sensitive - when damaged might take additional damage

and using the standard entity class , based on the configuration of the enemy, could extend the behavior?

Or write like standard enemy behavior and additionally write separate scripts per enemy on how they should behave against the opponent, surroundings, etc..