Ratios game

20 views
Skip to first unread message

Dmitri

unread,
Dec 19, 2010, 1:40:11 PM12/19/10
to Math Game Design
I was reading different ideas here and came up with the following game
description based in parts on Dor and Mike posts in particular. This
is more of a "programming" activity - set up the event and watch it
happen. Make changes and run again. I want it to be repeatable and
sharable.

We have a character on a bike, or multiple characters. They ride
mountain bike trails. The goal is not to ride the trail, but to
program the gears for it. Trails consist of one or more pieces with a
particular slope. Variables: two gears. We can control their sizes and/
or ratios. Players can control gears either by dragging controls
(analog, though discrete) or by entering numbers (numeric). The values
for each piece of the trail form a table of these pairs, with some
(visual) indication of their ratios.

One person can program several characters, or multiple people can play
at once.

We can use cute animations for characters falling, succeeding,
negotiating different types of terrain and slopes.

Different levels start with a single piece trail and become more
difficult.

There is a "trail designer" - the ability to program levels yourself,
including number of steps, degrees of slopes, and choice of terrain.

Look into integration with online spreadsheets to define saved trails
parametrically (save, load, change game).
Examples:
1 - url-encoded parameters http://www.wolframalpha.com/input/?i=%3Dy^2%2B5
2 - code pieces to copy and paste Hero Machine <http://www.ugo.com/
games/superhero-generator-heromachine-2-5> (code example
2.5b5*f1*Character Name*Hair:Standard,spikehawk,FFFFFF,FFFFFF,
100,100,23,Eyebrows:Standard,thing,FFFFFF,FFFFFF,100,100,21)

This may be interesting to Dor and Maria in their proportional
reasoning studies, and to all of us who teach.

Let's refine the description and think about an easy way to get the
first version out.

for...@ozonline.com.au

unread,
Dec 19, 2010, 7:03:15 PM12/19/10
to Dmitri, Math Game Design
There's a good chance you did not get my last mail because of the attachments
This time they are in the following link
http://www.box.net/shared/u5fihtlegd
Tony


Quoting for...@ozonline.com.au:

> Quoting Dmitri <drou...@gmail.com>:
>
>> We have a character on a bike, or multiple characters. They ride
>> mountain bike trails. The goal is not to ride the trail, but to
>> program the gears for it. Trails consist of one or more pieces with a
>> particular slope. Variables: two gears. We can control their sizes and/
>> or ratios. Players can control gears either by dragging controls
>> (analog, though discrete) or by entering numbers (numeric). The values
>> for each piece of the trail form a table of these pairs, with some
>> (visual) indication of their ratios.
>

> I did this game as an example for discussion. Its far from complete.
> It is a guide to what is achievable. It took me 2 1/2 hrs in Game Maker
>
> exe and source attached (if they are allowable attachments). Game
> Maker is a free download
>
> Tony


Dmitri

unread,
Dec 20, 2010, 11:54:00 AM12/20/10
to Math Game Design
Great start, Tony! That was fast!

For me, the main value of modeling is ability to tweak and rerun the
model. To this end I'd like to have a pause button to make changes and
resume or restart with changed parameters. As well as show the last
few runs that I can compare results overall and for each section.

Second, add more gear ratios to allow <1 ratio.

Third, I see two modes, close up, as it is now, and zoom out, when you
see complete track. Complete track view is important for pattern
noticing.

This is an inherently proportional context. I like this quote from
http://en.wikipedia.org/wiki/Bicycle_gearing article "As far as a
cyclist's legs are concerned, when changing gears, the relative
difference between two gears is more important than the absolute
difference between gears." The game needs to model this well and
visualize the ratio in several ways.

Good development!

On Dec 19, 7:03 pm, fors...@ozonline.com.au wrote:
> There's a good chance you did not get my last mail because of the attachments
> This time they are in the following linkhttp://www.box.net/shared/u5fihtlegd
> Tony
>
> Quoting fors...@ozonline.com.au:

for...@ozonline.com.au

unread,
Dec 20, 2010, 2:56:23 PM12/20/10
to Dmitri, mathgam...@googlegroups.com
Thanks Dmitri

> I'd like to have a pause button to make changes and
> resume or restart with changed parameters.

Start allows you to restart on the same track with different gear ratios
Reset generates a new track
Exactly what behaviour are you proposing?

> As well as show the last
> few runs that I can compare results overall and for each section.

Good idea, a table showing slope, gear ratio, time for each segment and total time?

>
> Second, add more gear ratios to allow <1 ratio.

This fails the reality pseudocontext test but it does introduce more maths, I have never seen ratio <1 though some 'granny gears' approach it.? The change is trivial to do though. Just say what teeth are wanted. The speed algorithm would need to be tweaked to use the new gears.

>
> Third, I see two modes, close up, as it is now, and zoom out, when you
> see complete track. Complete track view is important for pattern
> noticing.

Good idea

>
> This is an inherently proportional context. I like this quote from
> http://en.wikipedia.org/wiki/Bicycle_gearing article "As far as a
> cyclist's legs are concerned, when changing gears, the relative
> difference between two gears is more important than the absolute
> difference between gears." The game needs to model this well

I dont understand, model what?

> and
> visualize the ratio in several ways.

Such as?

Tony

Maria Droujkova

