Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

739 Good

About Inferiarum

  • Rank

Personal Information

  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Inferiarum

    Kalman filter without using matrix inverse

    I you are using lapack to do the linear algebra stuff, the functions dpotrf and dpotrs will do what you need here.
  2. Inferiarum

    Kalman filter without using matrix inverse

      You have K = P H^t S^{-1} = P X^t, where X is the solution to the linear system of equations S X = H now this could be solved by calculating X = S^-1 H which is, however, not the most efficient solution. Since in your case S is positive definite, you can use the Cholesky decomposition to solve it. More information on wikipedia.
  3. Inferiarum

    Projection matrix confusion

    You cannot use a matrix to project onto a box like that. A projection matrix projects onto a linear subspace e.g. a plane. edit: You should probably ignore this answer ...
  4. Inferiarum

    A Daft Statement

    I did not get the point of this thread and the supposedly daft statement. What are you trying to tell us? Maybe you should give an example or something.
  5. Inferiarum

    Player Movement

    How do you resolve the collision? Lets say the player is penetrating a plane. If you push the player out in direction of the plane normal it should slide down slopes on its own, which is probably not what you want. If you push the player out vertically, it will stay in position and gravity should also not affect the movement speed.
  6. I think this is quite a tricky problem. I see two solutions: 1. Design your levels in a way that this never happens. This is the case for most platformers. For example, if you have tile based levels, you would choose the player and tile size appropriately.   2. Take a continuos collision detection/resolution approach which prevents those objects from penetrating in the first place. E.g., speculative contacts.
  7. I also like the initiative and I think the publishing process is quick enough. However, I was wondering what will happen to articles, like mine, which are somewhat niche and do not get that much attention. I guess in the end a decision has to be made, wether the  article will be accepted or not.   You could invite people, that have published in similar areas, to review articles, like editors of scientific journals do. So basically, if someone accepts a review, he has to fill out a web form within a given deadline. The form could be as simple as a reject/accept button and fields for comments to the author/editor.   On the other hand, this is not a scientific journal and maybe such a review process is not suitable here.
  8. Inferiarum

    storing the game state

        After some thought I decided to store all game state components in flat arrays with equal size. That is, I basically allocate all components (or at least pointers to the components) for all entities. I guess I could add an array of bitmasks to generate lists for the update functions like you suggested.   For now, in each function that updates the game state, I iterate through all indices and skip those that are not used at the moment (indicated by another boolean game state component) and those for which not all necessary components are present (indicated by NULL pointers or equivalent zero values).   This lets me write my gameplay code pretty straightforward without any indirections.
  9. Hello everyone,   So I was thinking about how to store the game state for all entities. Let's say we have two properties, position and velocity. If each entity has the same properties we can just store those in flat arrays (I hope my pseudo-code is understandable)   Array<Vec3> pos Array<Vec3> vel   and then if we integrate the positions we can simply do   for ix = 1 to lenth(pos) do    pos[ix] = pos[ix] + vel[ix] end   which is also very fast. Now what if not every entity has the velocity property? We only have to update entities that have a velocity, but we also need to know the position of the entity. One straightforward solution would be to assign unique identifiers to the entities and store every property in a map or dictionary,   Map<EntId, Vec3> pos Map<EntId, Vec3> vel   which could be iterated over similarly,   for each (id, v) in vel do    pos[id] = pos[id] + v end   however this is kind of slow (about 100 times slower in my benchmark with 1000 entities). And I think I remember reading something here on the forum where someone gave the advice not to store everything in maps like this.   So I know about these entity component systems, and what I am doing here is actually very similar, but I do not really want to use some kind of framework. I am totally happy with storing the whole game state in global variables. I already have some ideas on how to approach this, but none of them seem really elegant. I would be happy to hear some opinions.    
  10. Inferiarum

    Need help solving GJK woes

    In your implementation it should actually not make a difference where you place the minus sign. You do an extra check after calculating the normals and after the check the vector should always point in the same direction, no matter where you put the minus sign initially. Maybe there is something wrong with the negate method?   I think if you base your implementation on the video it should be faster in general. But if your current implementation is working I it would only be worth the effort if you identify the gjk algorithm as a bottleneck in your game.
  11. Inferiarum

    Need help solving GJK woes

    Ok, I checked out the 2D gjk explanation. And while I think it is not optimal it should still yield the correct result. The direction of the y axis should not matter in your implementation, since you check the direction of the normal vectors anyway. You do not mention how you actually calculate the normal vectors. If you have x=[x1, x2] the normal could be calculated as nx=[x2, -x1].
  12. Inferiarum

    Need help solving GJK woes

    Did you check out this video:   http://mollyrocket.com/849   I did an gjk implementation based on the explanation there. In 2D it should be pretty straightforward.
  13. you should get rid of the moveX and moveY variables. If you detect a collision you should move the object along the axis such that it just touches the tile. You should not reset to previous position.
  14. Inferiarum

    Need help solving GJK woes

    There is an error in your 2 point simplex case. You have to check AB, not perpAB. perpAB is just needed for the new search direction if dot(AB,origin)
  15. Go would be an example.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!