{"author_name":"AD-Edge","cat":"MiniLD","comments":[],"epoch":1353815880,"likes":2,"metadata":{"p_key":"51094","p_author":"AD-Edge","p_authorkey":"3467","p_urlkey":"86787","p_title":"Kinda half-time\u2019ish Post","p_cat":"MiniLD","p_event":"LD25","p_time":"1353815880","p_likes":"2","p_comments":"0","p_status":"UPD5","us_key":"3467","us_name":"AD-Edge","us_username":"ad-edge","event_start":"1355443200","event_key":"14","event_name":"LD25"},"text":"<p>Missed posting at the 24 hour mark! ~19 hours to go, close enough.<\/p>\n <p>Making some more progress, but the past few hours have been slow and problematic. I ran into one large problem, which was a kind of &#8216;grey&#8217; area cause by modules\/functions Ive never used in combination before (not sure if anyone has tbh). The main problem came down to the default use of &#8216;mipmaps&#8217; in the BGE and Blender itself. Basically, mipmapping doesnt work well with sprites. It &#8216;blends&#8217; the pixels of textures and the results are blurry, ugly sprites for super low-resolution stuff, ie the image below shows the effect:<\/p>\n <div style=\"width: 557px\" class=\"wp-caption aligncenter\"><img class=\" \" src=\"http:\/\/i.imgur.com\/mM5mu.jpg\" alt=\"\" width=\"547\" height=\"268\" \/><p class=\"wp-caption-text\">Mipmapping (fuzzy) vs disabled Mipmapping (sharp)<\/p><\/div>\n <p>This is fine in Blender itself, you can simply globally disable mipmapping, problem solved. But the issue existed when I then tried to run the game in the Burster plugin (for web-browser play), mipmapping was on by default &#8211; and theres <em>NO<\/em> way to turn it off. So the all-important browser version of the game was completely fuzzy.<\/p>\n <p>My initial idea was to completely redesign the &#8216;architecture&#8217; of the game. Splitting the Scene into two\u00a0independent\u00a0scenes, one for the 3D computer area, one for the mini-game area being projected onto the screen. I wasnt even sure if the VideoTexture module would work between scenes (which is the only reason why I didnt setup the game like this initially), but after a bit of hair-pulling coding I managed to get it sorted. I then applied a pixelated shader, which was applied to the mini-game scene so it would be pixelated, even though mipmapping was\u00a0permanently\u00a0enabled.<\/p>\n <p><strong>The new problem:<\/strong> The shader was applied to the scene, but the VideoTexture plugin wasnt &#8216;seeing&#8217; the now pixelated version of the level, so the screen was <em>still<\/em> blurry even though almost everything was running exactly as Id planned.<\/p>\n <p>After some more hair-pulling moments, another much simpler solution came to mind, all I had to do was increase the texture size to sharpen the pixel edges (compromising with slightly larger file-sizes). Major derp moment. This solution took 5 minutes to implement (thankful this is still early on and I dont have\u00a0hundreds\u00a0of textures to edit) whereas the previous failed method took almost 2 hours. Gah! At least the scenes are better organised now, the &#8216;architecture&#8217; of the game is much more solid so its not a complete loss&#8230;<\/p>\n <p>Either way, I just need to sort out a sprite animation issue and I&#8217;ll have a playable demo up and running for people to try out.<\/p>\n <p>&nbsp;<\/p>\n <div style=\"width: 486px\" class=\"wp-caption aligncenter\"><img class=\"  \" src=\"http:\/\/i.imgur.com\/23Zd9.jpg\" alt=\"\" width=\"476\" height=\"520\" \/><p class=\"wp-caption-text\">Damn Mipmaps&#8230;..<\/p><\/div>\n <p>&nbsp;<\/p>\n <p>Heres a look at the shader too, it worked pretty well and I&#8217;ll probably use it in future projects. You can see it in the background scene, a kind of &#8216;distant city&#8217; view which is the current WIP city for the game. I wont be using anything like this in final game now (happened completely\u00a0by accident) but I thought it looked a bit interesting.<\/p>\n <div style=\"width: 330px\" class=\"wp-caption aligncenter\"><img class=\"  \" src=\"http:\/\/i.imgur.com\/AHG9L.jpg\" alt=\"\" width=\"320\" height=\"335\" \/><p class=\"wp-caption-text\">Distant city with pixelated shader effect<\/p><\/div>\n <p>&nbsp;<\/p>\n \n <p>Tags: <a href=\"http:\/\/ludumdare.com\/compo\/tag\/ad-edge\/\" rel=\"tag\">AD-Edge<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/bge\/\" rel=\"tag\">BGE<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/blender\/\" rel=\"tag\">blender<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/derp\/\" rel=\"tag\">derp<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/drama\/\" rel=\"tag\">drama<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/minild\/\" rel=\"tag\">MiniLD<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/mipmaps\/\" rel=\"tag\">mipmaps<\/a><\/p>","time":"November 24th, 2012 10:58 pm","title":"Kinda half-time\u2019ish Post"}