Is this a proper way of doing it?

0 favourites
  • 3 posts
  • I'm making a sidescrolling shooter.

    I've made an object obj_Bullet (a square with collision) that I made invisible.

    When I hit space I spawn the obj_Bullet

    Now i've got 2 different bullet types as sprites that, depending on a Global variable, can change between spr_Bullet0 and spr_Bullet1

    -> System: Create object spr_Bullet0 on layer 0 at (obj_Bullet.?ImagePointX(?0?), obj_Bullet.?ImagePointY(?0?))

    I set the position of the bullet sprite to the bullet object

    -> spr_Bullet0: Set position to obj_Bullet (image point 0)

    So I create the Sprite on the bullet's positioning when firing. it works well.

    The reasoning for making the square is to use it as a container of sorts so I can do what i need with the object but be flexible with the sprites inside.

    I'm just not sure if this is the proper method and that maybe I'll run into issues later regarding performance?

    In my design I have 7 different bullet types.

  • This is actually a good idea, especially as you can stretch out the invisible helper sprite to prevent high speed projectiles from clipping through walls. You can also create interesting effects on your sprite without affecting the hitbox/colissions.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks! I'll carry on then

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)