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

Nitage

Members
  • Content count

    1503
  • Joined

  • Last visited

Community Reputation

1107 Excellent

About Nitage

  • Rank
    Contributor
  1.   I couldn't disagree more with that line of argument. A very common weakness of GC'd languages is a lack of robust facilities for managing resources other than memory. In my opinion, RAII is the gold standard for resources management.
  2.   As a general principle: where the option exists to use functionality that's been written by domain experts and has been extensively tested in the real world, you should strongly prefer that over your own code.
  3.   Am I missing something here? A pointer/reference to a derived class should implicitly convert to a pointer/reference to a base class, so a simple assignment should do and dynamic_cast isn't necessary.
  4.   You listed some requirements in your original post. The purpose of switching language is to satisfy those requirements, nothing more.   So the real question is why would you not switch to a language that meets your requirements only because that language offers other functionality that you don't intend on using?
  5. I like Ada's version, where the header contains only the interface. Not so much the C/C++ version where the decision of what goes into the header file isn't logical, but is instead a consequence of technical details regarding translation units.
  6.   I'm not going to say that you're crazy, but what you're doing is throwing out good solutions because they aren't perfect.   Almost everything you've asked for can be achieved by using C compiled as C++ with a few whitelisted C++ features. For example, your issue with member function pointers not being automatically tied to an object instance can be solved by using a template function that uses `std::bind` internally. You can then ban all other uses of template functions or std::bind, or any of the other C++ features you dislike. Basically, it seems you want C with a bit of extra syntactic sugar. You can get that from C++.   The same goes for Go, D and Rust - any one of them meets your basic requirements. It seems like you're just seeking out reasons not to use them rather than having genuine requirements that preclude their use.     If that's true - that this "flaw" kept you from even considering C++ - then you've made a mistake. Your statement that you "Cannot set a callback on a member function"and that it's "impossible in the base C++ language" is just false and you've thrown out a potential solution due to a misconception.
  7. That's an anonymous enum with a single member which is an array of arrays of strings.   Its C++ equivalent is:   constexpr const char* logTypes[2][2] = {   {"red"       , "color"},   {"blue"       , "color2"}, };
  8. The dominating reason for slow times is the preprocessor, no question. The preprocessors #include directive can mean compiling a 100 line file requires processing several orders of magnitude more code, and #if... directives make it very hard to cache the results of processing a file. There are also other issues; C++ compilers do more than C# ones. Some parts of C# compilation are deferred until runtime (JIT) and the Microsoft C# compiler doesn't optimize nearly as aggressively as their C++ compiler or g++. For example, it doesn't ever perform tail call optimization (there's a IL 'tail' instruction which the F# compiler emits, but the C# one doesn't). This is minor in comparison to the preprocessor issue though.
  9. [quote] i = j * 5; … in C you know, at least, that j is being multiplied by five and the results stored in i. But if you see that same snippet of code in C++, you don’t know anything. Nothing.... [/quote] I've read the Joel article several times before and have never found it convincing. The alternative to operator overloading for 'j *5;' is 'multiply(j,5);'. Now, if you write a binary operator* that doesn't multiply you are an idiot, but no more of an idiot than if you'd written a function called 'multiply' that doesn't multiply.
  10. You don't need to use the [i]ref[/i] keyword at all, seeing as you're not assigning to the [i]bne [/i]parameter. Also, keep in mind that in C# parameters of a class type are automatically passed by reference and using the [i]ref[/i] keyword creates a reference to a reference.
  11. [quote] [left]Ok, so what's the solution? Iterate each element and do erase+unique?[/quote][/left] [left][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3]No, just use the two parameter version of [tt]erase[/tt].[/size][/font][/color][/left] [color=#000000][code]myFullHair.erase(std::unique(myFullHair.begin(), myFullHair.end(), compareMat),myFullHair.end());[/code][/color]
  12. It's relatively simple to match a string against a predefined set of synonyms. If you are aiming to do this procedurally (i.e. by guessing which strings are synonymous) then you're on a fools' errand.
  13. [quote]High quality, clean, well tested and documented code can gain value very quickly. ... So in conclusion, yes I think that easy decompilation is a major concern with managed languages. There is no perfect solution to this problem as of yet (at least not as good as native compilation, which makes code reuse almost impossible). The minimum for any serious project should be obfuscation. [/quote] I agree that high quality code accompanied by good tests and documentation can be valuable - but as decompilation provides neither tests nor documentation, I don't view it as a problem.
  14. [color=#1C2837][size=2][/quote][/size][/color][color=#1C2837][size=2]Halving your productivity but preventing someone from taking your distribution verbatim, reverse engineering it (automated) and releasing their own modified version in 2 hours is a good trade-off.[/quote][/size][/color] [color=#1C2837][size=2] [/size][/color] [color=#1C2837][size=2]That depends. If you're halving your productivity to prevent someone from ever reverse engineering your code then it may be a good trade off. [/size][/color][color=#1C2837][size=2]If you're halving your productivity to increase the time taken to reverse engineer your code from 2 hours to 8 hours, then it's likely not.[/size][/color] [color=#1C2837][size=2] [/size][/color] [size="2"][color="#1c2837"]Like DRM, obfuscation merely increases the effort an attacker has to put in - and like DRM it's mathematically flawed and requires orders of magnitude more effort to implement than to break.[/color][/size]
  15. The best algorithmic complexity you can achieve is O(n) space, O(n) time (a counting sort). If you want O(1) space you'll have to settle for O(nlogn) time (an inplace O(nlogn) comparison sort). The fastest way depends on the size of your data set and the implementations of the contained types copy constructors, move constructors and swap functions.