Josh-CO Dev

Solving the worlds problems one line of code at a time.

Construct 2 – Legend of Zelda style game

1 Comment


I’ve been playing around with Construct 2 a lot recently and started wondering just how difficult it would be to create a Legend of Zelda style game. I’ve only played with it for a few hours, but I have this much working:

Surprisingly, this has been crazy easy.

To start, I simply created a new project in construct 2.
I then found some sprite sheets for the legend of zelda and pulled out the sand tile and the green mountain tile.
Take your image files and drag them into your layout and give them whatever name you wish.
Click on your green mountain tile and give it the solid behavior. It should look like this:

Now just copy/paste and put your tiles wherever you want to make a basic map.
By applying the solid behavior to the mountain, you are telling it that a player character will collide with the object and cannot pass through. Since we did not add this behavior to the sand tiles, we can walk on them.
Now create a player sprite, again I just found a legend of zelda sprite sheet and ripped the sprites and created the animations in construct 2.
Place your player on the layout and give them the 8-direction behavior.
After you do this, turn the default controls property to off, we will set these in the event editor.
Here is what my event editor looks like:

That’s all you have to do! All my events are doing is reading a key press and moving the character in that direction by one pixel. 0 is right, 90 is down, 180 is left, and 270 is up. I’m also setting the animations and a global variable that I created.

That gives you all the basics to create a zelda style game, now go have fun!

Advertisements

One thought on “Construct 2 – Legend of Zelda style game

  1. How to you make it so that you can swing a sword to hurt enemies? THANKS!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s