unread,
Dec 21, 2010, 3:28:38 PM12/21/10
to mathgam...@googlegroups.com
On Mon, Dec 20, 2010 at 2:56 PM, <for...@ozonline.com.au> wrote:

>
> Second, add more gear ratios to allow <1 ratio.

This fails the reality pseudocontext test but it does introduce more maths, I have never seen ratio <1 though some 'granny gears' approach it.? The change is trivial to do though. Just say what teeth are wanted. The speed algorithm would need to be tweaked to use the new gears.

I have not realized this! Maybe we can include some "lore of the gears" for when people try to do this?

Tony, what media does GameMaker take?

Cheers,
MariaD

Dmitri Droujkov

unread,
Dec 21, 2010, 4:11:52 PM12/21/10
to mathgam...@googlegroups.com
I don’t think the test fails, at least not on my bike. This page (http://www.cyclingsite.com/lists_articles/gearing_101.htm) has a gearing table for a 21 speed bike. You can go 20 front to 28 rear in this case.

for...@ozonline.com.au

unread,
Dec 21, 2010, 9:37:44 PM12/21/10
to Dmitri Droujkov, mathgam...@googlegroups.com
> I don�t think the test fails, at least not on my bike. This page
> (http://www.cyclingsite.com/lists_articles/gearing_101.htm) has a gearing
> table for a 21 speed bike. You can go 20 front to 28 rear in this case.

My error then. ratio<1 is authentic
I wish I had a gear like that! I have to walk the steep ones.

Tony

for...@ozonline.com.au

unread,
Dec 21, 2010, 9:47:42 PM12/21/10
to Maria Droujkova, mathgam...@googlegroups.com
> Tony, what media does GameMaker take?

It accepts a wide range of media formats
audio *.wav *.mid
images *.jpg *.gif and more, cant remember
Video, cant remember format

Tony


Colleen King

unread,
Dec 21, 2010, 10:38:26 PM12/21/10
to mathgam...@googlegroups.com, Dmitri
I like this idea and have some questions for Dmitri and Tony.

Incline
How do you envision the incline changing? Does it change after a specific amount of time? Is that time constant for each segment of the track?

Game play
Will students see the whole track and then pre-program the gear ratios for each segment? How does a student gauge how he or she is doing? How would the student know what an optimal ratio would be? For example, two people can travel the same speed using different gear combinations. Is the goal to get through the track without falling? If so, what would cause a fall? Or is the goal to complete the track in a certain amount of time?

Game Calculations
Tony, would you explain how you determined speed and max cadence?

So...is this going to be our first project?

Thanks!
Colleen


On Mon, Dec 20, 2010 at 2:56 PM, <for...@ozonline.com.au> wrote:

Tony

--
You received this message because you are subscribed to the Google
Groups "Math Game Design" group.
To post to this group, send email to mathgam...@googlegroups.com
To unsubscribe from this group, send email to
mathgamedesig...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/mathgamedesign?hl=en

"Let's build a better math game."

for...@ozonline.com.au

unread,
Dec 21, 2010, 11:27:45 PM12/21/10
to mathgam...@googlegroups.com, Colleen King, Dmitri
Colleen

> Incline
> How do you envision the incline changing? Does it change after a specific
> amount of time? Is that time constant for each segment of the track?

The way I did it was that each segment was of equal length, actually
duration =1/speed with a 'fix' for divide by zero

Though anything is possible

>
> Game play
> Will students see the whole track and then pre-program the gear ratios for
> each segment? How does a student gauge how he or she is doing?

The way I did it (though anything is possible) was to make the goal
minimum course time

> How would the
> student know what an optimal ratio would be? For example, two people can
> travel the same speed using different gear combinations. Is the goal to get
> through the track without falling? If so, what would cause a fall? Or is the
> goal to complete the track in a certain amount of time?
>
> Game Calculations
> Tony, would you explain how you determined speed and max cadence?

The simple model I used was that the lowest gears developed the
highest force and hence speed except that there was a limit to how
fast you could pedal, cadence. So the gear that would give minimum
time would be just on the cadence limit, selecting from the available
ratios, its either the gear just before or just after cadence limit. I
then tweaked the constants so that the full gear range was needed for
slopes of random +-30 degrees.

The maths that went into programming the game/simulation was much much
more interesting than the demonstration of ratios. But this is always
the way. Though suitable for older children, it would be good to
expose the underlying maths like the speed algorithm. The speed
algorithm effectively assumes that drag is proportional to speed
whereas its really proportional to speed squared. Thats one reason I
prefer making learning objects in Game Maker with open source, they
come with an implicit invitation for students to hack the code.

Interesting digression, its because drag=speed squared that headwinds
and tailwinds dont cancel out. Imagine riding into a headwind of speed
x at speed x and returning with a tailwind, the drag is 4x^2 +0
compared with x^2 +x^2 with no wind.

Another interesting part of the simulation is that I have assumed that
the backwards force from the slope is proportional to slope, this is
true for small angles where x =sin(x) =tan(x)


Tony


Colleen King

unread,
Feb 13, 2011, 1:46:21 PM2/13/11
to Math Game Design
This idea got off to a great start. Is the game still in development?
If not, what obstacles were encountered?

I'm amazed by how quickly a prototype can be created in Game Maker.
Tony, you obviously have a lot of experience with this program. Are
there other (more web-friendly) formats for the output files?

In general, what programming environments are best suited for the
games we want to make?

Colleen
Reply all
Reply to author
Forward
0 new messages