colossal

Members
  • Content count

    75
  • Joined

  • Last visited

Community Reputation

633 Good

About colossal

  • Rank
    Member
  1. Best C# engine for beginners

    Why is Unity not your style?
  2. Chamois - Fluent Assertion Syntax for C++

      Completely agree with you. The proposed syntax in this article is FAR too verbose. If an individual really has problem reading just simple assertions, then they need more experience in the language. If the assertions are too complex to be readable, then the assertions need to be broken up into simpler statements that are asserted individually.   Code readability comes from isolating statements of computation and keeping them simple. That might be more lines of code, but it is far easier to read than just appending more and more function calls to make the code look like a sentence
  3. The reason is because I am looking to write a simple renderer that supports much older hardware before OGL 3 and 4, or preferably find one that already exists.
  4. Any suggestions? I am a bit unfamiliar in research for this area.
  5.     Hodgman,    Thank you for the comments -- regarding the linear allocator, I do in fact believe that this is an oversight on my part. The purpose of the allocator is to have a lot of objects at once all with the same lifetime. I am going to change destroy_all() to fit this, and loop through the allocated objects invoking their destructors.   The pool allocator should ABSOLUTELY be asserting that particular oversight as well.   And I agree that my assertion code needs more work. I already have enough preprocessor work as it is and should aim to make the code more readable. I certainly would like to isolate preprocessor directives as much as I can, as you have suggested.
  6. That is the whole point of those RAII wrapper classes. Never take a lock without them. So far as allocators and threading in general: High-performance algorithms and locking/synchronization don't play well together. Every time you take a lock you're hitting some overhead (how much depends on the type of lock) and every time a thread is stuck waiting on a lock you're throwing away CPU cycles. When working with multiple threads you really really want to isolate the threads as much as possible; not doing this is one of the reasons people think threading is so hard (it's really not). Use algorithms that allow the threads to work as independently of each other as possible. Typical modern general-purpose memory allocators make use of per-thread caches. This allows most allocations/deallocations on a thread to operate without every needing to touch a lock or any shared data structure. A more thorough overview of one such allocator is http://jamesgolick.com/2013/5/19/how-tcmalloc-works.html. See also the excellent jemalloc More constrained platforms might not be able to pay the overhead in memory "waste" of thread caches. Heavy threading or memory allocation aren't super ocmmon on such platforms (in games, anyway), though. Specific allocators for various needs are often single-threaded in games since each instance of an allocator is typically only used by a single system running on a specific thread. Thread safety in these kinds of allocators is mostly just about ensuring only a single thread uses them, not allowing multiple threads to use them.     Sean,   Thank you for the great advice. I have actually been asking myself the question, "Do I want to support threaded allocations/deallocations at all?" The entire purpose of this library is to provide functionality for specific types of allocation patterns, and I think that limiting their use to "same thread context" allocations might be only beneficial to my design choices. I found in performance tests that the introduction of mutex locks to my allocation algorithms basically proved that I should just use malloc and new anyway.   Thank you for the links, definitely going to look into them.
  7. Just for purposes of education, one of the issues I have found is that my use of lock and unlock inside my concrete allocate() and deallocate() functions, currently can result result in a deadlock due to the fact that I have a return branch right after unlocking a mutex. To solve this I have to follow the principle of RAII and use std::lock_guard from the concurrency library of C++11. I'll probably end up still functionally using my hybrid_lock as a mutex concept for the lock_guard so that I can use spin locking via atomics.
  8. Last year there was a great article on custom general memory allocators: http://www.gamedev.net/page/resources/_/technical/general-programming/c-custom-memory-allocation-r3010   I decided to take a hand at modernizing and fully implementing the article for my own use: https://github.com/cgikoray/Nemesis-Memory I am looking to see if anyone has comments or criticisms of my work thus far, as I would love to improve it as much as I can. Thank you anyone in advance, I am open to all opinions. Be as harsh as you wish!
  9. C++: Custom memory allocation

    I've been authoring a more modern version of this article for personal use, I have it under MIT if anybody would like to use it! :)   https://github.com/cgikoray/Nemesis-Memory
  10. You Don't Need to Hide Your Source Code

    The only thing delusional I have seen suggested regarding sharing source code is this entire article. There are plenty of avenues where sharing of source is appropriate, but this is simply not the case in terms of entirety for modern games. Games with ANY online component would completely fail under this nonsense for two obvious reasons. 1) Cheating 2) Private Servers.    Perfect example, NCSoft's Lineage 2. Take a look at this website: http://www.gamesites200.com/lineage2/ This site is a collection of all of the most popular private servers that are operated in the world for Lineage 2. NCSoft is not affiliated, nor receives any sort of compensation from these servers. In effect, all of these instances of Lineage 2 are pocketing money from NCSoft's work, resulting in MILLIONS of potential revenue lost. All of this was the result of NCSoft accidentally losing the source to the game server code some time ago into the public. Feel free to look into this http://news.mmosite.com/content/2006-11-20/20061120190829155.shtml.    This article is completely out of touch with reality.
  11. UDK for Mac

    UDK does not run on Mac, it can however export games that work on Mac OSX.
  12. Also relevant, and incredibly well reviewed:   Unix Network Programming, Volume 1: The Sockets Networking API http://www.amazon.com/Unix-Network-Programming-Sockets-Networking/dp/0131411551/ref=sr_1_1?s=books&ie=UTF8&qid=1377748940&sr=1-1&keywords=unix+network+programming