X2o (activity): Difference between revisions

From OLPC
Jump to navigation Jump to search
(New page: Category:Gamescategory:softwarecategory:physicscategory:science {{olpcboxtop|toptext=[[{{PAGENAME}}|Physics]]}} {{ OBX activity | 40px|extr...)
 
 
(52 intermediate revisions by 11 users not shown)
Line 1: Line 1:
[[Category:Games]][[category:software]][[category:physics]][[category:science]]
[[Category:Games]][[category:software]][[category:physics]][[category:science]]
{{olpcboxtop|toptext=[[{{PAGENAME}}|Physics]]}}
{{olpcboxtop|toptext=[[{{PAGENAME}}|x2o]]}}
{{ OBX activity | [[Image: Activity-physics.svg|40px]]|extra}}
{{ OBX activity | [[Image: Activity-x2o.svg|40px]]|extra}}
{{ OBX source dev|activities/physics}}
{{ OBX source dev|activities/x2o}}
{{ OBX xobundle|http://dev.laptop.org/~bjordan/Physics-0.1.xo|Physics-0.1}}
{{ OBX xobundle|http://dev.laptop.org/~alevenson/x2o-9.xo|x2o-9}}
{{ OBX team | [[User:Bjordan|Brian Jordan]], [[User:alexlevenson|Alex Levenson]], [[User:Crazy-chris|Chris Hager]]}}
{{ OBX team | [[User:alexlevenson|Alex Levenson]],}}
{{olpcboxbottom}}
{{olpcboxbottom}}


==Overview==
= Physics =
[[Image:PhysicsElements.png|160px|left]]
Physics is a physical world simulator and playground -- you can add squares, circles, triangles, or '''draw your own shapes''', and see them come to life with forces (think '''gravity''', Newton!), friction ('''scrrrrape'''), and inertia (ahh, '''slow down'''!).


x2o (X to O) is a puzzle solving and critical thinking game similar to the Incredible Machine. It uses Box2D for it's physics engine and is being written by Alex Levenson.
We also plan to add forces such as: magnetism, springs, and motors


A level consists of a stage (or canvas) that starts out with a few fixed (non-user editable) components (see list of components below), a certain quantity of components that the user can add to the stage, an X, and an O. The X does not move, and the O is like a ball, it falls and bounces off the other objects in the scene. The goal is to get the O to land on the X (thus x2o, I know, it's backwards) making the XO logo. Thanks to Patrick Thomson for the name "x2o".
== Shape Drawing ==
[[Image:PhysicsTriangleDraw.png|160px]] [[Image:PhysicsSquareDrawing.png|160px]] [[Image:PhysicsCircleDrawing.png|160px]]


Please see my [http://dev.laptop.org/git?p=activities/x2o git repository] for a log of what's going on with x2o currently.
== Get Physics! ==
Click this link in browse: [http://dev.laptop.org/~bjordan/Physics-0.2.xo Physics-0.2.xo]
''OR'' (for the newest version...)
Open up the Terminal activity and follow these steps:
sudo yum install git
cd ~/Activities/
git clone git://dev.laptop.org/activities/physics
mv physics Physics.activity
# Then press ctrl + alt + erase to restart sugar.
# The newest version of physics is installed! (but may not be stable!)


===Old versions===
==Components List==
These are the "things" that can be in a level and affect the physics of the level. <b>Bold</b> indicates already implemented.
[http://dev.laptop.org/~bjordan/Physics-0.1.xo Physics-0.1.xo]


*<b>Ramps</b> are fixed in space (they don't fall or move obstacles). They can be used as walls, or as ramps for things to slide on, or as a surface to bounce off of.
=Usage=
*<b>Bouncy Balls</b> are small, light, and bouncy!
==Drawing objects==
*<b>Bowling Balls</b> are big, heavy, and not bouncy at all...
** '''Boxes'''
*<b>See-Saws</b> consist of a solid immovable base/fulcrum and a board hinged to the top of the base. They make good dynamic ramps (switches?) and catapults
*** Non-rotated box of any dimension
*<b>Fans</b> blow air (and objects) straight up. Good for keeping things airborne!
*** Use: click (top-left corner) drag + release (bottom left corner) -- like dragging a selection box in a photo editor
*Gears, Joints, pulleys and the like very soon to come
** '''Circles'''
*Baseballs, light but not bouncy
*** click (center) drag + release (outer edge)
*Balloons, move upward because they have "Helium"
** '''Triangles'''
*Basket, can prevent balls from rolling
*** Equilateral triangle of any size and rotation
*Spring, can bounce balls up
*** Use: click (center of base) drag + release (tip)
*Dripping Paint bucket, heavy at first but slowly loses weight over time as paint drips out
** '''Polygons'''
*Motors, Piston
*** Click for each point of the polygon
*Connectors, think of it as a rigid rope
*** Use: Right click to end OR left click in the circle around the original point
Got an idea for a component? Leave a note below!
** '''Magic Pen'''
*Conveyor belts
*** Use: Click and hold to draw any shape you'd like!
*Pipes
*Magnets
*Breakable Objects, glass boxes, balloons that can pop


==Using tools==
==Suggestions==
*Standard Sugar UI compatible activity icon -- Alex: Done!
* '''Grab''' - Drag existing objects around with the mouse
*Tool bar icons to fit with Sugar UI design -- Alex: How so? Shouldn't be in color?
* '''Connect'''
*Custom mouse pointers for different tools
** Click on any object, drag to another object + release to create a distance joint
*How about a palette for components? Then you can drag and drop them onto the canvas. -- Alex: yes! Good solution to the bad UI, thanks!
** Click on any object to add a revolute joint (like a push pin!)
* '''Destroy''' - Click on an object to destroy it, or draw a line of destruction--destroying everything in its path!


==Class Challenges==
==Name Not Optimal==
x2o might be too short of a name, and the play on words (2==to) is English only :(<br>
===Egyptian Pyramid===
Anyone have a better idea?<br>
How did the Egyptians build the pyramids using just human effort? They didn't have cranes, trucks or even cars. Make a block with a high mass and use a weak grab tool. How can you get it across the screen?
Put it here or in the discussion!<br>
--Alex


What about "X<-0" pronounced "X is less than minus zero".
===Vertical Tennis===
Can you use motors to make a device that hits a ball up and down?


"X-->0" works too - pronounced "X to O"; the arrow is less culturally specific than a 2.
=Plan to Add / Requests=
These are the features we would like to add, and if you think you can help us out please do!
#There are some tools that need to be added
#*fixate tool (object doesn't move / hangs in space)
#*More complex joint tool
#**Need to implement gears, motors, prismatic and revolute joints in elements (already implemented in Box2D)
#Need a way to change the properties of an object
#*density
#*rotation
#*strength (for breaking)
#*bounciness
#*friction
#*color
#More physics!
#*Joints + Motors
#*Magnetism
#*Springs -- via prismatic joints?
#*Breakable bodies
#*Note: We are using a ''rigid body simulator'' (box2D). All of the above need to be implemented using forces on rigid bodies. Breakable bodies can be achieved a few different ways:
#*#When a body 'breaks' it is removed from the physics engine and some kind of graphical animation indicates that it has been broken and dissipated
#*#When a body 'breaks' it is removed from the physics engine and is replaced by some new (smaller, fragment-like) rigid bodies (kind of like an explosion)
#*#When a body 'breaks' it is removed from the physics engine, it's shape is calculated and then split into smaller polygons which are then added as rigid bodies
#We need a way to save / export the state of a scene
#*Should set up a standard format for an elements scene
#Need to add objectives and limits
#*Incredible machine style objectives (get the ball into the basket, knock the triangle off the screen, etc)
#*You only have 4 boxes, 1 meter of magic pen, and one triangle, etc.


[[User:Filceolaire|Filceolaire]] 13:41, 25 January 2009 (UTC)
= Photographs =

[[Image:Housegolf.jpg|320px]]
==Needs to be Added==
[[Image:PhysicsNew3.png|320px]] [[Image:Bridgependulum.jpg|320px]]
*Sound
[[Image:PhysicsMesh.jpg|320px]] [[Image:Physics-1.JPG|320px]]
*Animation
[[Image:Physics-2.jpg|320px]] [[Image:Physics-3.jpg|320px]]

[[Image:PhysicsNew1.png|320px]] [[Image:PhysicsNew2.png|320px]]
==How to Use==
===Playing Levels===
When you first open x2o you are brought to the level editor. Click on the 'Run' tab, and then load a level from the drop down menu. Or click the button next to it to load a level from the journal.
You can always get back to the level editor by loading the level titled "Make your own levels". Once a level is loaded, click on the 'Insert' tab to add components to the level. Remember, your goal is to get the O to land on the X. If you want to see how much of each component you have, click on the component and the blue banner should tell you.

After you've added components, and would like to run the level, go to the 'Run' tab and click the green arrow. Clicking reset will reset and pause the level, and the revert button will reset and remove all the changes you've made.

You can use the move and remove tools to modify the components you've added.

===Making Levels===
There are two ways to make a level. One ways is to load the level editor ("Make your own levels") or to load an existing level. The process is the same for both, but if you load an existing level, you'll have to hit unlock on the modify tab in order to move the initial components.

Once you've created your scene, go to the activity tab and name the level. Then set the amount of each component the use should have (excluding the one's you've placed already). Then hit keep, that's it! The level is now saved in the journal. It's actually just a file generated by pickle.dump(), so if you pickle.load() it you'll get a python dictionary which you can edit as well.

===So you made a cool level===
If you make a cool level, then post it here on the wiki! In order to get the level file you can use browse to upload it (browse will open up the journal for you) or to email it to yourself or you can use the journal to drag the level onto a USB stick.

==Activity Info==
{{Activity page
|icon=Image:Activity-x2o.svg
|genre=Games
|short description=A puzzle solving and critical thinking game similar to the Incredible Machine.
|long description=A level consists of a stage (or canvas) that starts out with a few fixed (non-user editable) components (see list of components below), a certain quantity of components that the user can add to the stage, an X, and an O. The X does not move, and the O is like a ball, it falls and bounces off the other objects in the scene. The goal is to get the O to land on the X (thus x2o, I know, it's backwards) making the XO logo. Thanks to Patrick Thomson for the name "x2o".
|contact person=User:alexlevenson
|activity source=http://dev.laptop.org/git?p=activities/x2o
|language=English
|language codes=en
|related project=Physics_(activity)
|team=User:alexlevenson
|bundle URL=http://dev.laptop.org/~alevenson/x2o-9.xo
|activity version=9
|releases=7.1.2 (656), 8.1.0 (703), 8.1.1 (708), Candidate
|devel status=5. Production-stable
}}
{{Activity bundle
|bundle URL=http://dev.laptop.org/~alevenson/x2o-9.xo
|activity version=9
|releases=7.1.2 (656), 8.1.0 (703), 8.1.1 (708), Candidate
|devel status=5. Production-stable
}}

Latest revision as of 22:45, 31 March 2011

Activity-x2o.svg
.xo Bundlex2o-9.xo

Overview

x2o (X to O) is a puzzle solving and critical thinking game similar to the Incredible Machine. It uses Box2D for it's physics engine and is being written by Alex Levenson.

A level consists of a stage (or canvas) that starts out with a few fixed (non-user editable) components (see list of components below), a certain quantity of components that the user can add to the stage, an X, and an O. The X does not move, and the O is like a ball, it falls and bounces off the other objects in the scene. The goal is to get the O to land on the X (thus x2o, I know, it's backwards) making the XO logo. Thanks to Patrick Thomson for the name "x2o".

Please see my git repository for a log of what's going on with x2o currently.

Components List

These are the "things" that can be in a level and affect the physics of the level. Bold indicates already implemented.

  • Ramps are fixed in space (they don't fall or move obstacles). They can be used as walls, or as ramps for things to slide on, or as a surface to bounce off of.
  • Bouncy Balls are small, light, and bouncy!
  • Bowling Balls are big, heavy, and not bouncy at all...
  • See-Saws consist of a solid immovable base/fulcrum and a board hinged to the top of the base. They make good dynamic ramps (switches?) and catapults
  • Fans blow air (and objects) straight up. Good for keeping things airborne!
  • Gears, Joints, pulleys and the like very soon to come
  • Baseballs, light but not bouncy
  • Balloons, move upward because they have "Helium"
  • Basket, can prevent balls from rolling
  • Spring, can bounce balls up
  • Dripping Paint bucket, heavy at first but slowly loses weight over time as paint drips out
  • Motors, Piston
  • Connectors, think of it as a rigid rope

Got an idea for a component? Leave a note below!

  • Conveyor belts
  • Pipes
  • Magnets
  • Breakable Objects, glass boxes, balloons that can pop

Suggestions

  • Standard Sugar UI compatible activity icon -- Alex: Done!
  • Tool bar icons to fit with Sugar UI design -- Alex: How so? Shouldn't be in color?
  • Custom mouse pointers for different tools
  • How about a palette for components? Then you can drag and drop them onto the canvas. -- Alex: yes! Good solution to the bad UI, thanks!

Name Not Optimal

x2o might be too short of a name, and the play on words (2==to) is English only :(
Anyone have a better idea?
Put it here or in the discussion!
--Alex

What about "X<-0" pronounced "X is less than minus zero".

"X-->0" works too - pronounced "X to O"; the arrow is less culturally specific than a 2.

Filceolaire 13:41, 25 January 2009 (UTC)

Needs to be Added

  • Sound
  • Animation

How to Use

Playing Levels

When you first open x2o you are brought to the level editor. Click on the 'Run' tab, and then load a level from the drop down menu. Or click the button next to it to load a level from the journal. You can always get back to the level editor by loading the level titled "Make your own levels". Once a level is loaded, click on the 'Insert' tab to add components to the level. Remember, your goal is to get the O to land on the X. If you want to see how much of each component you have, click on the component and the blue banner should tell you.

After you've added components, and would like to run the level, go to the 'Run' tab and click the green arrow. Clicking reset will reset and pause the level, and the revert button will reset and remove all the changes you've made.

You can use the move and remove tools to modify the components you've added.

Making Levels

There are two ways to make a level. One ways is to load the level editor ("Make your own levels") or to load an existing level. The process is the same for both, but if you load an existing level, you'll have to hit unlock on the modify tab in order to move the initial components.

Once you've created your scene, go to the activity tab and name the level. Then set the amount of each component the use should have (excluding the one's you've placed already). Then hit keep, that's it! The level is now saved in the journal. It's actually just a file generated by pickle.dump(), so if you pickle.load() it you'll get a python dictionary which you can edit as well.

So you made a cool level

If you make a cool level, then post it here on the wiki! In order to get the level file you can use browse to upload it (browse will open up the journal for you) or to email it to yourself or you can use the journal to drag the level onto a USB stick.

Activity Info

Activity Summary

Icon: Sugar icon::Image:Activity-x2o.svg
Genre: Activity genre::Games
Activity group: ,|x|Activity group::x}}
Short description: Short description::A puzzle solving and critical thinking game similar to the Incredible Machine.
Description: [[Description::A level consists of a stage (or canvas) that starts out with a few fixed (non-user editable) components (see list of components below), a certain quantity of components that the user can add to the stage, an X, and an O. The X does not move, and the O is like a ball, it falls and bounces off the other objects in the scene. The goal is to get the O to land on the X (thus x2o, I know, it's backwards) making the XO logo. Thanks to Patrick Thomson for the name "x2o".]]
Maintainers: ,|x|Contact person::x}}
Repository URL: Source code::http://dev.laptop.org/git?p=activities/x2o
Available languages: ,|x|Available languages::x}}
Available languages (codes): ,|x|Language code::x}}
Pootle URL:
Related projects: Related projects,|x|Related projects::x}}
Contributors: ,|x|Team member::x}}
URL from which to download the latest .xo bundle Activity bundle::http://dev.laptop.org/~alevenson/x2o-9.xo
Last tested version number: Activity version::9
The releases with which this version of the activity has been tested. ,|x|Software release::x}}
Development status: Devel status::5. Production-stable
Ready for testing (development has progressed to the point where testers should try it out): ,|x|Ready for testing::x}}
smoke tested :
test plan available :
test plan executed :
developer response to testing :


URL from which to download the last .xo bundle that works with old releases Activity bundle::http://dev.laptop.org/~alevenson/x2o-9.xo
Activity version number: Activity version::9
The releases with which this version of the activity has been tested. ,|x|Software release::x}}
Development status: Devel status::5. Production-stable