Main Menu like SPAZ

0 favourites
  • 9 posts
From the Asset Store
A well commented template with list menus and shops to use in your top-down RPGs or metroidvania games!
  • This is something I've been trying to do for several weeks now. For those who have never played SPAZ or seen the main menu, I've created a recording of it below:

    [TUBE]Da17jAE6zb0[/TUBE]

    The way the AI ships move around and fire at each other looks just so fluid. I've been trying to capture this same look, but I just can't seem to get it right.

    Here's what I have so far:

    • Several 'atmosphere' layers for the background. These move at different speeds and create a subtle dynamic that is barely noticeable to prevent the user from thinking the background is stagnant.
    • AI ships are physics operated. Basically the Ai ships will seek out the player ship until they come within a certain range, and then they will reverse acceleration to give the impression of kiting and strafing (prevents 'dumb' AI that simply flies toward the player ship at all times).
    • The player ship turns and seeks out the closest enemy ship and flies toward it until it gets within a certain range, then it reverses acceleration (just like the enemy ships) to give the impression of strafing.
    • Both AI and the player ship use the turret behavior and will only fire if in range.

    Unlike SPAZ, which features several ships randomly flying around and fighting each other, I was hoping to have a main menu featuring the player ship flying around and taking on enemy ships. Does anyone have any ideas on how to improve my main menu? Particular troubles I'm having are:

    • How do I keep the player ship on screen for most of the time? It seems to fly off-screen a lot because I'm not sure how to create an invisible boundary that would cause it (and the enemy ships) to reverse accelerate away from it.
    • Fluidity. The way the AI ships move in the SPAZ main menu is fast and very fluid, whereas mine looks very controlled (because it is). Any ideas on how to make my implementation more fluid? I'm not sure how I would code in dynamic ship stops and sudden direction changes like in SPAZ

    This .capx is huge and not for those new to C2. This may be too big of a question to ask on this specific forum, but I've been beating my head for a few weeks now wondering how the creators of SPAZ did it. Any tips/suggestions/help would be greatly appreciated.

    Icarus.capx

  • For the smoothness you could use the lerp() function where you set the angle/move the player. will make a more smooth transition.

    Havent got the time atm to go through all of your code, but getting it to stay on the layout would to be math issue to me as far as i see it, but I might be wrong :-)

    Just my 2 cent...

  • After reading up on lerp, wouldn't that mean stopping a ship and having it turn and fire? I figure that would make the AI seem more controlled than it already is.

    Unless you had another idea in mind.

  • Hmmmm ... What you are asking for is kinda big

    But I'll give it a try

    Wish me luck

    Also , the ships are in space , so , gravity is equal to 0

  • I guess I'll explain a bit more in detail what the 'fluidity' I'm seeing is, and why I'm not sure how to implement it.

    Right now the player ship and enemy ships are powered by accelerations. When the player ship gets within some distance of an enemy ship, it reverses acceleration to give the impression of strafing. However, this looks very 'controlled' and after some time, it just looks like the ship is just being repetitive.

    The SPAZ main menu features ships that rapidly accelerate and decelerate to the point where it looks like some of them are stopping and then changing direction, in addition to the 'strafing' I have already implemented. This creates a dynamic feel to the main menu where the ships seem to move in very dynamic and fluid motions.

    It could just be that I need to increase the rate of acceleration and deceleration of what I already have, but then comes the issue of having an invisible boundary to prevent the player ship from being off-screen for too long.

  • To be honest , Everything I see is a vertical and horizontal sine towards the big ship

    That wouldn't be hard to reproduce

    Every Tick ,

    Pick nearest to Enemy.X

    If Sine is active

    Set angle to angle(Enemy.X,Enemy.Y,Player.X,Player.Y)

    And then , set some sine behaviors with a considerable random factor

    and activate sine when enemy is in sight

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Also , Seems like the ships orbit around the bigger ships in an eliptic way

    There's a post on how to make objects orbit around other objects

    Then , you can just mess with the radius , and you get some nice battle sequences

  • Ah, so instead of using accelerations and decelerations, use orbits?

    This could work. I could have an invisible object in the center for the player ship to 'orbit' around to keep it from going off-screen too much.

    This sounds pretty good in theory. I'll keep you guys updated as I test this out.

  • My 5-mins try

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