RPG Turn Base Game

6

Attached Files

The following files have been attached to this tutorial:

.capx

Stats

7,337 visits, 10,094 views

Tools

Translations

This tutorial hasn't been translated.

License

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.

Published on 24 Oct, 2014. Last updated 19 Feb, 2019

How to create RPG turn-base game. This question was asked because he was learning from YouTube video by person name Hey everybody, • I'm Gio, and I love to make videos that help people. He followed the video but result was not as person describing and nothing worked. So he asked me and I had look and found there was little fault apart from that nothing major. Therefore I thought this might give some of you idea how to create turn-base game. So here it is credit goes to Gio from Microsoft and not me (Lord Shiva).

I have been asked by many of you for this type of game where one can choose world. Once chosen the world player is transported to that world. In this world player has chosen there are enemies and door. Player must kill these enemies and escape through the door or die trying. Once complete the chosen world then back to main and other world should open and can be selected.

I have been thinking why would I do this demo for just one individual? Why not for everyone who can learn from this demo? Therefore I have decided this tutorial for everyone and not for just one individual person. This way everyone can be benefit and learn.

Let’s start then and be careful reading this and writing code too. I have used just few textboxes and given them instance variables.

Create new projects and name it as you like

1. Set window size 640 x 480

2. Set Layer size 640 x 480

3. Call this Layer World State

4. Do the same for Event sheet World State

5. On Layer World State create TEXT and name it World Text

6. Create INSTANCE VARIABLES and call it World where World 0, 1, 2, 3 etc

7. Your screen should look like below

You must be wondering why same name? Well with very good reason and that reason is so we will not get mixed up when we extend the game with many new worlds. I am not going to write very large demo for anyone just tutorial and rest is up to you friends. As you can see we used only one text and this TEXT will be used many times during this tutorial.

Now we want to open Event editor and enter these lines Make sure you add Global Variable Worldcount = 1

Add new layer as above and name it World 1. Please make sure that the name exactly spelled or you be blaming me for your game does not work. Add event sheet and name it World 1 as well. Open your World 1 Layout and add:

1. Door sprite and call it End. Add Instance variable and call it Killedleft and set it to 5

2. Add player sprite and give it behaviour of 8 direction and bound to layout.

3. Also add Instance variable for player Life = 100: Punch=5: Kick=10: Spacial=50 and also playerturn=Boolean here what it looks like below

Now create Enemy sprite and add instance variable like below

Your World 1 Layout should look like this below:

That is our World 1 layout. Now before we go anywhere Open your event Editor named World 1 and remember to add Global Variable UID =0 and Enemieskilled = 0

enter this code below

Once you enter the code we have to create another layout where player and Enemy can fight it out. Now add new Layerouts and name it Fight, also event sheet and name it fight as well. So your layout looks like below:

Now open your Even Editor and add this code below:

Well that is that enjoy!

.CAPX
  • 0 Comments

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