Make RPG tutorial : chapter II - Part 1/?

     
         
   

 

   
         
      Back to Tutorials Part 2    
         
   
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!
   
         
   

This second chapter naturally builds on what you've seen in the first.

We're going to go one step further into elaborating dynamic inventory management. So far, we were able to open a bag using an inventory icon and drag that bag around the room. Now that bag will include items you've found playing the game.

Of course this requires that it be possible to find items in the game, so that part is covered as well.

Part I:  What is new.

If you've chosen to join my game programming NL, you probably got chapter one a few days ago and just received chapter two. Just like the first time, let's start by running the game. Put the source code in the same folder you put the first one, then double click on it to run it with GM. Run the game by clicking Run the game.

It starts just the same as it did before, but now when you click on space when you are near the table there is a reaction.

At this point, we are using GM's built-in dialog boxes. We can make our own from scratch, or customize those somewhat. That will come in later tutorials. For now, we are programming game interaction using those.

This game interaction will lead to finding items that will automatically be added in the player's inventory. In this case we find cookies and a watergun (hey, this is rated PG!)

 

Run through the options and when you've found the cookies and the gun, check your inventory.

You do this by clicking the bag icon on the right. This is what you see:

Click on the black top bar and hold the left mouse button down.  Move the mouse around and you see the panel, as well as the newly included objects, move accordingly. 

Click on the head or bag button again and the corresponding  panel disappears.

We are one step further into interactive inventory management. Let's look in the code and see how we got it to work.

   
         
      Back to Tutorials Part 2    
 

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