• 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.


  • Content count

  • Joined

  • Last visited

Community Reputation

195 Neutral

About Hornsj3

  • Rank
  1. If you want per-pixel lighting you have to do it in the pixel shader.     To do this you need at least the pixel normal and light direction vector for each light used.  You can calculate the light vector if you pass position and have the light positions as a uniform, and you must pass the normal vector as input as well.   Yes, what you describe is the standard way.
  2. There's at least one book with an example implementation. Practical Rendering and Computation with DirectX 11.
  3. The author is pretty responsive. I've contacted him in the past.
  4. I'm going to remove this post because I don't think it adds any value.
  5. [url="http://www.crcpress.com/product/isbn/9781568817200"]http://www.crcpress.com/product/isbn/9781568817200[/url]
  6. Another optimization. I can't remember the syntax exactly but you should probably grab raw memory instead of new chunk[max_chunks]. The reason is calling new chunks[max_chunks] will invoke the chunks constructor max_chunks times. There's no reason to do this and it will slow you down. I think the solution is this chunk* variableName = static_cast<chunk>(operator new (sizeof(chunk) * max_chunks)); The difference is when you say "operator new" and specify an amount of memory it will just reserve raw memory and therefore not construct your objects. All other aforementioned rules apply. edit - When doing this please note you have to keep track of how many constructed objects you have and where they are in the buffer because as I mentioned those objects will not exist until placed. Using raw memory when you expect to have a constructed object would not have the effect you intend =D.
  7. That looks about right, yes. Edit - I spoke a bit too soon. You don't want to call delete on a single item. The whole idea is to have that memory reserved for your program throughout its lifetime. Just call the destructor on the object you want to get rid of. You only have to call delete on the buffer when you are done with the entire thing. //To get rid of one item : pseudo code (chunkList + someInteger)->~chunk(); (e.g. chunkList + 3 will put you at effectively chunkList[3]) //to get rid of the pool : pseudo code 1. for each object in pool 2. call destructor 3. end of loop 4. call delete [] pool. Herb Sutter has a great example of this in Exceptional C++.
  8. If you are using C++ you could use a memory pool. This would cut down on your allocation and deallocation on the heap. Basically during program initialization you could allocate an amount of memory off the heap and store it in a pointer. Then, you can use the placement new (look this up) syntax during runtime to store your data in this pre-allocated area of memory. Because heap allocations are expensive at runtime and can throw exceptions this solution would increase your performance and make it more exception safe. You must look up how to use placement new because there are tricks to it, such as the need to explicitly call the destructor. edit - You don't have to store all of the tiles in memory either, you can place and destroy at will.
  9. Hmm if you said DX11 I would say use an unordered access view (UAV) and use it as a RWTexture2D in your pixel shader. It looks like those are only available in the compute shader for DX10.
  10. This shader is going from screen space to world space. It is taking a point (where w == 1 i.e. screen space) and multiplying by the inverse of the view*projection matrix. After this multiplication w should not be 1. You then divide the point by w to get the world space coordinates. I'll have to do more digging in my graphics text book for a detailed explanation. What I've just given you is based off memory and a quick refresher.
  11. Look up the terms perspective divide and homogeneous coordinates. Also, post code for the shaders please. It is hard to imagine the full context. Thank you.
  12. The more you know about the subject, the quicker it is to finish. Sometimes you just want to get a different person's perspective, but you are already an expert on the subject. Sometimes it's a new subject and you have to learn to think differently (the graphics pipeline comes to mind here).
  13. And, WIN32 is fully supported for Windows8 desktop apps. If you are targeting Metro Apps you have to target WinRT, as well as a subset of DirectX (due to the Metro sandbox). Go to MSDN and look at the target environment of some of the functions (desktop apps / metro apps). Like all mobile environments, MetroUI restricts access to system resources.
  14. The orientation is determined by where the camera is looking, i.e. the target vector, and the up direction. If your camera is rolling you create the quaternion for rotation about the target vector. You can then multiply the current up vector by that quaternion, and then that result by the conjugate of the quaternion (same as the inverse of a quaternion if the quaternion's vector component is uniform). This will give you a new up vector which will be in a direction which corresponds to the rotation about the target axis. Follow the example above for roll. The view matrix can then be created using the [left][background=rgb(250, 251, 252)]XMMatrixLookToLH( m_camPosition, m_camTarget, m_camUp) function.[/background][/left]
  15. A quaternion represents a rotation of some scalar amount around a specified axis. (e.g. {30.0, 0.0, 0.0, 1.0} could represent 30 degrees around the z axis) What you are doing above seems to be creating a view matrix and using that to generate a rotation quaternion. If you use the XMMatrixRotationQuaternion method I think you need to pass it a rotation matrix (not the view matrix). Either way, once you have the rotation quaternion you apply it to the up axis to rotate the up direction with respect to the amount of roll you specified. I think you should search around for a simplified explanation of quaternions. I am terrible at explaining this.