<?xml version="1.0" encoding="UTF-8" standalone="yes"?><oembed><version><![CDATA[1.0]]></version><provider_name><![CDATA[Tyrant Haxorus]]></provider_name><provider_url><![CDATA[https://tyranthaxorus.wordpress.com]]></provider_url><author_name><![CDATA[tyranthackrous]]></author_name><author_url><![CDATA[https://tyranthaxorus.wordpress.com/author/tyranthackrous/]]></author_url><title><![CDATA[How to make player movement for a platformer in Gamemaker&nbsp;Studio]]></title><type><![CDATA[link]]></type><html><![CDATA[<p><img loading="lazy" data-attachment-id="2425" data-permalink="https://tyranthaxorus.wordpress.com/2016/05/23/how-to-make-player-movement-for-a-platformer-in-gamemaker-studio/gamemaker-studio-logo/" data-orig-file="https://tyranthaxorus.files.wordpress.com/2016/05/gamemaker-studio-logo.jpg" data-orig-size="1600,900" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}" data-image-title="GameMaker-Studio-Logo" data-image-description="" data-medium-file="https://tyranthaxorus.files.wordpress.com/2016/05/gamemaker-studio-logo.jpg?w=300" data-large-file="https://tyranthaxorus.files.wordpress.com/2016/05/gamemaker-studio-logo.jpg?w=1024" class="  wp-image-2425 aligncenter" src="https://tyranthaxorus.files.wordpress.com/2016/05/gamemaker-studio-logo.jpg?w=350&#038;h=197" alt="GameMaker-Studio-Logo" width="350" height="197" srcset="https://tyranthaxorus.files.wordpress.com/2016/05/gamemaker-studio-logo.jpg?w=350&amp;h=197 350w, https://tyranthaxorus.files.wordpress.com/2016/05/gamemaker-studio-logo.jpg?w=700&amp;h=394 700w, https://tyranthaxorus.files.wordpress.com/2016/05/gamemaker-studio-logo.jpg?w=150&amp;h=84 150w, https://tyranthaxorus.files.wordpress.com/2016/05/gamemaker-studio-logo.jpg?w=300&amp;h=169 300w" sizes="(max-width: 350px) 100vw, 350px" /></p>
<p>(The following method is borrowed from Animator XP&#8217;s &#8220;Game Maker Studio Tutorial: Arcade Platformer Part 1 (Movement)&#8221;</p>
<p>1.Create a sprite, name it spr_player</p>
<p><img loading="lazy" data-attachment-id="2286" data-permalink="https://tyranthaxorus.wordpress.com/2016/05/23/how-to-make-player-movement-for-a-platformer-in-gamemaker-studio/capture-3/" data-orig-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture.png" data-orig-size="20,22" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Capture" data-image-description="" data-medium-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture.png?w=20" data-large-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture.png?w=20" class="alignnone size-full wp-image-2286" src="https://tyranthaxorus.files.wordpress.com/2016/05/capture.png?w=20&#038;h=22" alt="Capture" width="20" height="22" /></p>
<p>2.Open up the sprite and select &#8220;Modify Mask&#8221;</p>
<p><img loading="lazy" data-attachment-id="2293" data-permalink="https://tyranthaxorus.wordpress.com/2016/05/23/how-to-make-player-movement-for-a-platformer-in-gamemaker-studio/capture1-2/" data-orig-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture1.png" data-orig-size="124,29" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Capture1" data-image-description="" data-medium-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture1.png?w=124" data-large-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture1.png?w=124" class="alignnone size-full wp-image-2293" src="https://tyranthaxorus.files.wordpress.com/2016/05/capture1.png?w=124&#038;h=29" alt="Capture1" width="124" height="29" /></p>
<p>3.In Bounding Box, set it to &#8220;Full image&#8221;</p>
<p><img loading="lazy" data-attachment-id="2296" data-permalink="https://tyranthaxorus.wordpress.com/2016/05/23/how-to-make-player-movement-for-a-platformer-in-gamemaker-studio/capture2/" data-orig-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture2.png" data-orig-size="154,86" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Capture2" data-image-description="" data-medium-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture2.png?w=154" data-large-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture2.png?w=154" class="alignnone size-full wp-image-2296" src="https://tyranthaxorus.files.wordpress.com/2016/05/capture2.png?w=154&#038;h=86" alt="Capture2" width="154" height="86" srcset="https://tyranthaxorus.files.wordpress.com/2016/05/capture2.png 154w, https://tyranthaxorus.files.wordpress.com/2016/05/capture2.png?w=150&amp;h=84 150w" sizes="(max-width: 154px) 100vw, 154px" /></p>
<p>This allows the player object to have the best collision possible with platforms.</p>
<p>4.Create an object, name it obj_player</p>
<p><img loading="lazy" data-attachment-id="2300" data-permalink="https://tyranthaxorus.wordpress.com/2016/05/23/how-to-make-player-movement-for-a-platformer-in-gamemaker-studio/capture3/" data-orig-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture3.png" data-orig-size="21,28" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Capture3" data-image-description="" data-medium-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture3.png?w=21" data-large-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture3.png?w=21" class="alignnone size-full wp-image-2300" src="https://tyranthaxorus.files.wordpress.com/2016/05/capture3.png?w=21&#038;h=28" alt="Capture3" width="21" height="28" /></p>
<p>5.Open up the new object and select &#8220;Add Event&#8221; in the events tab</p>
<p><img loading="lazy" data-attachment-id="2306" data-permalink="https://tyranthaxorus.wordpress.com/2016/05/23/how-to-make-player-movement-for-a-platformer-in-gamemaker-studio/capture4/" data-orig-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture4.png" data-orig-size="187,24" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Capture4" data-image-description="" data-medium-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture4.png?w=187" data-large-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture4.png?w=187" class="alignnone size-full wp-image-2306" src="https://tyranthaxorus.files.wordpress.com/2016/05/capture4.png?w=187&#038;h=24" alt="Capture4" width="187" height="24" srcset="https://tyranthaxorus.files.wordpress.com/2016/05/capture4.png 187w, https://tyranthaxorus.files.wordpress.com/2016/05/capture4.png?w=150&amp;h=19 150w" sizes="(max-width: 187px) 100vw, 187px" /></p>
<p>6.Select &#8220;Create&#8221;</p>
<p><img loading="lazy" data-attachment-id="2310" data-permalink="https://tyranthaxorus.wordpress.com/2016/05/23/how-to-make-player-movement-for-a-platformer-in-gamemaker-studio/capture5/" data-orig-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture5.png" data-orig-size="113,23" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Capture5" data-image-description="" data-medium-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture5.png?w=113" data-large-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture5.png?w=113" class="alignnone size-full wp-image-2310" src="https://tyranthaxorus.files.wordpress.com/2016/05/capture5.png?w=113&#038;h=23" alt="Capture5" width="113" height="23" /></p>
<p>7.In the &#8220;Actions&#8221; tab, select &#8220;Control&#8221; and in &#8220;Code&#8221; drag the document icon into &#8220;Actions&#8221;</p>
<p><img loading="lazy" data-attachment-id="2314" data-permalink="https://tyranthaxorus.wordpress.com/2016/05/23/how-to-make-player-movement-for-a-platformer-in-gamemaker-studio/capture6/" data-orig-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture6.png" data-orig-size="19,47" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Capture6" data-image-description="" data-medium-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture6.png?w=19" data-large-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture6.png?w=19" class="alignnone size-full wp-image-2314" src="https://tyranthaxorus.files.wordpress.com/2016/05/capture6.png?w=19&#038;h=47" alt="Capture6" width="19" height="47" /></p>
<p><img loading="lazy" data-attachment-id="2317" data-permalink="https://tyranthaxorus.wordpress.com/2016/05/23/how-to-make-player-movement-for-a-platformer-in-gamemaker-studio/capture7/" data-orig-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture7.png" data-orig-size="23,24" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Capture7" data-image-description="" data-medium-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture7.png?w=23" data-large-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture7.png?w=23" class="alignnone size-full wp-image-2317" src="https://tyranthaxorus.files.wordpress.com/2016/05/capture7.png?w=23&#038;h=24" alt="Capture7" width="23" height="24" /></p>
<p>8.In the code window, type in the following:</p>
<p>room_speed = 60 // sets the game&#8217;s frame rate. (FPS) 60 is the ideal FPS for games.</p>
<p>jumped = false //the player is unable to jump until an actions changes it to true.</p>
<p>9.Then in obj_player, select &#8220;Add Event&#8221; in the events tab</p>
<p>10.Open up the &#8220;Alarm 0&#8221; event</p>
<p><img loading="lazy" data-attachment-id="2353" data-permalink="https://tyranthaxorus.wordpress.com/2016/05/23/how-to-make-player-movement-for-a-platformer-in-gamemaker-studio/capture8/" data-orig-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture8.png" data-orig-size="112,25" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Capture8" data-image-description="" data-medium-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture8.png?w=112" data-large-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture8.png?w=112" class="alignnone size-full wp-image-2353" src="https://tyranthaxorus.files.wordpress.com/2016/05/capture8.png?w=112&#038;h=25" alt="Capture8" width="112" height="25" /></p>
<p>Repeat step 7</p>
<p>11. Type in the following:</p>
<p>jumped = false // this determines if the player is able to jump or stay on the ground.</p>
<p>This is changed in the &#8220;Step&#8221; code. The create event makes this variable and the alarm triggers when a player input changes it to false.</p>
<p>Repeat step 9</p>
<p>12. Open up the &#8220;Step&#8221; event</p>
<p><img loading="lazy" data-attachment-id="2367" data-permalink="https://tyranthaxorus.wordpress.com/2016/05/23/how-to-make-player-movement-for-a-platformer-in-gamemaker-studio/capture9/" data-orig-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture9.png" data-orig-size="113,24" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Capture9" data-image-description="" data-medium-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture9.png?w=113" data-large-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture9.png?w=113" class="alignnone size-full wp-image-2367" src="https://tyranthaxorus.files.wordpress.com/2016/05/capture9.png?w=113&#038;h=24" alt="Capture9" width="113" height="24" /></p>
<p>Repeat step 7</p>
<p>13. Type in the following:</p>
<p>if(keyboard_check(vk_left)) //when the left key is pressed<br />
{<br />
if(place_free(x-5,y))//this checks if 5 pixels to the left are open space<br />
{<br />
x-=5//speed of movement.<br />
}<br />
}</p>
<p>if(keyboard_check(vk_right)) //when the left key is pressed<br />
{<br />
if(place_free(x+5,y))//this checks if 5 pixels to the left are open space<br />
{<br />
x+=5//speed of movement.<br />
}<br />
}</p>
<p>if(keyboard_check_pressed(vk_up))//when the up key is pressed<br />
{<br />
if(!place_free(x,y+5))//this checks if 5 pixels up and down are open space.<br />
{<br />
jumped = true//the alarm changes to true.<br />
alarm[0] = 15// jump into the air. Affects how high the player jumps.<br />
}<br />
}</p>
<p>if(jumped == false)//when the alarm&#8217;s false, trigger the falling code.<br />
{<br />
//Fall code:<br />
if(place_free(x,y+8))<br />
{<br />
y+=8//affects how fast the player falls.<br />
}<br />
else<br />
{<br />
if(place_free(x,y+2))<br />
{<br />
y+=2<br />
}<br />
}<br />
}</p>
<p>else<br />
{<br />
//Jump code:<br />
if(place_free(x,y-alarm[0]))<br />
{<br />
y-=alarm[0]//the alarm changes to false.<br />
}<br />
else<br />
{<br />
alarm[0] = 1<br />
{<br />
y-=0<br />
}<br />
}<br />
}</p>
<p>14.Repeat step 1 and 4, name it spr_wall and obj_wall</p>
<p>15. Open up obj_wall and tick &#8220;Solid&#8221;</p>
<p><img loading="lazy" data-attachment-id="2389" data-permalink="https://tyranthaxorus.wordpress.com/2016/05/23/how-to-make-player-movement-for-a-platformer-in-gamemaker-studio/capture10/" data-orig-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture10.png" data-orig-size="46,26" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Capture10" data-image-description="" data-medium-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture10.png?w=46" data-large-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture10.png?w=46" class="alignnone size-full wp-image-2389" src="https://tyranthaxorus.files.wordpress.com/2016/05/capture10.png?w=46&#038;h=26" alt="Capture10" width="46" height="26" /></p>
<p>16. Make a room</p>
<p><img loading="lazy" data-attachment-id="2392" data-permalink="https://tyranthaxorus.wordpress.com/2016/05/23/how-to-make-player-movement-for-a-platformer-in-gamemaker-studio/capture11/" data-orig-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture11.png" data-orig-size="25,25" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Capture11" data-image-description="" data-medium-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture11.png?w=25" data-large-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture11.png?w=25" class="alignnone size-full wp-image-2392" src="https://tyranthaxorus.files.wordpress.com/2016/05/capture11.png?w=25&#038;h=25" alt="Capture11" width="25" height="25" /></p>
<p>17. Make a basic level and place obj_player in it.</p>
<p><img loading="lazy" data-attachment-id="2395" data-permalink="https://tyranthaxorus.wordpress.com/2016/05/23/how-to-make-player-movement-for-a-platformer-in-gamemaker-studio/capture12/" data-orig-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture12.png" data-orig-size="82,25" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Capture12" data-image-description="" data-medium-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture12.png?w=82" data-large-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture12.png?w=82" class="alignnone size-full wp-image-2395" src="https://tyranthaxorus.files.wordpress.com/2016/05/capture12.png?w=82&#038;h=25" alt="Capture12" width="82" height="25" /></p>
<p><img loading="lazy" data-attachment-id="2397" data-permalink="https://tyranthaxorus.wordpress.com/2016/05/23/how-to-make-player-movement-for-a-platformer-in-gamemaker-studio/capture13/" data-orig-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture13.png" data-orig-size="167,54" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Capture13" data-image-description="" data-medium-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture13.png?w=167" data-large-file="https://tyranthaxorus.files.wordpress.com/2016/05/capture13.png?w=167" class="alignnone size-full wp-image-2397" src="https://tyranthaxorus.files.wordpress.com/2016/05/capture13.png?w=167&#038;h=54" alt="Capture13" width="167" height="54" srcset="https://tyranthaxorus.files.wordpress.com/2016/05/capture13.png 167w, https://tyranthaxorus.files.wordpress.com/2016/05/capture13.png?w=150&amp;h=49 150w" sizes="(max-width: 167px) 100vw, 167px" /></p>
<p>The player should stand on the ground, fall when jumping and not pass through walls.</p>
<p>This method is good for platform controls that feel fluid and responsive on a basic level, but it has flaws. &#8220;Place_free&#8221; checks if a set number of pixels are open space, meaning this method is not ideal if your level design consists of pixel perfect platforms. Animation with player movement is also limited because &#8220;Keyboard_check&#8221; responds to the specific input.</p>
<p>Say you pressed left and the jump button together. Players will see the left key animation and not the jump key animation unless it&#8217;s the only button pressed.</p>
<p>E.g</p>
<p>if (jumped == true) //checks if jump is true</p>
<p>{</p>
<p>sprite_index = spr_playerjump //jump animation displays on screen</p>
<p>}</p>
<p>if (jumped == false) //checks if jump is false</p>
<p>{</p>
<p>sprite_index = spr_player // idle animation displays on screen</p>
<p>}</p>
<p>if(keyboard_check(vk_left)) //checks if the left key is pressed</p>
<p>{</p>
<p>sprite_index = spr_playerleft // left movement animation displays on screen</p>
<p>if(place_free(x-5,y))</p>
<p>{</p>
<p>x-=5</p>
<p>}</p>
<p>}</p>
<p>if(keyboard_check(vk_right)) //checks if the right key is pressed</p>
<p>{</p>
<p>sprite_index = spr_playerright // right movement animation displays on screen</p>
<p>if(place_free(x+5,y))</p>
<p>{</p>
<p>x+=5</p>
<p>}</p>
<p>}</p>
<p>If you require a method with complete and fully robust customization, use the method on GameMaker Tutorials.com</p>
<p>I hope this method has helped you with your title in progress. Do not hesitate to point out faults with this tutorial and take care.</p>
<p>References:</p>
<p>Gamemaker Tutorials.com &#8220;Platformer Basics [Article]&#8221; May 4, 2014 viewed on 22nd May 2016 <a href="http://gamemakertutorials.com/?p=383" target="_blank">http://gamemakertutorials.com/?p=383</a></p>
<p>AnimatorXP (May 8th 2016)&#8221;Game Maker Studio Tutorial: Arcade Platformer Part 1 (Movement)&#8221; retrieved from <a href="https://www.youtube.com/watch?v=sx50CKhfT88" target="_blank">https://www.youtube.com/watch?v=sx50CKhfT88</a></p>
]]></html><thumbnail_url><![CDATA[https://tyranthaxorus.files.wordpress.com/2016/05/gamemaker-studio-logo.jpg?fit=440%2C330]]></thumbnail_url><thumbnail_width><![CDATA[440]]></thumbnail_width><thumbnail_height><![CDATA[248]]></thumbnail_height></oembed>