Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php on line 164

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php on line 167

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php on line 170

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php on line 173

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php on line 176

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php on line 178

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php on line 180

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php on line 202

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php on line 206

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php on line 224

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php on line 225

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php on line 227

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php on line 321

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php on line 321

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php on line 321

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php on line 321

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/admin/class.options.metapanel.php on line 56

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/admin/class.options.metapanel.php on line 56

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/admin/class.options.metapanel.php on line 56

Warning: Creating default object from empty value in /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/admin/class.options.metapanel.php on line 49

Warning: Cannot modify header information - headers already sent by (output started at /home/wholehogitude/wholehog-games.com/devblog/wp-content/themes/platform/includes/class.layout.php:164) in /home/wholehogitude/wholehog-games.com/devblog/wp-includes/feed-rss2-comments.php on line 8
Comments for The Complete Swine http://www.wholehog-games.com/devblog Whole Hog Games News and Developer Blog Sat, 21 Mar 2015 18:42:52 +0000 hourly 1 https://wordpress.org/?v=4.8 Comment on Lighting a 2D Game by Casey Carlin http://www.wholehog-games.com/devblog/2013/06/07/lighting-in-a-2d-game/#comment-366 Sat, 21 Mar 2015 18:42:52 +0000 http://www.wholehog-games.com/devblog/?p=161#comment-366 Sharp eye with the bevels. Thankfully, it’s automatic!

The shader that lays down tiles takes 3 sets of UV coordinates, one for the base tile image, one for the damage texture, and one for the bevel. The damage and bevel images are made of two parts, a greyscale image that applies the Photoshop “overlay” blend effect to brighten or darken the tile color, and a normal map that is blended with the original normal map. The key here that because the bevel adjustment is not your typical alpha blending operation, it has to happen in the shader when you are drawing the original sprite. Overlay blending is simple, but you have many options with Normal Map blending; see http://blog.selfshadow.com/publications/blending-in-detail/ for details.

There are 17 edge images for different tile arrangements and 6 sets of edges used in the game. Full Bore’s image data is unpacked if you want to check it out. Check out FullBore\images\tiles.png and FullBore\images\tilesnormal.png

]]>
Comment on Lighting a 2D Game by Ralph http://www.wholehog-games.com/devblog/2013/06/07/lighting-in-a-2d-game/#comment-356 Tue, 17 Mar 2015 21:38:12 +0000 http://www.wholehog-games.com/devblog/?p=161#comment-356 Hey, really great article. I actually have one quick question, though.

I notice some of your background tiles are meant to repeat, obviously. However, while the tiles themselves are visually the same, their normal-mapped versions may not be.

For example, in the normal image above, you can notice some tiles have a bevel applied to them since they’re at the edge of a wall. However, these same tiles which are not at the edge do not have this bevel.

I’m just wondering if this is done manually. Do you just have 9 versions of each repeatable tile to account for the 9 different positions in could be placed in (top-left, top-middle, top-right, etc…)? Or is it somehow done with code?

In case I fail at explaining, only the top one has a bevel applied: http://i.imgur.com/3rvooZW.png

]]>
Comment on Lighting a 2D Game by Casey Carlin http://www.wholehog-games.com/devblog/2013/06/07/lighting-in-a-2d-game/#comment-324 Fri, 22 Aug 2014 05:25:57 +0000 http://www.wholehog-games.com/devblog/?p=161#comment-324 The falloff is computed in the shader on a per-pixel basis. The two contributing variables are that pixel’s distance from the light which is being represented by the geometry and the angle encoded in the normal map for that pixel.

If you look at the shader here: http://en.wikipedia.org/wiki/Blinn%E2%80%93Phong_shading_model
the diffuse component of the light (in Full Bore’s case, the only component) is the dot-product of the surface normal and the light vector:

float NdotL = dot( normal, lightDir );

I think that in Photoshop terms that would make the falloff spherical.

]]>
Comment on Lighting a 2D Game by James http://www.wholehog-games.com/devblog/2013/06/07/lighting-in-a-2d-game/#comment-323 Fri, 22 Aug 2014 04:43:17 +0000 http://www.wholehog-games.com/devblog/?p=161#comment-323 Very interested in the light geometry in the picture. is the radius fall-off an exponential interpolation between the max radius and the min radius? would love to see the for-loop code for that piece specifically.

]]>
Comment on Lighting a 2D Game by Casey Carlin http://www.wholehog-games.com/devblog/2013/06/07/lighting-in-a-2d-game/#comment-188 Mon, 07 Apr 2014 00:10:44 +0000 http://www.wholehog-games.com/devblog/?p=161#comment-188 Using deferred rendering for a 2D game is actually simpler in a lot of ways, but a tutorial for a 3D game is still very applicable. You can ignore the steps where you generate the normal and position g-buffers- Instead, in order to supply normal data for sprites, you use multiple Frame Buffer Objects and shaders that write your diffuse and normal textures to those FBOs. You can then use those FBOs as textures when you draw the lights. Full Bore’s rendering code is caught up in an abstraction framework, so any code I tried to simply post would be confusing. Once the full game is released, bother me, and I might be convinced to make a proper sample.

]]>
Comment on Lighting a 2D Game by Gerald Howes http://www.wholehog-games.com/devblog/2013/06/07/lighting-in-a-2d-game/#comment-187 Sat, 05 Apr 2014 23:01:09 +0000 http://www.wholehog-games.com/devblog/?p=161#comment-187 I am trying to get 2D deferred lighting into my OpenGL engine. I have had little luck as everything is xna or 3d. Could you please share how you did this for your game and maybe give code samples? Thanks

]]>
Comment on Contrast in Game Design by Tim Donley -- Donley Time Foundation http://www.wholehog-games.com/devblog/2012/12/23/contrast-in-game-design/#comment-53 Thu, 02 Jan 2014 10:46:17 +0000 http://www.wholehog-games.com/devblog/?p=115#comment-53 Well, it’s really nice stuff you have there. Not only does it look great but it answers a lot of questions I’ve always had in a very straightforward manner. I have friends who spoke about this and tried to explain it but this is hands down the best tutorial I have seen on the subject (and I have seen a lot). Do more!! I’d love to hear more about the process you employed at WholeHog -Tim

]]>
Comment on Contrast in Game Design by Finn Beazlie http://www.wholehog-games.com/devblog/2012/12/23/contrast-in-game-design/#comment-52 Wed, 01 Jan 2014 18:41:14 +0000 http://www.wholehog-games.com/devblog/?p=115#comment-52 Thanks, Tim. I didn’t find a lot of mentions of the tile set working together a a whole in the tutorials I was looking at, so I decided to share my discoveries.

]]>
Comment on Contrast in Game Design by Tim Donley -- Donley Time Foundation http://www.wholehog-games.com/devblog/2012/12/23/contrast-in-game-design/#comment-51 Wed, 01 Jan 2014 10:07:02 +0000 http://www.wholehog-games.com/devblog/?p=115#comment-51 This is one of the best articles I can remember for pointing out a useful technique for creating good looking tilesets! I bookmarked it and will be coming back to it! Thanks for this and very well done! Best! -Tim

]]>
Comment on Lighting a 2D Game by Casey Carlin http://www.wholehog-games.com/devblog/2013/06/07/lighting-in-a-2d-game/#comment-50 Mon, 30 Dec 2013 23:58:23 +0000 http://www.wholehog-games.com/devblog/?p=161#comment-50 Oh wow, that’s awesome! I’m glad you were able to make good use of my sample data.

]]>