How do I make a Infinite Space Scroller


Attached Files

The following files have been attached to this tutorial:



Download now 1.14 MB


2,350 visits, 3,275 views



This tutorial hasn't been translated.


This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

OK So I love Construct 2 so far. Enough to where I have abandoned my own HTML game Engine..Well not totally, I am am in the process of importing some of my engines aspects as addons and plugins which will be available to all! For now I want to try out my first tutorial. it is as the title implies a Infinite space Scroller. That however is the easy part. Before I bore you to death and you leave...what can you get out of this tutorial / example?

[*] A complete functional game example

[*] Infinite Space Scroller

[*] 3D Starfield effect

[*] Advanced tips on improving performance with Events

[*] Player Health / Health bar example

[*] 3D Sound effects

[*] Efficient collision detection and reactions

[*] How to create enemies just to destroy it a few seconds later!

[*] How to use ImagePoints

[*] How to Use particles

[*] yada yada yada

The real good info from is in the event sheet. I'm not going to hold your hand, if you don't know how to insert new objects and such, your not quite ready for this tutorial. I will just straight in and go over the event sheet since that's where it all happens.

Event Grouping

With C2 you WILL spend most of your time staring at the event screen. So the more organized it is the better it is for you and anyone else who maybe working with the project. Now I did not use any "include's" since I wanted to keep it as focused and simple as possible. The next stage of this tutorial will (or does) have includes.

on Startup - A 3D Starfield effect

So basically I have put all the layout common events into a single group.player events into a single group. As you can see from the event sheet below it simply creates 120 stars on 3 layers. this will give us our Simulated 3D Starfield effect. I will however point out 3 things:

[*]The same star was used for all 3 [


Set Bullet speed to Player.speed[/i]0.20

is being used to make the stars in the different layers move at a different velocity than the player.

[*]The same applies with the Scale action. Farther is smaller closer is bigger.

Da Player - In a pretty group

Here we check to see if the player has any health and if so then we go into the branch and process the rest of the events. Always ask yourself how you can get from A to B in as few steps a possible. In a game you have 16.6ms to do thousands of things, but 10% of that is always better. Since there is only a single player object here it does not matter, just get in the habit of doing it this way.[/img]

Da Player - common Events

Da Player - Movement Events

Here I go again with the player movement. We know the player is alive because we are at this point. But...Did the player do anything? no, then move on, "this is not the branch your looking for...". And if the player did do input, which one? no beed to do all movements in one tick. stop and think about it, I know you think you are the fastest gamer on the the planet..but really? give 16 commands to your ship in 1 sec? No way. In the Final stage (4) of this project I do actually process user movement 4X a second because there is so much going on. Why eat up peoples battery if you don't need to?

Da Player - Is DEAD

Self explanatory - player is DED!

Da enemies - In a pretty group

Da enemies - All

I put a little extra into the enemies for this first stage but it get its out of the way for the next three. Here we have the enemies first at 2 different rates and from four different guns. we have the ship thrust and as with the player with have small damage explosions with 3D sound where the bullets hit. there's allot going on.

In closing...

I apologize if it was a bit short, but I documents the events quite well and this tutorial is not for the complete novice born yesterday. let me know what you think and any suggestions. If there is enough of a following I will move forward to the other stages the final result being a 100% ready to publish game from loading screen to credits screen and everything in between.

I'd like to thank everyone in the C2 community for all they do and I hope this helps at least one person :)




Download now 1.14 MB

  • Order by
Want to leave a comment? Login or Register an account!