• 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

969 Good

About Zao

  • Rank

Personal Information

  1. As this is the primary web search hit for the subject, any non-zero flags like the read-only depth/stencil ones in a DSV desc require feature level 11_0 or greater, the debug runtime returns invalid arg and issues a diagnostic: D3D11 ERROR: ID3D11Device::CreateDepthStencilView: A non-zero Flags field (0x1) is not valid, unless the GetFeatureLevel returns D3D_FEATURE_LEVEL_11_0 or greater. [ STATE_CREATION ERROR #2097153: CREATEDEPTHSTENCILVIEW_INVALIDFLAGS] D3D11 ERROR: ID3D11Device::CreateDepthStencilView: Returning E_INVALIDARG, meaning invalid parameters were passed. [ STATE_CREATION ERROR #148: CREATEDEPTHSTENCILVIEW_INVALIDARG_RETURN]
  2. Constructs like the one in fragment #4 is often erroneous even if you check both flags. eof() will not be true until a read attempt is made across the end of the file.   Unless there is additional checking below the std::getline call, it will run one final failing time after all the data is consumed and the code below may expect the string to contain valid data. Instead the code ought to inspect the state of the stream after a read operation. Typically you would design a "read all the lines" loop like: while (std::getline(is, str)) { ... }
  3. In the distributed storage software we use, clients authenticate with client certificates over TLS HTTP with the head nodes, which may either proxy the data to the storage pools or redirect the client to issue its PUT to the storage pools over unauthenticated HTTP.   The mechanism of redirect-on-PUT requires that the client _must_ issue a "expect 100 continue" on its initial request. This is so that the server will have the ability to decide on if to accept the data directly (by responding with a 100 continue), or redirect/reject/whatever with 30x/40x.   Our storage uses dynamically opened ports on the storage nodes and have a GUID as query parameter to figure out where to put stuff, but it's in no way secure. In your case, you'd either have to delegate credentials to the clients as part of the URLs, or make your S3 world-writable and pray.
  4.   Note that this is "new" behaviour on Vista and up, so if you're amusing enough to target XP, XP64 and/or Server 2003, you're going to end up with an interesting selection of reasonably low ports.
  5. In some projects, includes are required to be relative to the top of the hierarchy. This allows you to have a single include directory, typically with an absolute path, and simply include headers by their full path relative that location.   g++ -I%FIR_ECOSYSTEM_ROOT% foo.cc   In which foo.cc would include files in a manner like:   #include <boost/thread/thread.hpp> #include <my/awesome/graphics/buffer.hpp> #include <my/awesome/network/buffer.hpp>   By retaining the path information in the include directive you gain location independence and the ability to distinguish between several headers with the same filename.
  6.   The core problem with using a C-style printf is that you have to either guess at the length of the resulting string or use one of the "safe" sized variants of printf and attempt with larger and larger buffers until the resulting string fits.   This is more pretty_fatal_stack_smash than pretty_fatal_message_format.
  7. OK.
  8. If you want to do runtime x86 and x86_64 code generation properly (and yes, there's use cases for it), I would recommend using Xbyak. Nice little C++ DSL to generate machine code at runtime, complete with labels, jumping to them and all sorts of nice stuff.
  9. Division of integers in C++ truncates towards zero, discarding any fractional component of the result. If you want a floating point result, promote one or both operands to a floating point number.   As for your observed difference, if your defines just contain the tokens 1366 and 768, there is no semantic difference in your example. Remember, a preprocessor substitution is a direct textual replacement of the macro text.   That is why for when you have more complex constants you should probably use a static const number instead, as those obey precedence and scoping rules.
  10.   This is just convention, nowhere does the standard mandate that an copy assignment operator shall have any particular return type, it could even return void. The only requirement is that it shall have exactly one parameter as per C++11 13.5.3/1. 13.5.3/2 has an example with an copy assignment operator returning an int by value, for example.   As Álvaro mentions, if you do not declare a copy assignment operator, one will be implicitly declared and synthesised for you that does an element-wise assignment of the members.
  11. Let's state in plain text what the outer shell of the algorithm does: For each offset [font=courier new,courier,monospace]i[/font] in the string - take successively larger substrings of even length from that offset, until the end of the string is reached. [font=courier new,courier,monospace]i[/font] is the left index of the substring, inclusive. [font=courier new,courier,monospace]j[/font] is the right index of the substring, inclusive. [font=courier new,courier,monospace]j+1[/font] is the right index of the string, exclusive We cannot immediately use [font=courier new,courier,monospace]j[/font] in our expressions, as we want to both find out if a substring is even and the [font=courier new,courier,monospace]substring(off,n)[/font] function takes an absolute count [font=courier new,courier,monospace]n[/font] of characters. We can set up an equation to find the length from [font=courier new,courier,monospace]i[/font] and [font=courier new,courier,monospace]j[/font], looking for "what number must we add to [font=courier new,courier,monospace]i[/font] to get the index of one character to the right of [font=courier new,courier,monospace]j[/font]": [font=courier new,courier,monospace]i + len = j + 1[/font] [font=courier new,courier,monospace]len = j + 1 - i[/font] [font=courier new,courier,monospace]len = j - 1 + 1[/font]
  12. It will most likely make you less desirable for some people and/or studios, compared to an unadorned human. Get the wrong interviewer and you might be racking up some negative points due to their personal opinions and ideals, even subconciously. In general though, this industry tends to be quite used to strange-looking misfits. Just look at the people in an average art department and you'll see lots of strange stuff.
  13. The requirement that shared_ptr has on the pointee is that for the one-argument ctor, the object pointed to shall be sourced from plain [b]new[/b], and as such should be destroyable with plain [b]delete[/b]. For the ctor that accepts a pointer and a deleter, the only requirement is that the expression [b]d(p)[/b] should be well-formed. This doesn't however mean that you can use the memory as an object unless you've explicitly constructed an object in it via placement new or some other method. While you [i]can[/i] form a shared_ptr to uninitialized memory with a custom deleter, it's very counter-productive as you will not be able to use it as an object of that type and will most definitely invoke UB if you ever touch it.