Phun

Differences between revisions 1 and 13 (spanning 12 versions)
Revision 1 as of 2008-05-29 22:35:56
Size: 760
Editor: 71-218-47-179
Comment:
Revision 13 as of 2008-06-01 17:44:01
Size: 4187
Editor: 75-171-252-99
Comment: Formatting changes
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Phun is a simple 2D game/simulator where you enter simple situations and get simple results. I will be showing how to make games using the laws of physics. Phun is a 2D game/simulator where you enter simple situations and are shown the results in a visual format. I will be showing how to make games using the laws of physics.
[[BR]]
[[BR]]Note on formatting:
[[BR]]Sub-window names are ''italicized''.
[[BR]]
= Game 1: Racing =
[[BR]]First we will make a monocycle. This lesson will teach students about gravity and inertia.
== Step 1 ==
[[BR]]Change the settings. At the top of the screen should be a sub-window called ''Options''. If this is not there, click on the options button in the ''Phun beta'' sub-window.
[[BR]]The following should be on:
 *Draw Hinges/Fixes when running
 *Gravity
 *Friction
 *Draw Inside Objects
Line 3: Line 16:
Note on formatting:
Sub-window names are ''italicized''.
---- /!\ '''Edit conflict - other version:''' ----
Line 6: Line 18:
= Game 1: Racing = ---- /!\ '''Edit conflict - your version:''' ----
Line 8: Line 20:
First we will make a monocycle. This lesson will teach students about gravity and inertia. ---- /!\ '''End of edit conflict''' ----
[[BR]]The rest are relatively insignificant.
== Step 2 ==
Make the racing surface.
[[BR]]Select the Plane tool from the ''Toolbar''. Pick a point in the lower one-forth, drag your mouse strait up and let go.
[[BR]]You should have a ground now.
== Step 3 ==
Line 10: Line 28:
== Step 1 == ---- /!\ '''Edit conflict - other version:''' ----
Line 12: Line 30:
Change the settings. At the top of the screen should be a sub-window called ''Options''. If this is not there, click on the options button in the ''Phun beta'' sub-window. ---- /!\ '''Edit conflict - your version:''' ----
Line 14: Line 32:
The following should be on:
Draw Hinges/Fixes when running
Gravity
Friction
Draw Inside Objects
---- /!\ '''End of edit conflict''' ----
[[BR]]Make the monocycle!
[[BR]]Start by drawing a circle with the circle tool near the ground.
[[BR]]Draw a box using the box tool. Start below the bottom of the circle and to the right of the center of the circle and go to the left of the center of the circle and a little above the center of the circle. The box should hang down from the center and protrude.
=== Step 3.1 ===
[[BR]]Make the motor on the monocycle. Right-click on the circle, go to Geometry settings>Add center hinge. Right click on the hinge and go to Hinges>
[[BR]]Check the following:
[[BR]]Motor
[[BR]]Control with arrow keys
==== Testing ====
[[BR]]Press space to test it.
[[BR]]
[[BR]]Woah! What happened? It's gone!
[[BR]]Actually, it isn't. It just flew up so fast that you couldn't see it. Why? It the pendulum was hanging down into the ground. The fastest way to remove that was to fling it straight up. (To see the flung moncycle, right-click anywhere on the screen where there isn't any objects. Use the pan and/or zoom to find it.)
[[BR]](If the pendulum hangs inside the circle, that's OK. Just follow these instructions anyway to learn about collisions in Phun.)
[[BR]]
[[BR]]To go back to the editing screen press Ctrl-Z or click Undo Sim Start in the ''Control'' window.
[[BR]](If you Panned/Zoomed before, Pan/Zoom back.)
== Step 4 ==
[[BR]]Right-Click on the pendulum. Go to the Collision menu... >
[[BR]]Un-check all boxes.
=== Testing ===
[[BR]]Press space to start.
[[BR]]
[[BR]]Press the left arrow key. The pendulum should move left, followed shortly by the cycle.
[[BR]]Press the right arrow key. The pendulum should move right, followed shortly by the cycle.
[[BR]]
[[BR]]Isn't very interesting though, is it? Let's add an AI player. (Actually, the intelligence part of artificial intelligence is kind of a stretch.)
== Step 5 ==
[[BR]]Make the AI player.
[[BR]]
[[BR]]Select the brush tool, and draw a closed shape around the mono cycle. It should be flashing now. Go to the ''Options'' window and un-check Draw inside objects. Hold down Control and drag the monocycle until the two monocycles do not intersect. Right click on the hinge of the AI player. Go to Hinges... >
[[BR]]Uncheck Controlled by arrow keys.
[[BR]]Right-Click your monocycle body. Go to Collision Menu... >
[[BR]]Only Check:
Line 20: Line 68:
The rest are fairly insignificant. ---- /!\ '''Edit conflict - other version:''' ----
 *Collision group A
[[BR]]Right-Click the AI's monocycle body. Go to Collision Menu... >
[[BR]]Only Check:
 *Collision group B
Line 22: Line 74:
== Step 2 == ---- /!\ '''Edit conflict - your version:''' ----
 *Collision group A
[[BR]]Right-Click the AI's monocycle body. Go to Collision Menu... >
[[BR]]Only Check:
 *Collision group B
Line 24: Line 80:
Make the racing surface. Select the Plane tool from the ''Toolbar''. Pick ---- /!\ '''End of edit conflict''' ----
[[BR]]
[[BR]]You now have a controllable monocycle plus one to race against.
[[BR]]
[[BR]]Optional: Make things more interesting by setting the speed of both hinges to 45 rpm instead of 15.

Phun is a 2D game/simulator where you enter simple situations and are shown the results in a visual format. I will be showing how to make games using the laws of physics. BR BRNote on formatting: BRSub-window names are italicized. BR

Game 1: Racing

BRFirst we will make a monocycle. This lesson will teach students about gravity and inertia.

Step 1

BRChange the settings. At the top of the screen should be a sub-window called Options. If this is not there, click on the options button in the Phun beta sub-window. BRThe following should be on:

  • Draw Hinges/Fixes when running
  • Gravity
  • Friction
  • Draw Inside Objects


Warning /!\ Edit conflict - other version:



Warning /!\ Edit conflict - your version:



Warning /!\ End of edit conflict


BRThe rest are relatively insignificant.

Step 2

Make the racing surface. BRSelect the Plane tool from the Toolbar. Pick a point in the lower one-forth, drag your mouse strait up and let go. BRYou should have a ground now.

Step 3


Warning /!\ Edit conflict - other version:



Warning /!\ Edit conflict - your version:



Warning /!\ End of edit conflict


BRMake the monocycle! BRStart by drawing a circle with the circle tool near the ground. BRDraw a box using the box tool. Start below the bottom of the circle and to the right of the center of the circle and go to the left of the center of the circle and a little above the center of the circle. The box should hang down from the center and protrude.

Step 3.1

BRMake the motor on the monocycle. Right-click on the circle, go to Geometry settings>Add center hinge. Right click on the hinge and go to Hinges> BRCheck the following: BRMotor BRControl with arrow keys

Testing

BRPress space to test it. BR BRWoah! What happened? It's gone! BRActually, it isn't. It just flew up so fast that you couldn't see it. Why? It the pendulum was hanging down into the ground. The fastest way to remove that was to fling it straight up. (To see the flung moncycle, right-click anywhere on the screen where there isn't any objects. Use the pan and/or zoom to find it.) BR(If the pendulum hangs inside the circle, that's OK. Just follow these instructions anyway to learn about collisions in Phun.) BR BRTo go back to the editing screen press Ctrl-Z or click Undo Sim Start in the Control window. BR(If you Panned/Zoomed before, Pan/Zoom back.)

Step 4

BRRight-Click on the pendulum. Go to the Collision menu... > BRUn-check all boxes.

Testing

BRPress space to start. BR BRPress the left arrow key. The pendulum should move left, followed shortly by the cycle. BRPress the right arrow key. The pendulum should move right, followed shortly by the cycle. BR BRIsn't very interesting though, is it? Let's add an AI player. (Actually, the intelligence part of artificial intelligence is kind of a stretch.)

Step 5

BRMake the AI player. BR BRSelect the brush tool, and draw a closed shape around the mono cycle. It should be flashing now. Go to the Options window and un-check Draw inside objects. Hold down Control and drag the monocycle until the two monocycles do not intersect. Right click on the hinge of the AI player. Go to Hinges... > BRUncheck Controlled by arrow keys. BRRight-Click your monocycle body. Go to Collision Menu... > BROnly Check:


Warning /!\ Edit conflict - other version:


  • Collision group A

BRRight-Click the AI's monocycle body. Go to Collision Menu... > BROnly Check:

  • Collision group B


Warning /!\ Edit conflict - your version:


  • Collision group A

BRRight-Click the AI's monocycle body. Go to Collision Menu... > BROnly Check:

  • Collision group B


Warning /!\ End of edit conflict


BR BRYou now have a controllable monocycle plus one to race against. BR BROptional: Make things more interesting by setting the speed of both hinges to 45 rpm instead of 15.

Lessons/Phun (last edited 2008-08-06 16:36:42 by localhost)