• 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

2365 Excellent

About apatriarca

  • Rank
    Advanced Member

Personal Information

  • Location
    Torino, Italy
  1. The easier way to define the type correctly is to first create a typedef for your function type and then define your function returning that type. getfunc can't set his own value in its implementation. And it can't be a function pointer if you are trying to implement it as a function getting a char and returning a function pointer. getfunc would also have a different type than add or sub.. typedef int (*op_func)(int, int); // .. define add and sub op_func getfunc(char op) { switch(op) { case '+': return add; case '-': return sub; } } int main() { fprintf("5 + 7 = %d", getfunc('+')(5, 7)); fprintf("5 - 7 = %d", getfunc('-')(5, 7)); }
  2. Not really interpolation. That's a simple sum over the non-zero functions.
  3. I can't open your link but the basic approach is to define your field as a sum of basis functions centered at the maximum and minimum points. Many different functions can be used. Some additional examples include rational functions like 1/(1 + x^2) or piece-wise polynomial or trigonometric functions like F(x) = cos(x) + 1 in [-pi, pi] and zero outside. What other properties do you want from your peaks?   A cubic B-spline basis function is a piece-wise polynomial function which is used as the basis for B-spline curve and surfaces. It is defined recursively and they can be defined for any order/degree. The cubic B-spline basis functions are the more common ones. The local support property can be useful in this case since it means the function is zero outside some distance from these points (thus reducing the amount of computation required).
  4. I am not sure what you mean by the field to be uniform. You can use any function with a peak in the point to create production or consumption. Different functions will obviously look different. A good candidate can probably be cubic B-spline basis functions. They are quite fast to evaluate and they have a local support. Their derivative is also very easy to compute (which makes it easier to compute the flow).
  5. Nothing I have read in this post can actually be considered PBR. You have in fact just took the intuitive meaning of all those concepts and mixed them. A physically based approach should instead start from the ways a particular material interact with light. The formulas and meaning of the various terms are actually completely wrong. The specular light is computed in an incorrect way and it does not behave like specular light at all. The metallic term is not shininess, but a parameter used to interpolate between two very different material responses. A metal is very specular (even at normal incidence), it has a colored specular reflection and there is no diffused light. A dielectric has instead a mostly diffused response at normal incidence (only about 4% is reflected) and the reflection is white. There is no patina (not sure what you mean here). There are probably also other things.    While I agree implementing the concepts is the best way to learn, I think you should still try to read good resources on the subject and implement the concepts properly. If you just try to write things before really understanding them you risk to learn them wrong.
  6. In the shader you can do many different things to improve the details: 1. Increase the tessellation dynamically using the tessellation shader, 2. Use displacement mapping to give the impression of details without actually adding more geometry.
  7. This sort of implementation is actually useful in a more general settings than game development. This is not however a complete alternative to std::unordered_map since the handles are generated by your handle_map and not by the user. Considering the ECS system for example, the handles of the components will be all different. You can't use a single ID to retrieve all the components of an entity from the various systems.
  8. A few observations: 1. Do you really need to compute the radius each time? Isn't it a known quantity? 2. Why are you converting every angle to degrees? That's useless and you then have to convert them back to radians (or other range) to be able to use them. 3. The normal of each vertex is the vertex itself normalized. You can thus simply multiply the vector by some value to get the displaced one. If the vector has lenght R and you want its height to be H, you simply have to multiply by H/R. 4. This is probably all best done in a shader. The base displacement can be done in a vertex shader and you can probably also use a tessellation shader to increase details when needed. Finally lighting can do a great work in adding details. 5. I still have to check the correctness of your formulas.
  9. My problem with volatile was its use inside the loop. In this case the compiler can't rely on the fact the variable has not changed between the various iterations and it has to load&store each time the variable is used. An alternative solution, I think, can be to write to a big array. 
  10. The volatile keyword basically prevents any optimization in the loop. Moreover, each loop iteration depends on the previous one which means low pipeline usage in the CPUs and no chance for SIMD auto-vectorization. This isn't a particularly meaningful benchmark and I think it is not representative of the real performances of these functions.   I would simply use sin or sinf. In most cases it should use the correct cpu instruction, eventually also using SIMD ones or treating them as constant expressions.
  11. What video player library you are using on the other platforms?
  12. Why an artist should choose you instead of other people? You are mostly listing your skills, but there is no way to actually understand your level in each skill. Moreover, you are not showing any project you have done and you said you have problems completing your projects. If I were someone looking for a patner for making a project that skill would actually be quite important. Even projects you are not particularly proud of can be important to find someone.
  13. You can subdivide the regions with axis aligned rectangles (it seems the section of your cuts are either vertical or horizontal) and quite easily compute the area of the regions by summing all the areas of the rectangles.  
  14. If you do not understand the mathematics (and physics?) of indirect illumination, why are you trying to come up with a real-time algorithm for it? The first step to solve any problem (and thus also creating an algorithm for that) is indeed to understand it in depth. You should have at least looked for algorithms doing the same thing!    I find your description very confusing. I am not sure I understand what you mean by "photon" in your algorithm. A photon is simply light, there is no direct or indirect contribution. It also look quite expensive since you probably need to render your scene for a lot of photons and (I guess) store these render buffers in several textures. You will then need to retrieve all these information in some way in the final pass. 
  15. I personally find your two cons to be actually bigger problems than the pros. I never had much problems with public namespace pollution. I had problems with some code not compiling because I changed what was included in an header file, but if some code break because it relied on some implementation details then that code is buggy. I don't think it is a library fault. It is also a very easy problem to solve. Compile time is instead a very big problem in C++ for me. You should really try to reduce it or it will skyrocket when the project grow bigger. You also spend a lot more time maintaining the code than writing it.