ApochPiQ

Moderator
  • Content count

    11212
  • Joined

  • Last visited

Community Reputation

23123 Excellent

2 Followers

About ApochPiQ

  • Rank
    Moderator - General Programming

Personal Information

Social

  • Twitter
    ApochPiQ
  • Github
    apoch
  1. Star Wars: The Last Jedi

    Carrie Fisher died in 2016, dude.
  2. Running x86 build crashes

    If you're going to selectively ignore advice then I personally have no interest in continuing to help you. You clearly need to learn a LOT about what makes a Release build different from a Debug build. You need to read about COMDAT folding. You need to read about how to debug at the disassembly level. You need to pay more attention to the real symptoms of nullptr bugs. You REALLY need to learn how to think of your programs in terms of instructions and memory locations. I can tell this is all magic to you right now and until you choose to work at understanding it as a science it will always give you grief. But most importantly you do NOT get to pick and choose. All of these things are important knowledge and interrelated. I am now going to leave this thread so I don't get more frustrated. Good luck!
  3. A sphere can be represented precisely using a simple equation. Storing a bounding volume as a polygon mesh is kind of defeating the purpose of a bounding volume, which is to be easier to operate on than the geometry inside it. You can do some simple fast math to get sphere-sphere intersections, and thereby compute the exact set of space that overlaps between two hierarchies. https://en.m.wikipedia.org/wiki/Sphere#Equations_in_three-dimensional_space https://en.m.wikipedia.org/wiki/Bounding_volume_hierarchy http://mathworld.wolfram.com/Sphere-SphereIntersection.html If you specifically want to do collision e.g. for physics, the area to research is broadphase algorithms such as: https://en.m.wikipedia.org/wiki/Sweep_and_prune
  4. Star Wars: The Last Jedi

    Oh jeez. Oh holy fucking shit. Guys... Is someone gonna... I mean, we really oughta... Fuck.
  5. Running x86 build crashes

    I am on a phone on a plane so please forgive my brevity! Do some research about COMDAT folding. Debug builds hold your hand a LOT and debugging a release build requires giving up on the cushy life of debug land ;-) Look at your move semantic implementations if you have any constructors, copy/assign/move operators, etc. anywhere near the faulty object types. I see a lot of folks crashing C++11 and later because they didn't do their homework on move semantics. The VC++2015 implementation in particular is extremely unforgiving if you don't follow the spec very exactly. Even if you don't think you are making move mistakes, you may be wrong. Also listen to Adam_42, he is probably right about you passing a bogus pointer around. Small address values in a read access violation are basically always down to nullptr at some level, at least on Windows. Don't fall into the trap of thinking nullptr means 0. Also when you get a callstack in the debugger that you don't understand (or really anything any time that you don't understand) please DO NOT ASSUME it is wrong, useless, or not worth including in your post. Challenge your assumptions and learn, don't turn into that person who assumes computers are magic.
  6. It's old but still invaluable advice, so for future questions, please read: https://www.gamedev.net/blogs/entry/2254834-oh-noes-my-code-is-teh-crash/
  7. First Google result for "WPF tabs." Perhaps you should be more specific here. What exactly are you stuck on? What isn't clear? What is your question about how to implement tabs? As for graphs, I think the same rule applies. This post almost reads like "please give me a working implementation that requires no code of me." It may, for better or worse, turn out to take some work to do what you want. But without specific questions, that's all speculation.
  8. C++ Convert functions to linux (gcc)

    QueryPerformanceCounter is a Windows specific function for a high resolution timer. Equivalent functions on Linux should be google-able with that term :-)
  9. about mmo persistent player data

    The problem is that you are not measuring and using empirical evidence to pinpoint the root cause of your situation ;-) Most MMO architectures separate database operations from game operations because it makes it easier to think of the database as an expensive resource. You "can" block on transactions but you should design your architecture such that your default assumption is that hitting the DB is slow and error-prone. This makes it easier to react appropriately when errors or timeouts occur. Part of designing a robust system is knowing its failure modes. This means understanding why a lot of DB queries lead to issues in your game, for example. Then you can determine the correct response. Sometimes you need to optimize DB procedures, or add indexes, or build caching on top of the DB layer, or just lower your expectations :-)
  10. Token representation

    Strings. In a more serious vein, there is no "best." What makes sense at one scale is totally messy at another scale. What works well for one type of serialization/parser setup is going to be a disaster for others. Personally I prefer to just stash a bunch of static const char * variables in a header or something and let the linker deduplicate them.
  11. It is technically possible to store certain forms of trees inside a flat one-dimensional array, but I'm not sure if that's what you're looking for. The closest thing I can think of that would use a multi-dimensional array would be to store a 2D array of Boolean values. Each "cell" in the 2D array is a location in the world. If a cell has a True value, then the character at that location has been visited. Otherwise, there is either nobody there, or the person there has not been talked to. Does that sound like the direction you're wanting to go?
  12. You can still do this with a tree. Each "level" or "ply" of the tree represents one person in the conversation taking a turn speaking. A simple conversation would have each ply alternate between Person A and then Person B speaking, for example.
  13. I see. That would have been good information for the original post, but oh well - next time :-) Reading your code from GitHub I think you are probably running into a signed/unsigned issue. If _mouseX is an int, casting it to __int64 will sign-extend it. And then shifting by 32 bits may yield undefined behavior, if the value is negative. Try something like this: uint64_t PackXY (int x, int y) { uint64_t wideX = static_cast<uint64_t>(*reinterpret_cast<uint32_t *>(&x)); uint64_t wideY = static_cast<uint64_t>(*reinterpret_cast<uint32_t *>(&y)); return ((wideX & 0xffffffff) << 32) | (wideY & 0xffffffff); } // Unpack uint32_t x = packed >> 32; uint32_t y = packed & 0xffffffff; float fx = static_cast<float>(*reinterpret_cast<int *>(&x)); float fy = static_cast<float>(*reinterpret_cast<int *>(&y));
  14. Please don't tell people what we "should" be doing. I'm voluntarily offering you help with YOUR bug, for free, on my own time. Feel free to reject that offer if you like, but I suspect you posted here to *get* help, not reject it ;-) My hunch is that your conversion from mouse coordinates to camera transform is actually broken. Since your description of that implementation is vague, I can't confirm or disprove that hunch yet. In any event the burden of proof is on you and nobody else. If you can convince us that your camera transform construction is correct, I'm sure we can narrow down the actual cause of the behavior you're observing.
  15. Post the code for SetOrientation (or a link to the API docs if it isn't your code).