A chronicle of JAN 333A, the Computer Games interim project at Wofford College, January 2009.

Friday, January 23, 2009

Thursday, January 22, 2009

Some more examples:

Wednesday, January 21, 2009

Some interesting problems came up today. One common issue is character movement in platform games: moving left, moving right, standing, jumping, climbing, and falling. The platform tutorial we worked the first week just falls short of explaining all these. I came across a Platform Engine for Game Maker. (This appears to be the one that Jesse offered to Stuart this morning.) I'm checking it out and I'll let you know what I think about it.

Tuesday, January 20, 2009

I have found a couple of nice little sheets:

This guy's site has other resources from The Game Maker's Apprentice that might be of interest in figuring out how to do something in your own game.

Stuart encountered a curious problem yesterday. His figure would run left, but got stuck when turned around to run right. The solution, discovered by Jesse Hanley, was to make sure all the various sprites used by the character had the same bounding box and the same origin.

Michael is dealing with a perplexing problem in his maze game: keeping the main character aligned to the grid when a collision occurs.

I was asked yesterday about animated stick figures. Here are some resources:

I am nerdier than 98% of all people. Are you a nerd? Click here to take the Nerd Test, get geeky images and jokes, and write on the nerd forum!

Monday, January 19, 2009

Today we finished up the presentations and now all the projects are seriously underway.

There are two weeks left. You will have to work on your games outside of class time. The lab is open 4:00-11:00 Monday through Thursday and 3:00-11:00 Sunday. You can probably squeeze an hour n from 4:00-5:0 on Friday.

I urged you to make backups of your work and to use Game Maker's automatic backup feature. Select File | Preferences and then the General tab:

From now on, we'll have about 6 brief status reports a day. When giving a report, you'll have an opportunity to get help with things.

Thursday, January 15, 2009

Today we had half the proposal presentations. They went very well, I thought. Following the presentations, you worked on the angles game or on your own game. I'm looking forward to playing some of the angles games!

Wednesday, January 14, 2009

I spent quite a bit of time yesterday working on collision formulas. It turns out that I found formulas that work for both sides of the mirror. I was shocked at that discovery. The bad news is that the ball can get stuck to the end of a mirror. Help! [mirror_sandbox2.zip]

I don't know how you feel, but I am finding Game Maker a lot of fun. I still can't figure out how to do some things, but I can pretty easily do a lot! One frustration I still have is trying to figure out why I couldn't have a mirror handle a collision with a ball. It just wouldn't work! I kept getting an error about an undefined variable. (I assure you, it was defined!) Nonetheless, I am convinced that I can create one mirror object with 360 subimages. I just need to set the variable norm_angle to 90+k, where k is the number of the subimage (0 through 359).

I'm interested in knowing other ways that people came up with to handle the 360 mirrors aspect.

Remember: Proposals are due tomorrow. Your objective is to explain your game well and get good suggestions from your peers.

Tuesday, January 13, 2009

