XPQ9ӀԵLDh!FX ( @ (//(  0/80@0?/8 0( ?G@POWOXOP?H0@/7@O_``h_hPX 0(P_oppxow_g@O/8'' 7p`o?G/7 0??H/8`/o?GOX@H0?/pOW?H/8 7OP?G/7( P0@PX@O0@ 0O @H/@' 00@@P0?'_OP@H( 7/7' ^^^^^^^^^^^^^^^^^^^^^^^^^^TeeBBBBeTT^^^^^^^eBDJ33333JJDBeZ^^^^TD33==#####==3JDBT^^^^eJ=###=3DeZ^^TB3# #=3JBZ^^T3#  #=JBT^^J# Sll #=JBZ^T# %,68??86,/@A*< ##45('.6787-9%:;*<=#$+&,--.,/01)2 3 $%&&'%($!)* ##  !"#     ??dLU)@sprite0  x= {GGOLܽ7WD}MڼH0uHnwzMK$IweCd-_O}ϖBsZ97|;#丏>Z~|l𸢳sprite1  x;0sJ=5Nܜ6+$d>5,=4m82llc'YVڑq8ſx?G9p_+kv_}1n5W:_+|.wu߇W|7#>P'Ow/Uksprite2  yx10@Q='ܸ{\`R 3us#qq3y{6}Sjr ϹM * ѯ>Q&Mrϐ?|\_T|}5ٲ,qi4ssprite3  9xs5a3 b(fdH@Q@EhQ4F(Eh @SKec sprite_ball  _xVK0 soNaϝrŖd@͸OZn˩=ew^?\nڢQD (޺rz2GhC9gZ3̖s5H{ |mÐB)ڒ,/-? ٴ[q e⋴TYy,e!8U0-]Dͻ]^p 豒C"9,~(Iя*GX"HkZUS4*[dH }·otx9Fa? mMsprite6  Bxs5a3 b(fdH@Q@r1j揚?j揚?j Ƃsprite7  xͱ 0 D3%%P#zvbs B@Bp;ˮ,7/cŒy?fۈ{SWD ՇiKd@⫏" }Qۉ߾-&}QWZBѯ"t}9 K_B_& ~S / mlRsprite8  x@ a[GB-¡ʠ,;R(l!.0:ߩuCqsox1GbnO`~=p،Xscv0لN'Lq:GDB2 %tkb%ViJD_|a%d8$ܼ< )OaB |P2Jɬ?X^[Ǥŧ9x`'OV0t object0 object1 object2 object3 object5 kaction_set_gravity2700.1000000[w// this line is commented out, it asks you to give an initial ball speed // hspeed=get_integer("Horizontal speed",0) 0000000gaction_set_hspeed10000000 ctspeedspeed000000c tdirection direction000000[room_caption= "Superball G="+string(gravity)+" Speed="+string(speed)+" Dirn= "+string(direction) room_caption=room_caption + " KE="+ string(0.5 * speed*speed)+" PE=" +string(48-0.1*y) room_caption=room_caption + " PE+KE=" +string(0.5 * speed*speed +48 -0.1*y)0000000kaction_set_gravity2700.1000000action_if_object 10000000kaction_set_gravity3150.07071000000action_if_object 70000000kaction_set_gravity2250.07071000000action_if_object 30000000kaction_set_gravity00000000action_if_number 81000000action_next_room00000000 action_ifdirection<45||direction>225000000000000000 action_ifdirection>135&&direction<3150000000c direction22500000000000000c direction4500000000000000daction_if_variablevspeed0200000c direction27000000000000000c direction90000000c directionother.tdirection000000cspeed other.tspeed000000daction_if_variablevspeed020000000000000daction_if_variablehspeed0200000c direction000000000000000c direction18000000000000000 action_ifdirection<45||direction>2250000000c direction31500000000000000c direction135000000object6 object7 object8 room0 show_info()        4@  ` @†`ÆĆņƆdžȆ Ɇ@ʆ`ˆ؆ن چ `  @``@`@ %&`'@( *+,-.0=room1        `0P0 P p   00PP001`2@3 469PP<?Pp@ABDroom2'object5.speed =10 object5.direction=55        C`croom3        E F@G`HIKM`N@O  P@Q`RST`U@V` W@X YZ@[ acXGame InformationX{\rtf1\ansi\ansicpg1252\deff0\deflang3081{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil MS Sans Serif;}{\f2\fnil Arial;}} {\colortbl ;\red0\green0\blue0;} \viewkind4\uc1\pard\cf1\b\fs48 Superball\fs24 \par Tony Forster February 2006 \par \i\fs20 May be copied with acknowledgement\i0\fs24 \par \b0 \par \lang1033 You can just have fun with this adding more levels or you can use it to investigate potential and kinetic energy. \par \par The demonstration is based on the conservation of energy. As a ball rolls down a lossless ramp, it converts its potential energy (mgh) into kinetic energy (1/2mv\'b2). \par \par In the real world, this works fine on smooth curved ramps but a real ball will bounce when it hits an abrupt change in slope. I didn't want the ball bouncing all over the place and drawing curved ramps was too hard so I cheated, the ball just changes direction, with no loss of energy and not bouncing. This looks OK till you drop a ball onto a flat surface, try it! So lets say that the ball is really in a pipe or its locked to the rails like a carnival ride. \par \par In the top of the screen I monitor kinetic energy (\'bdmv\'b2) and potential energy (mgh). With mass=1 and g=0.1, total energy is \cf0\lang3081\f1\fs16 room_caption=room_caption + " PE+KE=" +string(0.5 * speed*speed +48 -0.1*y)\cf1\lang1033\f0\fs24 \par (The factor of 48 and the - sign come from the room being 480 high with down positive) \par \par You will see that the modelling is not quite right because total energy, though being fairly constant still changes a bit. \par \par CHALLENGES \par Add more levels \par Change the sprite to a skateboarder. Have it always face the right direction. (Hint see Asteroids at www.gamemaker.nl) \par Fix up the model so that total energy is conserved \par Change the model so that elastic collisions (lossless bouncing) with walls is correctly modelled. \par Make a 2 player game\lang3081\f2 \par } Spritessprite0sprite1sprite2sprite3 sprite_ballsprite6sprite7sprite8Sounds BackgroundsPathsScripts Fonts Time LinesObjectsobject0object1object2object3object5object6object7object8Roomsroom0room1room2room3 Game Information Global Game Settings