{"author_name":"Alexander The 1st","cat":"LD #22","comments":[],"epoch":1324245960,"likes":0,"metadata":{"p_key":"60590","p_author":"Alexander The 1st","p_authorkey":"7803","p_urlkey":"96343","p_title":"L\u2019Joe is a real boy now!","p_cat":"LD #22","p_event":"LD22","p_time":"1324245960","p_likes":"0","p_comments":"0","p_status":"UPD5","us_key":"7803","us_name":"Alexander The 1st","us_username":"at1st","event_start":"1323993600","event_key":"8","event_name":"LD22"},"text":"<p>So&#8230;two hours before deadline, but I has something now! I has movement!<\/p>\n <p>&nbsp;<\/p>\n <p>And Gravity!<\/p>\n <p>&nbsp;<\/p>\n <p>And&#8230;.PLATFORMS!<\/p>\n <p>&nbsp;<\/p>\n <p>So that makes this a platformer then. This is close.<\/p>\n <p>&nbsp;<\/p>\n <p>Source:<\/p>\n <p><a href=\"http:\/\/www.sfu.ca\/~ajr12\/LudumDare22\/Beta\/\">http:\/\/www.sfu.ca\/~ajr12\/LudumDare22\/Beta\/<\/a><\/p>\n <p>&nbsp;<\/p>\n <p>&nbsp;<\/p>\n <p>&nbsp;<\/p>\n <p>Right, so now would be the time to add enemies, IIRC. Or&#8230;yeah. Then let them collide with the player to &#8220;kill&#8221; him, or collide with the lights to change how they&#8217;re working.<\/p>\n <p>&nbsp;<\/p>\n <p>Um, but first:<\/p>\n <p>&nbsp;<\/p>\n <p>Tween examples:<\/p>\n <p>&nbsp;<\/p>\n <p><a href=\"http:\/\/www.republicofcode.com\/tutorials\/flash\/as3tweenclass\/\">http:\/\/www.republicofcode.com\/tutorials\/flash\/as3tweenclass\/<\/a><\/p>\n <p>&nbsp;<\/p>\n <p>So this is where I got my tween code to work from &#8211; the basic premise is that, when the character jumps, it calculates his max jump, then motion tweens him to there.<\/p>\n <p>&nbsp;<\/p>\n <p>When that finishes, that tween object that did that throws an event that I listen for that triggers him falling, with another tween.<\/p>\n <p>And that tween has a listener that goes off every time the above falling tween moves, and checks to see if the character&#8217;s hitting an object &#8211; if it is, then it puts him above the object. (Might remove that last step if I felt this wasn&#8217;t going to let them fall into the ground.<\/p>\n <p>&nbsp;<\/p>\n <p><strong>ANYWAYS, <\/strong>I do a check every frame (Finally got this part working), and if neither of the above tweens are playing, and the player isn&#8217;t touching ground, then I make him activate the falling tween. So&#8230;Gravity. It works.<\/p>\n <p>&nbsp;<\/p>\n <p>Writing that down so I don&#8217;t forget next time I do Ludum Dare, because I probably won&#8217;t finish properly next time.<\/p>\n <p>&nbsp;<\/p>\n <div id=\"attachment_97753\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.ludumdare.com\/compo\/2011\/12\/18\/ljoe-is-a-real-boy-now\/finalleveldesign\/\" rel=\"attachment wp-att-97753\"><img class=\"size-medium wp-image-97753\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2011\/12\/FinalLevelDesign-300x242.png\" alt=\"\" width=\"300\" height=\"242\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/12\/FinalLevelDesign-300x242.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/12\/FinalLevelDesign-550x443.png 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/12\/FinalLevelDesign.png 564w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p class=\"wp-caption-text\">Blue ground, floating platforms, and second floor shown now. Also, L&#039;Joe on scene.<\/p><\/div>\n <p>Enjoy!<\/p>","time":"December 18th, 2011 5:06 pm","title":"L\u2019Joe is a real boy now!"}