Quick Thoughts

James Quick- Microsoft Technical Evangelist South Florida

Construct 2 Generic Game Template

Construct 2 Generic Game Template

Rate This
  • Comments 1

Just a few days ago, I decided to put a Construct 2 Game Template that I have been using in workshops on my GitHub page.  Honestly, don’t know why it took me so long to do so, but either way, there it is.  So that begs the question then, “What exactly is IT?”.

The game template is, as it sounds, a template for any generic game that you might want to build in construct 2. It adds a Home Page, an About Page, a Game Page, and an End Page. The logic there is pretty simple, you start at the Home Page and click for the About page or press play to start the Game. When you lose or time expires, you are taken to the End Page where you high score is displayed. From the End page, you have the option of restarting the game or going back to the home page.

image

This templates also takes care of some useful logic that is pretty standard in games. In addition to the layout navigation mentioned above, It displays the name of your game, keeps track of and displays time and score, including a high score in permanent storage. This means that when a user plays your game, sets a high score, closes the game, then comes back...the score is still there!  This part is essential if you want your users to compete for scores and have incentive to come back to your game.

So, with all of this taken care of, what do you have to add or customize to create your game, you might ask?  Great question!  The main thing is simply to add your game logic.  By default the Game Page just starts a timer for fifteen seconds, and when it expires, it moves on to the End Page.  Now, depending on the type of game you have you may or may not need a timer.  Whatever the case may be, you simply change the Event that triggers the navigation to the End Page.  It could be getting hit by a bullet or falling off a platform; the idea is still the same.  You will of course need to add your logic here to increment the user’s score as well.

image

The next steps are changing the global variables that have “**UPDATE**” in their comments.  You can see a couple in the screenshot above.  The point_bonus is simply how many points you award the player for some action; catching a coin, dodging a pipe, etc.  Next up is the timer, which stores the duration of the game in seconds.  Again, you may or may not need the timer.  If you don’t, then simply delete it.

The last variable you will need to update is the name of your game, as shown below in the Start Event Sheet.  The Start, End, and About will all display the name stored in the Game_Name variable.

image

Lastly, you want to customize the look and feel of the game.  You can change the size of the texts, the fonts, the background, etc.  Whatever you need to do to make your game look the way you want.  Nothing in this template is final.  It is up to you to leverage whatever you can to create your game.  I just want to make that process as easy as possible for you.

I hope that this gives Construct 2 users a jumpstart to creating their games.  If you have any comments or suggestions for things to add to the template, please do so below.  Alternatively, you can find me on twitter, @jquickwit.

Comments
  • Great resource, thanks!

Page 1 of 1 (1 items)
Leave a Comment
  • Please add 7 and 7 and type the answer here:
  • Post