{"author_name":"LoneStranger","cat":"LD #17 - Islands - 2010","comments":[],"epoch":1272138300,"likes":0,"metadata":{"p_key":"71040","p_author":"LoneStranger","p_authorkey":"203","p_urlkey":"106861","p_title":"LoneStranger\u2019s Islands Update \u2013 Map Loader and Player Movement","p_cat":"LD #17 - Islands - 2010","p_event":"LD17","p_time":"1272138300","p_likes":"0","p_comments":"0","p_status":"UPD5","us_key":"203","us_name":"LoneStranger","us_username":"lonestranger","event_start":"1271980800","event_key":"3","event_name":"LD17"},"text":"<p>Since my last update, I&#8217;ve worked on the player movement using KeyPressed and KeyReleased, so it moves whenever the keys are down and doesn&#8217;t fall victim to the keyboard key delay. I also implemented some bounding boxes so that the player cannot move off the screen and cannot run into other objects.  Their bounding boxes don&#8217;t have to be the entire tile, but they are limited to being rectangles. I would have liked circles or an array of rectangles, but I think that&#8217;s more than I need at the moment.<\/p>\n <p>The level manager is working with the tile manager to load levels. I can now edit a text file and make changes to the map.  It&#8217;s stored using a basic text format with some metadata and a grid of letters, numbers and symbols to determine the tile types. Here&#8217;s the most recent screenshot.<\/p>\n <div id=\"attachment_17947\" style=\"width: 560px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2010\/04\/20100424_143114890.png\"><img class=\"size-large wp-image-17947\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2010\/04\/20100424_143114890-550x412.png\" alt=\"TileManager and LevelManager are loading levels from text files.\" width=\"550\" height=\"412\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2010\/04\/20100424_143114890-300x225.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2010\/04\/20100424_143114890-550x412.png 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2010\/04\/20100424_143114890.png 800w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><p class=\"wp-caption-text\">TileManager and LevelManager are loading levels from text files.<\/p><\/div>\n <p>You can see my bounding boxes in the image.\u00a0 The tiles and the player have their own boxes and the player&#8217;s box cannot overlap it without the collision detection saying that he can&#8217;t move there.\u00a0 The cyan colored box on the inner edges of the W&#8217;s is actually a reverse bounding box.\u00a0 The player&#8217;s bounding box must overlap that box at all times, or the collision detection will not allow the player to move.\u00a0 This is just a trick to keep the player from moving off the screen.\u00a0 At the extreme, the player&#8217;s box will overlap by one row, and at that point the player is in the outside edge of tiles.<\/p>\n <p>Now I am going to move from using the generic GameTile class to more detailed tile classes for each tile type.\u00a0 After that, I believe it&#8217;s time to scan the doodles and put in the final graphics.<\/p>\n \n <p>Tags: <a href=\"http:\/\/ludumdare.com\/compo\/tag\/ld48_17\/\" rel=\"tag\">ld48_17<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/screenshot\/\" rel=\"tag\">screenshot<\/a><\/p>","time":"April 24th, 2010 2:45 pm","title":"LoneStranger\u2019s Islands Update \u2013 Map Loader and Player Movement"}