• Content count

  • Joined

  • Last visited

Community Reputation

3896 Excellent

About TheComet

  • Rank
    Advanced Member

Personal Information

  • Interests


  • Github
  • Twitch
  1. How do you balance gaming and game dev?

    Everything has pretty much been said, but I'd like to share an idle observation. I'm fairly active in the GDNet online chat, enough to know pretty much everyone who talks there, and I've noticed that all of the people there who are good at making games are making games. Like, all the time. I've never seen them do anything else (be it gaming or other forms of goofing off). Those that are struggling with improving their coding skills and have been stuck in the same spot for years and seem to be asking the same questions over and over in the chat are those that also play a lot of games in their free time (or are only there for the lolz). It's really not enough to invest only 1-2 hours a day into coding and expect to improve beyond a basic Level. For me: I will immensely enjoy playing the occasional rare game. Half Life 2, Portal, StarCraft 1+2, WarCraft 3, Banjo Kazooie, to Name a few. But I'm not the person who can play games for longer periods of time. Even with the examples I mentioned, I had to turn them off after about an hour and go back to coding. My default mode on the computer is to write code. Everything else I do I consider to be "goofing off".
  2. In this article, I'd like to share a method I used to help visually debug tree-like data structures by leveraging the DOT format and Graphviz. This may be useful to you if you ever end up having to work with low-level data structures and no way to visually see what your code is doing. The Problem During the early stages of development of my inverse kinematics library (which, at the time of writing, is in its alpha stages and not quite ready for general use yet), I was working on an algorithm which takes a scene graph as its input and generates an optimised structure consisting of a tree of "chains", specifically designed for use with an IK solver. The transformation is not that easy to explain in words, but here is an illustration of before (a) and after (b) (please excuse my MSPaint skills; I'm a programmer, not an artist): You can see here that each end effector in the scene graph specifies a "chain length" parameter, which tells the solver how many parent nodes are affected. Since the IK solver works most efficiently on single chains of nodes, it makes sense to break down the scene graph into multiple chains which the solver can then process sequentially. This is illustrated in (b). Notice how chain 1 (red) becomes isolated from the rest of the tree after processing, because its end effector only specified a length of 1. Also notice how in the new structure each chain consists of only a sequence of nodes with no branches. The algorithm had to be able to handle a few weird edge cases, such as: What happens when you place an effector on a node that has multiple children? What happens when there are multiple end effectors in a chain? What happens when an end effector specifies a chain length that doesn't quite join up with the rest of the tree? This of course meant it was harder to test and make sure it was working correctly. I did of course write a suite of unit tests using Google's testing framework, but I wanted more: I wanted to have the ability to visually look at what my algorithm was generating, and I wanted to do this without having to use some fancy 3D engine. Inroducing: DOT and Graphviz DOT is a simple graph description language. Graphviz is a set of open source tools for generating graphics from DOT descriptions. For example, the following DOT code: graph testgraph { a -- b; b -- c; b -- d; } Compiled with dot as follows: dot -Tpdf -o testgraph.pdf Produces the following graphic: DOT is quite a powerful language. It's possible to specify colours, shapes, multiple connections between nodes, and much more! Read up on the format specification for more information. In only a few lines of code I was able to iterate the optimised chain tree and serialise it to DOT. This is what the example tree I drew in MSPaint looks like after it is broken down by my algorithm and exported to DOT: Things to note: The black edges show the connections between the original tree. The red edges show how the chains are connected (just like in the first figure (b)) Effector nodes are coloured blue Nodes that mark the start or end of a chain are square. You can see for example that node 6 is square because it has two child chains, but node 2 is not square because it's in the middle of the second chain. And just like that I had a powerful way to quickly spot errors in my algorithm. Using python and watchdog I wrote a simple script that would monitor the DOT file for changes and automatically compile it to PDF. Thus, every time I ran my program the graphic would update immediately on my second monitor so I could inspect it. Another Example In another application I wrote, I implemented an intrusive profiler which would dynamically build a tree from the callgraph and store timing information in each node. I thought it would be cool to also dump this tree to DOT format and see what it looked like. Note that in this case I didn't use the "dot" command line tool, instead I used "neato" (this is also part of the Graphviz package). Neato has a different layout algorithm based on physical constraints, which in this case produces much nicer graphs than "dot": I find it quite beautiful to look at. What you see here is a visual representation of how much time was spent where in the program. Nodes that are red are "hot" (meaning lots of time was spent in them) and nodes that are blue are "cold" (nearly no time was spent in them). If you zoom in a little bit you can also see that I exported some of the profiler parameters of each function. While this does provide a very nice birds eye view of where your program needs optimising, I would of course recommend using proper profiling tools to further analyse the slow functions. In conclusion Due to the simplicity of the DOT language, it's trivial to write an exporter for it, so if you ever find yourself fiddling with low level data structures, consider dumping them to DOT and visualising them. I found this to be extremely helpful during development of my IK library.
  3. Nobody Wants A Cybergod?

    Why do you do this? You seem to think "the industry" is somehow "us" (wat?) and that "you" are special because you aren't part of "us".... Or some shit. The industry isn't this elite private club that snoots at the uninitiated. Kid, the reason you aren't getting hired by "the industry" is because you have no useful skills. You have no programming experience no game design experience trouble communicating ideas in the English language (do you even read what you type? Every paragraph can be summarised into a single sentence with no loss of information). a stuck up attitude about how you are better than everyone else If you had any value at all, you would easily find a job in "the industry".
  4. Nobody Wants A Cybergod?

    So you are worried someone will steal your idea.
  5. Weird fears?

    I've never heard about people being scared of computer glitches, so this was interesting to read. If computer glitches really frighten you then you probably shouldn't watch this video My greatest fear is a bit strange to think about, because it's not at all specific. I spend a lot of time pondering existential questions and if you think about what consciousness does, you might reach the conclusion that it is one of the greatest forces of nature determined to explore and act out every possible combination and experience imaginable and unimaginable. As an average human you might try to describe its actions with words such as "blissful" or "horrific", "intricate" or "boring", "ruthless" or "merciful" and so forth. In the grand scheme of things, however, these interpretations of consciousness bear no meaning, as they are entirely subjective to the entity observing them. My fear stems from the idea that there is an uncontrollable force within me (and within others) that is destined to explore a specific (perhaps even predetermined) set of experiences that may very well put me in a situation that could lead to extreme pain and suffering. It is not necessarily a fear of my own potential alone, either, rather the interplay of my conscious being with other conscious beings -- and the idea that a chunk of it is already set in stone -- that could result in tragedy. One concrete example of this might be me ending up at the hands of a masochistic murdering maniac. If you were in such a situation, nothing you say or do would matter, your faith is certain death and the only thing you can do is whitness all of the horrific and glorious ways in which you will succumb, and perhaps ponder over all of the events that lead you into this unavoidable situation to begin with (the "butterfly effect") and whether all of this was predetermined (i.e. "meant to be"). It's a strange idea to think that this person has no choice but to murder you, that he is doing this because it was simply meant to be, because his conscious being is determined to explore a certain experience. I'm equally scared of the idea that I might end up in a situation where I do something terrible to someone else. I find it quite hard to describe the fear because it's quite abstract. On a lighter note, you can of course argue the exact opposite. Great pain and suffering is contrasted with beauty and bliss. Perhaps you are determined to experience the good side of life. And that's really all there is to understand about your existence: You cannot know what is good without also knowing what is bad. Our experience must be a contrast of opposites for it to have any meaning.
  6. Nobody Wants A Cybergod?

    Yes, this hits the hammer on the head. Unfortunately, I've spent 20 minutes reading his "blog" and he had this to say about it: It's a catch 22. Kavik Kang wants to convince people his concept is the next great thing without having to provide proof. @Kavik Kang We would be fools if we were to simply take the word of some random internet stranger such as yourself that your concept is the next big thing. Either talk about it, or stop wasting everyone's time with your senseless rants.

  8. #if defined(__cplusplus) && __cplusplus >= 201103L #define FPL_NULL nullptr #endif
  9. I skimmed your code and there are two (maybe three) things that stuck out to me. #define FPL_NULL 0 This is not how you should be defining NULL. Either use (void*)0 or nullptr if C++11 is available. #if !FPL_ENABLE_C_RUNTIME_LIBRARY void __stdcall WinMainCRTStartup() { int result = wWinMain(GetModuleHandleW(0), 0, 0, 0); ExitProcess(result); } #endif // !FPL_ENABLE_C_RUNTIME_LIBRARY I read your comment further up the file about how you hate the CRT, but this is clearly taking it too far. I'll quote a section of ExitProcess()'s documentation: And that's pretty much the point at which I stopped reading your code. Parts of it looked good, other parts looked really, really bad. A more important question to me is: Who needs this? Why does this exist? All of this stuff is already available in other libraries or game frameworks. As a side note, why are people writing more and more of these "header only" libraries? The preprocessor seems like a flimsy way to configure how your code should compile. A more solid solution is to use a proper build system.
  10. Just published my first game. Any advice?

    You can definitely improve the background image and main menu. When I clicked your link I initially thought it was a popup ad and instinctively added it to my adblock blacklist before I realised it was the game. Other than that, I would be interested in playing this game with the player speed slowed way down, such that you actually can make decisions for both snakes within 2-3 frames of time. As it stands now, the strategy is to make the top one a bit longer, then put it on autopilot and focus all of your attention on the other one, etc. My idea would be Slow down snek speed so you can focus on both Remove wrap around feature so you have to focus on both (add borders)
  11. CMake is insane on Windows

    I believe the problem is you're specifying the command line parameters after you specified the CMakeLists.txt file instead of before. I know this is common on Windows (for whatever reason) but it's not going to fly here. This should work: Notice the two dots at the end instead of at the start: cmake -G "MinGW Makefiles" -DCMAKE_CXX_COMPILER="c:\\LLVM\\bin\\clang++.exe" ..
  12. If you're asking "how is it that two chips are able to drive the same wires while not causing a short circuit" then the answer is there are in fact three states in which a bit can be: High (1), Low (0), and High Impedance (Z) (i.e. "disconnected"). If the chip select input is inactive, all data lines are set to (Z).   According to the CPU manual, section 2.6. Cartridge Types, the cartridge is mapped to 0000 onwards, not 0100. The cartridge contains the interrupt vector table.
  13. DX12 Fractals trees [DirectX 12]

    Can you elaborate? I have no idea what you're trying to do.
  14. Free Steam Keys

    Wow thanks
  15. Adventures in Texting - Sign up thread

    It begins!   Note that one rule has been changed: You are now allowed to modify existing lines as well as insert new lines.