• Advertisement

Wyrframe

Member
  • Content count

    1328
  • Joined

  • Last visited

Community Reputation

2434 Excellent

About Wyrframe

  • Rank
    Contributor

Personal Information

  • Interests
    DevOps
    Programming
  1. @OP: Your bitmap approach (literally, bit-as-in-boolean map, not as in graphical texture) is a perfectly fine approach. Your mouse-cursor will be within the bounding rectangle of only a handful of regions at a time in a vast majority of situations, and you can easily quickly test if the cursor is over an activated bit for one of those very easily. One gotcha is aliasing; if your player can zoom their view in any way, one mouse-cursor position might round to hitting several regions at a time, so be sure there is a predictable order of resolution (e.g. sort states by ID, always pick the north-east most, etc), to prevent possible odd behaviour when the player points at or near a border while zoomed out.
  2. In addition to the above others' comments... The "F" score (used to sort nodes on the open list, and nothing else) is the sum of "G" (the actual cost required to reach a node; zero at the start nodes, and adding the cost-of-traverse between a node and its neighbours should be part of neighbour generation) and "H" (the heuristic for how much it will cost to reach a goal node from that node). Is "cameFrom" an IdentityHashMap or HashMap from Node to Node? Why aren't you just using a "cameFrom" pointer in each node which points back at its parent (along exploration path) node? You're allocating a new Node[] every time you enumerate neighbours, which is garbage that will add up fast; you should pass the generator a Vector to clear and re-populate instead to reduce disposable allocations. You also need to delete a node from the closed list if you have found a lower-cost route to a node that's already been closed; currently you skip nodes which compare as equivalent to nodes that have previously been closed, without checking if they are a lower-cost route to the same state first.
  3. Sounds like you want the compiler to parse components of a string, and generate code at compile-time based on that compile-time string, instead of generating code to emit data structures at runtime based on a runtime string. That's the very purpose of constexpr, and AFAIK there is no standard C++ way to do that before C++17... and it might even be pretty tricky in C++20. That said, here's someone working on the same thing: https://github.com/hanickadot/compile-time-regular-expressions
  4. C++ Wrong parameters in void call

    Well, I notice you're trying to pass... float projection_line_thickeness; ... into the last parameter, which seems to expect... vec3 * awireframe_color This is partially obscured by the very strange design pattern you seem to be using, of passing a large number of references (normally something only done for in/out parameters, not in-only parameters) into three foreign objects, each of which is expected to initialize... something? Themselves? The objects passed in?
  5. As a short-term fix for the problem which's long-term fix is to design better. But long-term solutions are for refactoring or re-implementing, not for prototyping, which is why 3-tier solutions like the above are useful.
  6. Again: what are you trying to accomplish? Sure, that code probably compiles, but what problem is it solving?
  7. Try having your "result" debug tool (the one showing the path line) also show each grid node that became opened during the search, and colour each node by a function of its (best found) G cost, so you can visually track the open set and the best path found to each cell in the open set. Like others are saying, after reviewing your code, I think you're massively over-opening the search space.
  8. I think you need to answer for us and for yourself; what does an XOR of the bits implementing an object in memory have to do with delta-compressing the concepts and values which the object contains? You don't measure the difference between two 2D vectors implemented by `struct Vector{double x,y;}` by taking the XOR of the bits which implement the two IEEE 754 Double-Precision floating-point values... you calculate a new vector which's components are the difference between the components of the two vectors.
  9. SDL2 weighs only half a meg and has a pretty simple audio layer. DirectX is also the right tool for the job if Windows is the only platform you're interested in... though I haven't worked with its audio side since DX9, don't know what the DX12 interface looks like.
  10. Looking for a game like Smugglers 5

    I kinda enjoyed http://store.steampowered.com/app/11240/Space_Trader_Merchant_Marine/ , if you're looking for something shallow but not simple. It intersperses space trade-running with first-person action sequences which are not challenging but weren't entirely boring, either.
  11. New Software and Server for GameDev.net

    Why on earth would you expect someone to look at the global navigation bar to find a search form for the forum or forum-topic they're already looking at... and then be somehow pleased that they have to pick the forum they wanted to search in again? Even then. Let's give it a little test? Here's a topic started one month ago. It contains the precise phrase "measure memory used by process". Let's go to the search page, paste that into the search field, note that the default options include "title and body", "all content", and "all search terms", and hit enter. And the results are... three articles which each contain only one or two of those words. Seriously. "Rough edges" doesn't begin to describe a search function that can't even find its own ass with both hands, never mind how cumbersome and hidden you've made accessing that search function in the first place. See attached. Two weeks ago this list wouldn't grow beyond eight. This is why people adblock; not because they want you to fail as a service, but because they don't agree you have the right to farm your visitors out to literally dozens of third-party services, who aren't even paying you properly for the whoring you've chosen to descend to.
  12. New Software and Server for GameDev.net

    Rough edges... such as the broken link to http://blogs/entry/2263079-new-software-and-server-for-gamedevnet/ that seems to be the only way to reach this article? We don't get a General Programming forum anymore, without the permanently-ambiguous "Gameplay" programming also being brought into it? You're now linking against not one, not two, but TEN separate advertising services in every single pageload, all fighting for access to the page? No Search/Find function anywhere to be found? Good luck hand-trawling the 144k topics in General Programming alone looking for if your question has been asked recently, and what other people have discussed more than one goldfish's memory ago.
  13. It's a plausible solution (for which the alternative is to list objects intersecting with a leaf, which means when an object moves you may have to remove it from multiple sectors, and you have to use some kind of logic to prevent iterating over such objects more than once). Just bear in mind the worst-case scenarios; like a straight line of objects overlapping one of the world axes will turn into a singular list which cannot be subdivided into smaller work units.
  14. GAMBAS Almost Means BASic. A personal favourite of mine, for when I need to take a break from Java or from AngularJS.
  15. Well, one thing you can improve within your stated architecture is that if A.getCollission(B) updates both A's and B's collision-state buffers, you only need to touch each pair once. for( i=1; i < area.members; ++i ) for( j=i-1; j >= 0; --j ) area.members[i].testCollision( area.members[j] ); Presumably each sprite's 'script' logic then resolves any collisions discovered during that phase.
  • Advertisement