In this series of tutorial I will make a 2D action adventure game, pretty much like The Legend of Zelda series, but perhaps a bit more simplified than that. I will use sprites and graphics available from open game art (http://opengameart.org ) to make sure I don't break any ownership.
So to start, open up Construct 2 (if you haven't downloaded it, you can visit Scirra's website) and create a new project (from File -> New). If this is your first time opening Construct 2, you'll see a lot of templates to get you started. For now click New empty project and open it.
Templates to work on |
An empty layout |
We're going to add something to our layout, but before that we'll download the asset first. As I've said we'll use graphics available from Open Game Art, so go to this link and download the browser quest graphics (we only need the browserquest-images.7z file). Save the file somewhere you can find easily.
To add an object to Construct 2, right click on the layout and select Insert new object. You'll see a lot of objects that can be added to your layout. Graphical object is represented by a Sprite, so select a Sprite and then rename it to "character" and then click insert. Your mouse will become a crosshair with "layer 0" text. This is only to confirm on which layer you want to place the sprite. We only have one layer right now, so left click on your mouse to put it.
Insert a Sprite |
pick the clotharmor |
Sprite sheet |
But we don't need this many frames in an animation, we will make 4 animations: right, left, up, and down, each one with the sprite facing at that direction. So in this default animation we'll delete all frames but the ones we need: frame 11 and 12. We delete them by selecting the frames we want to delete and press delete key on the keyboard. You should be left with only two frames in the default animation.
Two frames facing right |
Now you have the "Default", "Up" and "Down" animation. But it doesn't feel right to have the right facing animation called "Default". Right click on that animation and select rename, rename it to "Right". Clicking on each animation will focus you on that animation, showing the sprites of that animation only.
Now, import spritesheet of clotharmor on each animation and delete the unnecessary frames, just like what you did with the first animation. In the end, you'll have right animation facing right, up animation facing up, and down animation facing down. Maybe you're wondering: "Where's the left animation?", we can "reverse" the right animation so that it faces left, so in this case we don't need a left animation.
Animation window |
I'm thinking of making the object move by code, but I think that will be a big explanation too, so I'll hold that until our next tutorial. You can download the file of this tutorial from my Google Drive here. If you like what you read here, then consider supporting my Patreon so that I can continue making tutorials like this one. Peace out.
Tidak ada komentar:
Posting Komentar