• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

hupsilardee

Members
  • Content count

    226
  • Joined

  • Last visited

Community Reputation

491 Neutral

About hupsilardee

  • Rank
    Member
  1. Thanks Andrey, this technique is beyond fantastic!
  2. Hi all. I've been using item templates with a custom build tool and it's working fine. However, the item template only gets applied if I select "Create New Item". Ideally I want to be able to use "Add Existing Item", and customise the object type rather than using custom build tool and manually setting the properties. Is there a way to do this with VC++ 2012 Express? (I might upgrade to 2013 if required)
  3. Thanks for the alternative! Your method actually looks faster. (While we're here, would anyone mind reassuring me that this HLSL code to calculate the normal from the heightfield is actually correct?)   float hxm = Heightmap.Load(int3(iPos.x-1, iPos.y, 0)).r; float hxp = Heightmap.Load(int3(iPos.x+1, iPos.y, 0)).r; float hzm = Heightmap.Load(int3(iPos.x, iPos.y-1, 0)).r; float hzp = Heightmap.Load(int3(iPos.x, iPos.y+1, 0)).r; float h = Heightmap.Load(int3(iPos.x, iPos.y, 0)).r; float3 t1 = float3(2, hxp - hxm, 0); float3 t2 = float3(0, hzp - hzm, 2);      float3 n = cross(t2, t1);
  4. (solved)   Hi all, I'm working on normal mapping for my terrain. My terrain system calculates a normal map on the fly when a heightmap is loaded (or generated), which means I can use per-pixel normals. This makes distant terrain look a lot nicer. However, I am wondering if there is a clever way to calculate the tangent space for normal mapping, given some extra information   1. You are given the normal for a pixel, and this is already normalized 2. The first tangent is guaranteed to have X component = 0, because it's just a straightforward texture-splattedgrid geometry 3. Similarly, the second tangent has Z component = 0 4. Tangent space should be orthonormal   How can I fill in the unknowns in the most performance-friendly way possible?   Normal: (nx, ny, nz) Tangent: (0, ?, ?) Bitangent (?, ?, 0)   EDIT: Solved it. // tangent known to be perpendicular to normal dot(n, t) = 0 nx*tx + ny*ty + nz*tz = 0   // x component is 0 ny*ty + nz*tz = 0   // length of tangent is 1 ty*ty + tz*tz = 1   Now I have 2 equations for 2 unknowns which gives the z component as solution to a quadratic, where I'll take the positive answer! and I can work out the bitangent similarly, or use a cross product
  5. I've been looking through the DXGI_FORMAT so I can familiarise myself with everything D3D11 has to offer. Now I have a few questions about some of the formats I didn't understand...   1. What the hell does XR_BIAS mean? There was a wealth of Google results, none of which I could even begin to understand. Could someone explain this in small words?   2. Why are there no formats with 16 or 8 bits per channel (BPC) and 3 channels? Eg, R32G32B32_FLOAT exists but R16G16B16 does not. Seems like they'd be very useful for G-buffer organisation alone.   3. Why do some formats have 2 identical components? Eg R8G8_B8G8?   4. Some formats have a lot of wasted space marked as X - what's the point of this?   I think I know the answer to question 4 though. The X32 or X24 formats accompany the depth formats, so you can create a Texture2D with the R24G8_TYPELESS format, then create a DSV for it with D24UNORM_S8UINT to use as a depth buffer, and a SRV with R24UNORM_X8_TYPELESS to read the depth back in another shader (eg SSAO shader), am I right? 
  6. float2 vec; sincos(radians(angle), vec.y, vec.x);   :D
  7. Off topic tip: Instead of an alpha threshold, you could try a steep gradient outside the threshold, which will give nice antialiasing :)
  8. Hi all. I'm very happy with the way Visual C++ 2012 Express can auto-compile your shaders at build time to save loading time, so I'm looking at doing the same with other game assets. At the moment I'm making a custom build tool for sprite fonts, using the DirectXTK MakeSpriteFont command line. I got the custom build tool working for one file, with the Custom Build Tool property page looking like this:   Command Line:    "$(OutDir)FontTool.exe" "%(Filename)%(Extension)" Description:          FontTool is compiling a font... Outputs:               $(OutDir)\$(Filename).csf Additional Dependencies: Link Objects Treat Output as Content   FontTool is a quick command tool I whipped up in a separate project that reads the font attributes from a lua script in the text file and calls MakeSpriteFont based on those.   The problem is, when I tried to make an item template out of this file, new files made with the template don't have the custom build tool specified, they have reverted to "Doesn't participate in build". How can I include the same custom build in the item template?
  9. You could try a post-process AA, but it might damage performance. There are many options out there because lots of research went into it after deferred rendering became popular a few years ago
  10. I don't understand, why can't you clamp or saturate() the texture coordinates?
  11. I suggest you use the SimpleMath library that's part of the DirectXTK. It's a wrapper above DirectXMath, that provides Matrix, Vector2, Vector3, Vector4, Quaternion etc types, that make it much easier to write expressions intuitively.   The downside is a slight performance hit due to the way some data has to be unloaded and reloaded more times than necessary into the CPU registers, but it's extremely fast nonetheless.   My bottleneck is and will always be the scripting engine rather than the CPU math anyway :)
  12. Replace "linear" with "affine" in that sentence, and then it makes sense.   Oops. An affine transform is a linear transform followed by a translation.
  13.   Slightly incorrect. If you take the cross product of two points as position vectors, the magnitude of the resulting vector will be equal to the area of the triangle formed from the two points and the origin, which you don't want.   To calculate the area of the triangle formed by the points A, B and C, calculate the normal to the triangle by n = (B - A) x (C -A). The area is the length of that normal.   Pointless but interesting extra maths fact: if A, B, C are transformed by a linear transformation represented by matrix M, the area will be multiplied by the determinant of M. (Note projection matrix is NOT a linear transform ;))
  14. Download Blender and fix your gun. Ewww...   Reduce the graininess with mip-mapping and linear filtering A bit more colour variation in the textures would look great. I think the normal scale has turned out alright in this case, whether that's by luck or coincidence. You could do with a little ambient light - a light in that enclosed space wouldn't leave the away-facing parts of the wall pitch black.
  15. Grow/shrink the circle using 1D perlin noise? Make the radius a function of the angle, something like this:   // PerlinNoise1D(x) returns a value in [0, 1]   radius = radius * (PerlinNoise1D(angle) + 0.5);