2D Vertical Space Shooter

0 favourites
  • 3 posts
From the Asset Store
Cannon Ball Shooter game assets for 2D bubble shooter puzzle game.
  • Hi, guys.

    Yet another nobby question, but maybe someone will deign.

    Trying to figure out the built in template in Construct 2: Vertical Space Shooter.

    I really like the way the random stars are programmed (very low overhead as opposed to random, seamless tiled backgrounds scrolling I planned earlier).

    1) Can someone explain why the sprites are automatically pointed up? They are drawn in horizontal orientation and there seems to be nothing in the code. Is this some sort of automatic feature when layout height is greater than width?

    2) More importantly, trying to figure out how to modify that template for infinite scroll left and right (maybe 15% off each edge or rather with the scroll starting when the player sprite is about 15% from left or right edge). I'd want the star scrolling to continue seamlessly and also the enemy spawning to continue infinitely when panning left or right.

    This would be a really cool modification. I could figure out the rest as I've gone through a number of code samples.

    The way I understand it we have the bound to layout behavior which does enable scroll, but only for larger backgrounds? And bound by edge, but I figure this should not be too hard for someone who's at least on the intermediate level.

    This would basically allow me to focus on the design aspect instead of wrecking my brains.

    If not, I'll keep trying.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1) The bullet behavior assigned to the enemies makes them face the direction they are moving in.

    2)For scrolling left and right (infinitely) I don't know if you can use these stars. Obviously nothing is actually scrolling vertically. The stars are just moving on their own to create the illusion.

    What you could do I guess is remove the direction based angle on the stars and make them all move at their random speed to the left or right depending on which way the player is going, and then make the stars wrap to the layout (appearing on the other side when they leave the screen, which they may already do)

  • Thank you very much for replying.

    And you're right. They are not scrolling, just wrapping.

    The only problem with this is fairly high overhead (I think).

    I read somewhere in another post that using Scroll To (to make everything scroll at once) is better than updating lots of objects' positions?

    I just hope I can find that example and modify it appropriately as I'm still pretty new.

    If I can figure out the scrolling, I think the rest should not be that hard.

    Some sort of if/then condition to check if scrolling initiated and another random star line on side w/ enemy.

    But I guess it would have to check every so often pixels based on the size of the enemy sprite to avoid spawning needlessly and then destroy if outside layout? Or better persist, so there's continuity if one decides to re-scroll back.

    The trick is doing it efficiently. As I'm pretty new to Construct 2 logic, I'd probably botch it up with too many if/then statements.

    Someone posted a really neat infinite map in ALL directions (not just side to side) which spawns persistent backgrounds, but some of the coding is at present beyond me.

    Maybe I can figure out a modification from that if it is a permitted player behavior.

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