Space Invaders

Forum Home Forum Home > Construct 2 General > How do I....?
 Post Reply Post Reply
Author
526 Rep
Post Options Post Options   Quote arcoidgames Quote  Post ReplyReply Direct Link To This Post Topic: Space Invaders
    Posted: 26 Jan 2012 at 3:26pm
Hi guys

My first post, please be gentle!

OK, so, I installed Construct 2 yesterday and it's amazing. Really liking the deceptive simplicity of it, mixed with the raw power :)

So, decided to build a Space Invaders game as a little learning exercise... And I'm already stumped!

I have a couple of issues I'd like some help with - or feel free to point me at tutorials that my blurry eyes may have missed.

1. I have a small 4x8 grid of Aliens. Is there a simple way to animate the group, as a whole, in that classic Space Invaders edge-to-edge-then-descend-a-row movement?

2. Is there a way to animate a gentle 'rocking' movement on a sprite? Rotate seems to only have the option of a 360 degree rotation, and in one direction, rather then the 10-15 degrees I actually want, back and forth.

3. How can I randomize the appearance of a 'min-boss' at the top of the screen?

My apologies if these have been covered already - I have looked but I'm either too tired or it doesn't exist in the tuts section.

Any further advice on things I may not have considered yet are greatly appreciated! I suspect there will be plenty of other questions :)

M
Back to Top
526 Rep
Post Options Post Options   Quote arcoidgames Quote  Post ReplyReply Direct Link To This Post Posted: 26 Jan 2012 at 3:28pm
hmm, did I even manage to post this in the wrong forum?
Back to Top
11,725 Rep
Post Options Post Options   Quote Yann Quote  Post ReplyReply Direct Link To This Post Posted: 26 Jan 2012 at 5:57pm
Global number direction=1
Global number rate = 1
Global number step = 16
+System: Every rate seconds
-> Invader: set X to X+step*direction
+Invader: X > LayoutWidth-20
-> direction = direction*-1
-> Invader: set Y to Y+step
+Invader: X < 20
-> direction = direction*-1
-> Invader: set Y to Y+step

For the invaders movement should work

Edited by Yann - 26 Jan 2012 at 6:00pm
Back to Top
526 Rep
Post Options Post Options   Quote arcoidgames Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 2012 at 12:48pm
Yann, thank you, that's much appreciated. I will have a go with this and post my results.

(Yann, really nice clay work on your website - you ever tried ZBrush for your 3D work? You would probably really enjoy using that)

Anyone able to help with my other queries?

Edited by arcoidgames - 27 Jan 2012 at 12:51pm
Back to Top

Moderator
29,640 Rep
Post Options Post Options   Quote Kyatric Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 2012 at 12:58pm
2. You should use the sine behavior (You have 2 examples in the c2 install\examples folder).

For 3 I guess what you need the most is to know how to pick a specific instance and have different values to its instance variables and behavior.
Back to Top
526 Rep
Post Options Post Options   Quote arcoidgames Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 2012 at 1:25pm
Sine, of course - I saw that and skipped right past it. Thank you, that's perfect.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down