Continue to develop your angle of reflection game. Games should be completed soon. [Let's discuss a reasonable deadline.] I've worked a bit on computing the angle of reflection [see mirror_sandbox.zip]. The computation involves the direction of the "light" and the angle of the mirror's normal.

Outside of class, work on your proposal. Remember that in your proposal, you must address all the requirements set forth in the proposal guidelines [the yellow sheet]. As I mentioned yesterday, hand-drawn pictures are preferred over digital images. A good organization is to put each room on a separate sheet. You don't need to supply all the details during the talk, but you must provide enough so that your audience understands your game and how it works.

We will determine whose presentations will be made on Thursday by random drawing on Thursday morning. (The order of the remaining talks will be determined on Friday morning. The time allotted for a pair presentation is double the time for a solo presentation. A game developed by a team should be more ambitious than those developed by an individual.

A question arose yesterday about global mouse events versus "plain" mouse events. Consult the Designing Games with Game Maker Version 7.0 for an explanation [search for global mouse].

Monday, January 12, 2009

What makes a game fun?

Game Challenge: Design and implement a computer game that uses the physics principle of reflection of light: the angle of incidence equals the angle of reflection [see the diagram]. If you like, you can incorporate the notion of a virtual image [that is, the image that appears in the mirror.]

You can either build on the idea that I presented Thursday morning (and again this morning) or come up with something else [which I highly encourage]. We'll do some brainstorming about the game to get new ideas.

You are required to work with a partner--someone you have not worked with so far. This is a chance to build a game from scratch. Deadline: The end of Wednesday's class.

This morning I'll also go over more detailed requirements for the presentations due at the end of the week.

For more complete Game Maker documentation, check out Designing Games with Game Maker Version 7.0. Page 57 describes, for example, Editing Your Sprites. This document describes what the Pro edition can do over the Lite edition. The Adding Depth to Games tutorial explains some Pro features, too. So do the other intermediate-level tutorials.

Some things I learned on Friday from answering questions and from working the platform game tutorial myself:
  • When you want to animate your character, assign a single object different sprites depending on its current state. and don't replace one object instance with another. For example, if your character moves left with one animation, stands with another, and moves right with another, then use one object and three different sprites for example, spr_left, spr_stand, and spr_right. [Refer to page 5 of the platform game tutorial.] You can use the built-in sprite_index variable to determine the state [see page 13 of the platform game tutorial].
  • However, if the character's behavior changes at some point in the game, then replace its instance with an instance of another object. For example, if your character gains superpowers, then replace the instance of obj_person with an instance of obj_superperson.
  • The collision mask referred to in the platform game tutorial refers to the way you set up the bounding box and  deselecting precise collision checking for animated sprites. (This is first referred to on page 4 of that tutorial.)
  • You can add layers to rooms to produce a 3D effect of characters moving in/out or behind objects. [See page 6 of the tutorial.]
  • How does the formula on page 9 of the tutorial work (to find out if the main character jumped on top of a monster)?
  • If you have an object that can take on a variety of appearances, but always behave the same way, then use a single object and use one of the sprite's subimages to show what an instance looks like. (The tutorial uses this technique for mushrooms.)

Friday, January 9, 2009

Today we should wrap up the first four tutorials:
  1. Your First Game
  2. Creating a Scrolling Shooter
  3. Maze Games
  4. Platform Games
If you are like me, you are tred of the tedium creating each tutorial game from scratch. [How many sprites can you load and how many objects can you define?] As you read the tutorial, look at the implementation in the example files. Tweak the example files to explore how you might do something. I think it's useful to remember what each game does so that when you work on your game, you'll know where to look to find out how to do something. For example, I remember that the maze game tutorial shows how to change the player sprite to face one of four directions.
Some questions came up yesterday that I think I found answers to:
  1. How can we get the background music to play continuously instead of starting over in each room? Start the sound in a controller_start object that is placed in the first room. [See the maze game tutorial.]
  2. Why does my character freeze in the maze game? Try disabling precise collision checking in the sprites. Make sure that the character does not stop unless it is aligned to the grid.
  3. How can I get a character to face the right direction (the direction it's moving)? Use the "Change sprite into..." action and select the subimage. Also set the speed to 0.
  4. Why doesn't the person object in the maze game have to define an event for collisions into all walls, not just for corners? Because each walls object has the corner object as a parent and so they are covered by the corner collision. When a group f objects have almost the same behaviors, consider defining one of those objects as a parent of the others. You can modify aspects of the behavior by putting an event handler in a child object that overrides the handler defined in the parent.
I have an obsrvation about collisions: It's better to put handlers for collision events between the main character and other objects in the other objects. This prevents the character from having a long list of events to handle. It also prevents the character from having to "know" about every other kind of object in the game.

Thursday, January 8, 2009

We'll spend the first part of the class finishing up the presentation on presentations and then dive into the tutorial on maze games. (If you haven't completed the scrolling shooter game tutorial, please complete it outside of class.)

I have compiled the links for sprite and sound resources that you sent me earlier in the week. There weren't many duplicates. With luck, we'll find lots of useful resources at these sites. I put names next to each link. If you can't find the resources on that page, then contact one of the submitters.

I have found an interesting video tutorial about how to make an animated sprite from a sprite sheet. Tryt it yourself with Kirby.

Wednesday, January 7, 2009

The main goal for today is to start work on a tutorial on maze games and to learn something about informal presentations to peers.

Finish up the scrolling shooter game tutorial and then start the Tutorial: Maze Games with a different partner. (This might mean a shuffling of seats.) This tutorial shows you how to create a simple maze game. It treats such aspects as how to make a character move from cell to cell, how to display the score and the lives, how to create monsters, and how to add all sorts of special features like movable blocks. Beginner.

Today we welcome Linda Powers at 11:00 to talk to us about giving effective presentations. You will give a few informal presentations during this project (for example, you will present your game design and your end product and you will give a status update for your project from time to time once you start work on your project). Ms. Powers is available to give some pointers and techniques for effective presentations.

Assignment

Start thinking about your game project and whether you want to team up with another student in the project. At this point we've only begun to explore the capabilities of Game Maker. However, you probably have a good enough idea of what can be done. (Figuring out how to do things is part of the fun and part of the reason I am here to work with you.) We will continue to work tutorials the rest of this week and the beginning of the next. On Monday I will ask each of you individually to tell me what you have in mind and whom you will work with if you decide to collaborate.

Looking ahead: Game proposals will be due Thursday, January 15 at the start of class. Presentations will be made Thursday and Friday. On those two days we'll also discuss approaches to building a substantial game in two weeks' time. I handed out proposal guidelines today.

Tuesday, January 6, 2009

We continue to learn how to use Game Maker by working tutorials and tweaking the tutorial games a bit to explore Game Maker's capabilities. Here are some of the main points from yesterday.

  1. The x-y coordinate system used by Game Maker for rooms is different from the standard coordinate system in that origin (0,0) is in the upper-left corner of the room and y values increase in the down direction.
  2. The notion of depth is important. Larger numbers are more distant from the observer. Negative numbers are closer. (The main plane flies at a depth of -100, enemy planes and bullets (fired from the main plane) are at depth 0, while the islands are at depth 10,000.)
  3. A variable holds the value of some property. A variable can belong to an object—for example, x, y, and can_shoot—or a variable can belong to the game—for example, score, room_width, and room_height.
  4. The function random(x)computes a random real number between 0 and x. (The number is always smaller than x.) The function is useful for placing objects at random locations.
  5. Sometimes it's useful to center a sprite at the center pixel of the graphic and sometimes it's useful to center it at the upper left corner (or other corner).
  6. The concept of relative is important. Relative amounts are added to a variable's current value and the sum becomes the variable's [new] value. Non-relative (absolute) amounts are given as the value of a variable.
  7. An object is a kind of thing in a game. An instance is a specific thing (occurrence of an object).
  8. Instances don't necessarily have to be destroyed. They can be reused by moving them to another position in a room—for example, the way island instances scroll off the bottom and the way the clown instance jumps to a new location when clicked.
  9. Collisions are between instances. Collision checking can be deactivated for some instances—for example, islands—to make a game run faster.
  10. There are 30 steps in a second.

The main goal for today is to complete the scrolling shooter tutorial work and to implement the revised Catch the Clown game.

Work with your partner from yesterday.

  1. Tutorial: Creating a Scrolling Shooter (zip file, 1.8 MB) Complete this tutorial, which we started yesterday. Work with a partner.
  2. Implement the revised Catch the Clown game (from yesterday). When you are finished, play it and then demonstrate it to me. You can add other enhancements, such as
    • Obstacles in the room
    • Clown leaving a ghost that, when clicked on, subtracts from the score.
    • Clown periodically goes into hyperspeed mode and a click is worth more points.

Assignment

It would be good to find some resources on the Web that can be used in the games we will develop. Find three Web sites that have good sprite resources for download and three Web sites that have good background music and/or sound effect resources for download. These resources should not have copyrights. Please find interesting and useful resources. Please don't just use the first three that Google lists. We want to find a variety of resources that everyone in the class can draw from.

Send the six links to me via e-mail before the start of class tomorrow.

Monday, January 5, 2009

The main goal for this week is to learn how to use Game Maker by working tutorials and tweaking those games a bit to explore Game Maker's capabilities.

Be sure to turn in the assignment due today.

The main goal for today is to get Game Maker running on the computer you will use all month and then to have some fun learning how to use it. The tutorials we will use today are available from YoYo Games | Tutorials. Each of the links is for a Zip archive. Download it to your computer and then expand it. The tutorial is in a PDF file. Some of the tutorials have a series of Game Maker files to open so you don't have to do all the steps. Make sure you understand what the steps were! The goal of these tutorials is not to produce a game, but to show how to produce a game. You'll need to use many of the same steps and techniques to build your game.

For the two tutorials today, work with a partner. One approach is to download the tutorial files to both computers, pull up the tutorial documentation on one computer and then use Game Maker work on the other.

  1. Tutorial: Your First Game (zip file, 850 KB) This tutorial is meant for people that have problems getting started with Game Maker. In very precise steps it helps you create your first game. Beginner.

    When you have completed the game, implement it on the other computer, referring to the tutorial as little as possible.

  2. Tutorial: Creating a Scrolling Shooter (zip file, 1.8 MB) This extensive tutorial shows you how to create a scrolling shooter. It also treats a number of aspects of Game Maker like the use of variables, views, and time lines. Beginner.

    This game is quite complex and has 7 example files to support it. You should work each of the steps yourself. For example, do not start this tutorial with the file 1945_1.gmk. Instead, start a new project, say 1945.gmk, and do the steps described by the tutorial. If you get stuck, look at 1945_1.gmk. This tutorial takes a bit of time to get through, but it covers a lot of useful features that you need to know how to use. Keep in mind that your goal is not to complete a tutorial, but to learn everything it covers. I'll be happy if today you can complete the first pat of the tutorial in which a plane flies over a sea—up to the section Enemy and weapon.

    After you have completed this first part of the tutorial, you and your partner should discuss what you need to do to develop a revised Catch the Clown game that uses the arrow keys to move a character representing the player around instead of the mouse. The character should be able to move a little faster than the clown and the clown should behave a little more predictably—that is, take a little more time between direction changes. You should develop your own character to chase the clown.