F-117

Members
  • Content count

    4
  • Joined

  • Last visited

Community Reputation

105 Neutral

About F-117

  • Rank
    Newbie
  1. creating Enemies

    The reason behind using subclass is to create more then one kind of enemy later. and could you give an eg about using an array in this case
  2. creating Enemies

    I have created an Enemy superclass in which I have created Enemy1 subclass.   Enemy superclass stores all the parameters(health-max & current, coordinates).    Enemy1 subclass only stores variables about coordinates     package palt;   public class Enemy1 extends Enemy {     public Enemy1(int centerX, int centerY) { setCenterX(centerX); setCenterY(centerY); }   }   After this I place Enemy1 on screen via mainclass em = new Enemy1(300, 300); // for coordinate   g.drawImage(Enemy1, em.getCenterX() - 50, em.getCenterY() - 50, this); // to draw enemy1   I can print more then one enemy using above instruction again & again with different variables.   But, what i want is always have 3 enemies on screen. I could use an if loop stating If (em < 3){em++;} but with which varaiable do i do this and I beleive I should be doing it in main class probably to update method.     
  3. creating Enemies

    I have gone through many tutorials and books for beginner on java game development. It teaches about creating character, environment, collision detection and ai.   But I cann't find chapters on creating enemies that keeps on appearing on screen (like cars appearing on track one after the other) where can I find tutorials for this, or any certain book with this particular chapter     
  4. creating Enemy Bots

    I am a software developer but have recently learning to develop game, I know how to move a char in an applet animate it and even create bots (basic stuff) but i fail to understand how to bring in bots randomly (like cars appearing in a racing game). All beginners tutorials I look into are about animation or keyboard/mouse interface. What and where should I look into...