• Advertisement

fenor

Member
  • Content count

    4
  • Joined

  • Last visited

Community Reputation

360 Neutral

About fenor

  • Rank
    Newbie
  1. Hi, I think you misunderstood me. You use to draw the bullet: blit(golyo,buffer,0,0,0,0,x,y); The last two parameter of blit gives the size and not the position of the destination rect. That's why your bullet is in the corner. You need a bit more change to draw your bullets. for(x=BS_x,y=BS_y;y>10;y--) { blit(golyo,buffer,0,0,0,0,x,y); } That draws all the bullets on the current frame and that is not what you need. If you just write: if(fire_golyo==TRUE) blit(golyo,buffer,0,0,0,0,x,y); is wrong too, because your bullet would be drawn as long as you press the space. You need a solution in which the bullet will be drawn independent of the space and thats why you need to store the fired bullets in a list how Kouna said and will explain in datails I think.
  2. Hi, The problem is in the bullet drawing method. Now, when you press the space then it begins to draw many bullets on the current frame because of the for loop. More over I think the parameters of the blit function are wrong too, because you draw a the bullets with changeing their size and not their position. You need to draw the bullet in the main loop and change its position there. Sok szerencsét :), fenor
  3. Never learn games programming!

    The onlyone whose opinion counts is yours. You have to decide what you want to reach and you have to choose the right tools, APIs, languages for that. Everything has pros and cons. If you think it is worth to do it than do it. Don't give up!
  4. what about virtual inheritance: class transformable { private Matrix4 transformation; ... }; class renderable : virtual public transformable {...} class physical : virtual public transformable {...} class entity : public renderable, public physical {...} I have no much experience, perhaps it is a bad idea but this way you would have only one transformation matrix.
  • Advertisement