Main Menu like SPAZ

Get help using Construct 2

Post » Sat Jul 27, 2013 11:00 am

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.capxExcal2013-07-27 11:02:34
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,224

Post » Sat Jul 27, 2013 1:12 pm

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...
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Sat Jul 27, 2013 4:48 pm

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.
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,224

Post » Sat Jul 27, 2013 7:31 pm

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 0Whiteclaws2013-07-27 19:50:11
B
41
S
17
G
17
Posts: 2,247
Reputation: 17,436

Post » Sat Jul 27, 2013 11:34 pm

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.
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,224

Post » Sat Jul 27, 2013 11:46 pm

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 sightWhiteclaws2013-07-27 23:46:38
B
41
S
17
G
17
Posts: 2,247
Reputation: 17,436

Post » Sun Jul 28, 2013 12:09 am

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
B
41
S
17
G
17
Posts: 2,247
Reputation: 17,436

Post » Sun Jul 28, 2013 12:11 am

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.
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,224

Post » Sun Jul 28, 2013 12:48 am

B
41
S
17
G
17
Posts: 2,247
Reputation: 17,436


Return to How do I....?

Who is online

Users browsing this forum: daleinen, Janaina and 4 guests