CulDeVu

Members
  • Content count

    121
  • Joined

  • Last visited

Community Reputation

3034 Excellent

About CulDeVu

  • Rank
    Crossbones+

Personal Information

Recent Profile Visitors

13865 profile views
  1. Metroid-vania style level design

    No, not at all. Take for example this portion of the AM2R map (spoilers I think): Notice that all the doors between "rooms" are located along the green grid lines behind the map, and so they only go left, right, up or down into the neighboring rooms in those directions. The only exception in AM2R that I can remember is the warp rooms. IIRC, you can even Space Jump up the elevator shaft to the wrecked spaceship if you want! The idea I was trying to suggest is that, if you know what grid cell the door is in and the direction it's facing, then you could search for the adjacent room that it's connected to if you have some list of rooms somewhere laid out like that. This would give you Metroid-style maps without having to record the door ID for every single door in the entire world. Edit: this also works perfectly well for ways to traverse rooms other than doors, like bombing the floor causing you to fall through into the room below.
  2. Metroid-vania style level design

    That seems like a nice first iteration. However, a lot more goes into a good Metroid style map, like walls that disappear when you walk through them, that might not fit into a nice clean C++ class like how you'd like. Also, while there are some occasional warp points in Metroid maps, most of the actual world is laid out on a grid, so specifying the room IDs on every door may be a bit tedious (and redundant: every door has a dual on the other side of the wall, so data is duplicated for every door). You might want to rethink that at a later date. Another thing you'll have to figure out is how to manage changing geometry (e.g. lava disappearing after Metroid are killed in AM2R) with your map or grid of tiles idea. Also, with collectable items you have to also be looking at your current inventory and save files so you can't collect multiple of the same item, which is another thing that might not fit into a nice little class. You're mind is in the right place and it's as good a starting point as any, but be prepared and willing to have to rework the design in the future if you need to. Metroid maps are dynamic with lots of changing parts. That's part of what makes their world immersive. However, things like that are usually kind of messy to make in practice, but that's okay.
  3. This smells suspiciously of homework, but I'll bite...   As far as I understand, the only difference between Gauss-Seidel and Projected Gauss-Seidel is that the projected version clamps its values against the constraints at every iteration. It's useful if you're trying to solve a linear system with constraints. I don't know of its origin, but it appears (from googling, I'm no expert) that it's been implemented in the Bullet physics engine for some time now as a solver. The original Gauss-Seidel was published in the late 1800s and was created by Gauss some time before, so I wouldn't doubt that he was at least aware of the Projected version.
  4. You can't get the exact value of the squared sum of all the lengths just from the squared lengths, but you CAN get some nice bounds, if that helps.   For any a1, a2, ..., an >= 0, the lower bound (a1 + a2 + ... + an)^2 >= a1^2 + a2^2 + ... + an^2 holds.   Furthermore, if you can guarantee that a1^2, a2^2, ..., an^2 are all greater than or equal to 1, then additionally the upper bound (a1 + a2 + ... + an)^2 <= a1^2 + a2^2 + ... + an^2 + 2*a1^2*a2^2 + 2*a1^2*a3^2 + ... + 2*a1^2*an^2 + 2*a2^2*a3^2 + ... also holds.   In case you have trouble following all those coefficients and exponents and stuff, the latter term (after the "+ an^2 + ") is for i in [1,n] for j in [i+1,n] sum += 2 * ai^2 * aj^2 The good part about that upper bound condition is that you can easily make sure it holds by scaling the grid accordingly. It's an O(n^2) operation, but so is calculating the upper bound.   Hope that helps a bit!
  5. Presentation and expectations

    Hey Kane, welcome to the site!   Yeah, we don't get many introduction posts, but we see them everyone once in a while. I like them, though. They really makes the forums seem more friendly :)
  6. No such matrix is possible, because that's not a linear transformation. The reason that projection matrices can get away with that sort of distortion is because of the division by w term, which makes the whole transformation nonlinear.   To see why, assume that M is a matrix that satisfies your desired transformation. It's easy to see that     This is contradicts the fact that your transformation is linear.
  7. Trump Style

    I can see really any tower defense or plants vs zombies style game
  8. Pressure simulation for a game.

    Wind can be modeled pretty nicely by just regular old forces in Box2D, but that doesn't seem like what you're wanting. That little web game is really just a fluid simulation, with bells and whistles added on top of it. In those simulations, air, water, fire, and pretty much everything else that isn't rigid is described with by the equations of fluid dynamics. Pressure is part of the Navier-Stokes equations, the one that defines how fluids move, and advection is a natural extension of those equations as well.   A good tutorial, if you're into building cool simulations yourself, would be: https://software.intel.com/en-us/articles/fluid-simulation-for-video-games-part-1   If you're more into just using a physics engine, though, LiquidFun is just Box2D but with support for fluids: http://google.github.io/liquidfun/   Those links should at least give you a place to start, and some keywords to start Googling around.
  9. Finding perimeter path of connected nodes?

    I don't have a full answer, but I have some ideas.   For one thing, you can't just use connectedness and distance information between nodes, because it's pretty easy to find two isomorphic graphs that don't have the same perimeter. Furthermore, I have no idea how to do this elegantly for anything other than planar graphs (or, graphs without "intersecting pathways" as you call it). But this should work for all planar graphs: denote the graph "G" create a list called "Loop" create a stack called "Working" find some initial cycle in the graph // there are many ways to do this add this cycle to Loop, ordering all its vertices CCW remove the paths between the vertices in the initial cycle from G while some node "V" in Loop that has more than 0 nodes connected to it: clear Working Working[0] = some node connected to V in G // remember, we're deleting paths between nodes, so this might always be different than last time while the top of Working isn't in Loop: push any node that's connected to the top of Working in G to Working // we've now found a loop that connects to our main Loop // now to figure out how to merge the two into the "outer" one perform an inside-outside test to Working[0], with respect to Loop if Working[0] is outside: make the winding of Working be CCW remove the nodes in Loop between V and top of Working, exclusive insert Working into Loop, after vertex V remove all paths in Working from G I haven't tested this, but the idea is that you can progressively build the outer loop from smaller loops connected to the main one. The only requirement is that you have to have an initial loop to start with, but there are many ways to do that. The CCW winding enforcement is required for the inside-outside test that happens (this is the part where the concept of "outer" comes into play). In pictures, it would look sorta like this:   --> --> Here, the green is "Loop", and the red is "Working" from the psuedocode above.   I hope this helps a little!
  10. Sunlight theory

    (A rendering thread that's gone unanswered for 2 hours?! This isn't the GameDev that I know and love)   The theory sunlight hitting a planet is the same theory for any light hitting any object. The thing I think you're looking for, though, is Lambert's Cosine Law, which is one of the fundamental concepts in any physically-inspired rendering. Specifically, for any point on your planet, the amount that that place is illuminated is: (brightness of the light) * (cosine of angle between the surface normal and the light source) / (distance from the surface and light source)^2.   Hope that helps!
  11. Learning Global Illumination

    I've been slowly getting my feet wet with global illumination and other, non-realtime rendering methods for a change
  12. GPU raytraced global illumination

    Wow, this is a blast from the past. I guess I should add some more updated images to this collection.   It's actually incredibly simple to create a BVH from scratch once you know what you're doing, which you wouldn't think would be the case just from thinking about the problem. That's actually what I like most about this topic: it's really easy to get into, but mastery is extremely hard in any single aspect of pathtracing.