• 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

2147 Excellent

About clb

  • Rank
    Advanced Member

Personal Information

  1. I have a BenQ BL3201PT 32" UHD display that supports 10bit color channels on Windows desktop. In nVidia control panel settings, it shows up as a output color depth 10bpc in addition to 8pbc. Here is a screenshot of the control panel setting (googled from the web, that one has even 12bpc option it looks like)   As mentioned above, agree that simply having 10bpc over 8bpc doesn't mean much, unless the actual color space that the monitor can output would increase. This BenQ does not support the Rec.2020 colorspace (or even close), since I don't see any difference in anything with 10bpc vs 8bpc, i.e. 8bpc does not produce banding, nor does 10bpc mode produce any more brightness/luminance/colors/(dynamic) contrast. The TomsHardware test confirms that the display covers only 71.84% of Adobe RGB 1998 color space (and Rec.2020 is way larger than Adobe RGB 1998), and the 10bpc mode is implemented with FRC (frame rate control), so the "supports 10bpc" label on a display is not worth much alone.   Looking forward to seeing a display first hand that would support the full Rec.2020 space. Anyone knows if such displays are actually available for purchase yet?
  2.   This is called proof by example.   Game systems are complex. Yours or X-Plane's cases may not stress the same usage scenarios as Alien Isolation does. It could be difference in performance in a feature that has an easy marketed label attachable to it ("oh, it's geometry shaders that are slower", or "oh, tessellation is this much slower") which can be easy to attribute to layman terms, or it might as well not, and it could just be about some internal API call access patterns that a specific engine or a new fancy rendering technique might need to use.   What is causing the actual slowdown in this specific case, your guess is as good as anyone else's, and the only way to know is if you could ask the first-hand developers who have access to the code and have profiled the game on multiple platforms.
  3. Code snippets like the above should definitely come with a comment disambiguating the used conventions. Inherently a quaternion (nor a matrix) does not have forward, right or up vectors, but it is the semantic conventions that give such meanings. What is 'Up' in one engine can be 'Forward' in the conventions of another engine. Quickly glancing, in the conventions used by the above snippet, the function ComputeRightVector is the image of (1,0,0) or +X vector when transformed (=conjugated) by the quaternion, and ComputeUpVector is the image of (0,1,0)/+Y vector, and ComputeForwardVector is the image of (0,0,1)/+Z vector transformed by the quaternion. The coordinate system is assumed to be left-handed. Were those the assumed conventions?
  4. Split vectors in two halves, those with y < 0, and those with y > 0. Then first make the vectors with y < 0 always precede those with y > 0, and if the vectors have the same sign, then do the dot product. That is, something like bool compare(a,b) { if (a.y*b.y <= 0) // If a and b have different signs on their y coordinate? return a.y < b.y || (a.y == b.y && a.x < b.x); // Then the one pointing down comes before. If both have y = 0, then test x coord. else return a.x*b.y - a.y*b.x < 0; // Same y signs, establish ordering with a perpdot b. } I did not test this code in practice, but I know I use something like this in a recent project, though I don't have the source at hand now to verify. In particular, be sure to test the case when both vectors have y = 0 and only x coordinates differ.
  5. Like discussed already, there is an important distinction to be made between Frustum-AABB intersection test versus a Frustum-AABB culling test. In the first problem, we want to accurately determine whether the two objects intersect. In the second, we want to quickly find (and reject) AABBs that are certainly outside the Frustum, but don't necessarily care if there are some false positives that pass the sieve (since whatever purpose the culling is for, later stages of the pipeline will handle the few undetected cases).   The code presented by Aressera in comment 5 is the commonly presented fast culling test. If you need a precise Frustum-AABB intersection test instead of a culling test, see a precise SAT test, for example in MathGeoLib here: https://github.com/juj/MathGeoLib/blob/master/src/Algorithm/SAT.h#L26 . The difference between the full SAT and the culling test is that the full SAT test tests the cross products of each pair of face normals of the two objects in question, which is enough to quarantee no false positives from occurring.
  6. In MathGeoLib I use Hodgman's method, see https://github.com/juj/MathGeoLib/blob/master/src/Math/float3.h#L104 , and that has worked well in practice. For float4 type and __m128 support, I use the union approach, see https://github.com/juj/MathGeoLib/blob/master/src/Math/float4.h#L56 . I favor using those over fancy template accesses, simply because the generated intermediate code is much straightforward, and the code also looks cleaner. (and I extensively unit test on MinGW32/MingW64/GCC/Clang/MSVCs on different platforms so I know when the code is good or not for the platforms I care. Nothing beats rigorous automated testing when it comes to having a peace of mind for correctness)
  7. If you are still targeting old Windows XP and such, then DirectX SDK June 2010 was the last released separate SDK, available here: http://www.microsoft.com/en-us/download/details.aspx?id=6812 . See also this: http://blogs.msdn.com/b/chuckw/archive/2011/12/09/known-issue-directx-sdk-june-2010-setup-and-the-s1023-error.aspx
  8. You can find Triangle-AABB intersection test in MathGeoLib, with references to sources. See http://clb.demon.fi/MathGeoLib/nightly/docs/Triangle_Intersects.php https://github.com/juj/MathGeoLib/blob/master/src/Geometry/Triangle.cpp#L697
  9.   If you are trying to follow here the suggestion of Rattenhirn, just use his formulas as they were presented (in compact form below):     In particular, note how he passes the same angle value to sin() and cos(), instead of generating two different random values to pass to each.
  10. When you examine in a hex editor the file you created on disk, is the data correct?   Did the vertex data get loaded correctly upon examination after the ifstream::read() function returns?   Does glGetError() give any errors?   Do you correctly render geometry that did not come from a file? (I assume so, since you specifically point out an issue with rendering from content from a file)   What does your rendering code look like?
  11. Very good points. My benchmark does include loads and stores (identical in each tested variant) to hot cache, and it stresses more throughput, rather than latency. It is difficult to say which one is more important, since it depends if the computation of the overall algorithm has something else to do to hide the latency. Sometimes it's possible to hide latency that it doesn't matter, and other times it is not. Also indeed, none of the timing applies to GPUs or ARM or anything like that.
  12.   There is a crossover penalty, or a "bypass delay" at least on Intel hardware for crossing computation of data between float and int modes, see https://software.intel.com/en-us/forums/topic/279382 , so float -> int punning comes at the cost of one cycle.       Testing this on a Haswell Core i7 5960X, at https://github.com/juj/MathGeoLib/commit/e6f667e89a6b51f7c1e9bf2c35c074f3ad3509ac , with VS 2013 Community update 4 targeting AVX, yields (reposting the above numbers since different computer and compiler):   Carmack's: 6.16 clocks, precision: 1.75e-3 sqrt_ss(x): 5.92 clocks, precision: 8.4e-8 mulss(rsqrtss(x)): 2.08 clocks, precision: 3e-4 0x1FBD1DF5: 2.32 clocks, precision: 4.3e-2   Looks like using the SSE1 instructions is better at least on the Haswell.
  13. There's benchmarks of different sqrt versions in MathGeoLib benchmark suite. Experience gained from toying around there:     - the x87 fpu sqrt is slow, since modern math is all sse, and there's a penalty in mixing.     - the "Greg Walsh's"/"Carmack's (inv)Sqrt" method should never be used, it is slower and more imprecise than what SSE gives.     - don't assume std::sqrt or sqrtf would be fast, practice shows they might, or might not, and it depends on compiler+OS. Good compilers make these calls down to an intrinsic that gates on -msse or similar, bad ones perform a function call.     - for SSE1-capable hardware there are exactly two methods to consider: _mm_sqrt_ss(x), or _mm_mul_ss(x, _mm_rsqrt_ss(x)).     - _mm_rcp_ss(_mm_rsqrt_ss(x)) is inferior to mul+rsqrt in both performance and precision, on Intel at least.   In general, there is no free lunch, and when measuring what is fast, you are blind if you ignore the other side of the equation: precision. So whenever benchmarking for performance, remember to also benchmark for precision, since there's always a tradeoff. Custom Newton-Rhapson steps don't yield enough improvement to make any of the hacks better than SSE.   The results of the above sqrt variants on a rather old Core 2 Quad and 64-bit Win 8.1 and Visual Studio 2013 targeting 64-bit with SSE2:   Carmack's: time 10 clocks, max relative error (within x=[0, 1e20] range) to std::sqrt(): 1.7e-3 sqrtss: time 12 clocks, relative error 8.4e-8 mulss(rsqrtss): time 4.5 clocks, relative error 3.3e-4     Therefore the rule of thumb is that (on Intels at least) for precise sqrt, use _mm_sqrt_ss(x), and for the fastest possible sqrt, use _mm_mul_ss(x, _mm_rsqrt_ss(x)).
  14.   If the octree looks like as shown in your picture, don't worry, I guarantee you will have decent performance. You will at most test each other object in the node of the planet against that planet. Since the planet is huge, there won't fit many other planets inside the same node, and the number of tests in that node in general remains linear. Since the planet is a sphere, testing collision for that against other objects is dead simple, and you should be able to do in the order of 100k such tests per frame on current desktop PCs without seeing a blip anywhere.   If you have lots of planets, then you might end up in a scenario where things don't look at all like shown in your picture. Your picture is an ideal depiction of the scenario where the octree split planes fit the planet bounds perfectly. If you are doing uniform halving splits, that will most likely never be the case, and you can end up having a very tiny part of a sphere straddling over to a neighboring cell that is almost empty from that planet. If this happens for a lot of planets, there might be a way to do better by considering doing a object partition instead of a space partition, but I would not worry about that until you test your performance in practice and prove it to be a problem.   When measuring your octree performance, it is useful to compute the number of objects in it, the number of traversed nodes it has (empty or not) when doing checks, and the number of pairwise object tests you make. As long as you are seeing linear'ish performance as opposed to quadratic, there's not much chance of getting poor performance, unless your code is very inefficient otherwise (or if this is for a triple-A game with object counts nearing multiple millions).
  15.     Sorry, I think you are misquoting me here. The response was aimed for Vincent_M I believe.