• 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

759 Good

About sirpalee

  • Rank

Personal Information

  • Location
  1. PyCharm
  2.   look at the chart above. it is the total runtime for camera rays + 64 random diffuse rays. more than normally used in realtime pt. video, paper etc. are on the way...      Well, let's do some math. Coherent rays doesn't matter for real-life applications, so I'm skipping the 2.5 billion rays / s benchmark. Tho, 1 rays + 64 secondary rays with 2.5 billion leads to 18 fps @ 1080p with primary and secondary sampling alone. No texture sampling, no shader graph execution.   IMHO, only the san miguel scene matters with incoherent rays, everything else is too simple compared to an average game. That's 100M rays/s tops, at 60 fps@1080p, that's 0.8 rays / pixel. Even with temporal anti-aliasing, that's not enough for anything. Besides this, shader execution not only breaks any of your hope for batching, but also is going to be more costly than raytracing itself. In raytracers, tracing rays is usually the cheaper operation, compared to the execution of a shader graph. So let's say, that' halves your ray budget, going down to 0.4 rays/pixel. You also want to do game logic, rebuild bvh for animation, physics etc... Another halving. So we are down to 0.2 rays/pixel on a 5k GPU.
  3.   Before you joined the topic, nobody was talking about procedural vs OOP. Our main focus was, to convince the OP to avoid zero initialization and to chose better data structures for his problems. (mainly talking about how bad are linked lists in many cases) STL classes have none of the indirection your design might have had, every function and algorithm is chosen at compile time. (well, that's the design philosophy of the whole STL / modern c++, don't pay for anything you don't have to)
  4. I checked your code, and compiled it on linux... (using c++11 chrono classes) You are using STL classes incorrectly. For example. This int *arr = (int *)calloc(sizeof(int), ARR_SIZE); for (int i = 0; i < ARR_SIZE; i++) { arr[i] = rand(); } Is not equal to   std::vector<int> list(ARR_SIZE); for (int i = 0; i < ARR_SIZE; i++) { list.push_back(rand()); } You'll get two completely different end results. The first one allocates an array, then overwrites the elements. The second one is allocating an array, then expanding the array with new elements. A better comparison is. std::vector<int> list(ARR_SIZE); for (int i = 0; i < ARR_SIZE; i++) { list[i] = rand(); } Also, were you compiling in release mode? As said earlier, in debug mode the STL contains extra checks, which is missing from your code. This is what I meant earlier by C++ code in comparisons usually doing more than the C code.
  5. +1 Vulkan is a separate product from OpenGL. Totally different philosophy.
  6. That's not true. I saw production code where people happily used STL containers. They might have rolled out their own allocators, but the flexibility of STL allows you to do that. STL containers are fast in most cases if you use them properly. For example, I'm using std::vector often, and it works perfectly. There are slowdowns in debug mode (of course), but that doesn't concern me. Also, there are many cases where STL or C++ templated approach is faster than C. In other cases, it'll be as fast as C as long as you are doing the same thing. Many comparisons are usually incorrect, because the C++ implementation is doing more than the C does. The behaviors of the containers are well documented and are deterministic. There might be small differences between compilers, but nothing you have to worry about too much. Yes, you can have total control by creating your own allocator. STL errors can be hard to read at first glance, but after a while you'll easily understand them. Clang even improves this further on. (MSVC will move to a clang based backend in the future btw) It potentially breaks any non trivial class / struct, not just STL containers. You should never zero initialize anything but the simplest structs.
  7. If you are using VC++, you should take a look at EASTL. They offer high-performance containers, that are also flexible.   https://github.com/electronicarts/EASTL/tree/master/include/EASTL   The right choice of the container depends on many factors. How often are you inserting elements, if you need sorted lists, how many elements are you going to use, etc... In a pretty general case, vectors behave better than lists, because of the more coherent memory access patterns, even up to relatively high member counts.
  8. OpenGL

    I have it. It's more of a reference, than a well explained tutorial. Also, you need gpu programming experience to fully understand the book. As a reference and a quick jump to vulkan's world for experienced gpu coders, it is an awesome material.
  9. Vulkan

    1, no, you don't have to remap all the buffer. You can just update the parts that have changed. Also, don't forget, you have to align your data properly. So be careful with single byte reads. 2, what is the question here? 3, use UBOs. Less limitations on size, and less code is spent on unpacking data. But, as always, benchmark it yourself. There might be differences between different architectures, and you might have to maintain both approaches.
  10. Would you mind extending your post with the actual solution, or at least a quick explanation about the issue? It's great you solved the problem by yourself, but with a solution the post would more useful for other people, who stumble upon this from a google search.
  11.   That's only true for one (or a few) specific hardware generation. You have to check the execution units count per compute unit per gpu type. There is a high amount of variance across different generations.   For example, when NVidia rolled out Kepler, they suddenly increased the simd count of the execution unit to 192, increasing the effectiveness of typical game shaders, but severely crippling the generic, compute workloads. That's why you had lots of people sticking to 580s when doing computing, even if the 680 series were out.
  12.   It takes about 1 minute to make a templated function that is doing the same. It's a bad idea to extend STL, and add a new function to some of the containers, when the standard only has loose guarantees for the container's implementations.
  13. If you are referring to luxrender under luxmark lux engine, then no, you shouldn't use that for games. It's not designed with games in mind. The performance is not good enough (well, it's a spectral raytracer), neither the engine supports updates to the scene at a frequency required in games.