Make RPG tutorial : chapter I - Part 2/4

Part 1 Back to Tutorials Part 3
         
   
Learn Game Programming much faster: join my list! The source code for the game programming tutorials (first chapter 1, then chapter 2...) and more!
You'll be a pro in a couple weeks!
(You must be at least 13!)
 
Name:
Email:
Comment:
 
Privacy policy:  This list is all about the fun and entirely safe.  You can remove yourself permanently in just seconds, anytime you wish.  No one is getting your email from me and there will be no spam!
   

Make games with dynamic objects.

Don't worry if you don't know what objects are just yet. It will become very clear as you read on.

Before doing anything you will need to create a room. Right-click on Rooms and create one. Don't do anything with it yet.

To create objects you first create the associated sprite(s). Sprites are just a buzz word for the small images that move around the screen (your character, the bag image, the table...) To include sprites you must first create them. At this stage I only created very basic sprites for the sake of having something. Once you have an image ready, right-click on the sprites folder and "upload" the sprite into the game..

Then you create the objects (right click on Objects folder, just like sprites or rooms) Double-click on the new object in the panel, name it,

and then you associate the sprite.

For dynamic objects, (objects that don't always look the same) I prefer to not associate sprites, but use the draw event to call a piece of code.

The code will dispay the sprite according to variables that change as the player interacts with the game. This allows you to make much more complex games than by using the limited point and click features.

  1. Create the draw event (pick it from the options that appear by clicking on Add Event).

  2. Select the Control Tab.

  3. Click and drag "Execute Code" from the Control Tab to the list of actions.

Several objects are used at this point.

  1. The character object (main_ch) which can move around and trigger a pop up when it hits something.

  2. The north, east, south, and west doors. Only north and east are in that room, but the others are available for later rooms.

  3. The horizontal and vertical wall pieces.

  4. A table object.

  5. Square objects for future inventory slots.

  6. Topbar, and inventory objects.

  7. A bag and character inventory objects.

Objects can be placed in the world view, or Rooms to appear in the game. Sometimes you won't place them there at first but they will be created later by the game, according to situations that occur. They can react to different situations (be created, be destroyed, change appearance, move...). Those situations result from the programming and can be much more diverse by programming code than they can be with the point and click options.

Sign up for the email courses and you will have the growing game source code to work with and learn to program and make games quickly.

Part 1 Back to Tutorials Part 3

Making Video Games Home Game Programming Tutorials Email Courses with Source Code Make Games for a Living Swords and Sorcery Contact Affiliates

© www.makingvideogames.com 2009

Other project: Understand Fat Loss