• Content count

  • Joined

  • Last visited

Community Reputation

1126 Excellent

About Hannesnisula

  • Rank
  1.   Thanks for the great answer!     It's more curiosity than concern, really. I don't think any way would actually impact performance noticeably in my case.
  2. Hi!   I'm looking into file I/O for text files and I've been wondering about functions which read lines from files. Does anyone know if they normally read in every iteration (for each character) or read into a buffer to maybe speed things up?   I'm developing for Windows and I know the OS buffer readings from files (although one can specify not to, with a flag). Because of this I imagine that reading a single character from a file (the cache, really) in every iteration wouldn't be all too bad compared to buffering the file data yourself, right? Has anyone delved into this or perhaps even benchmarked it?
  3. Managing Decoupling

    Great article, but I have a question to the author:   How do you handle saving/loading IDs to/from file? Do you only handle the 20 "unique bits" and change the IDs of every object that has a reference to it, when loading (setting the 12 index bits)?
  4. How to implement better Collision detection

      I've had the post up on a tab for some hours and didn't refresh it so only saw 1 reply, my bad.
  5. Collision Sliding Problem

    There are several different ways of doing all of this. From what I've read it seems to be common to move the objects, detect a collision then solve the intersection by moving it along a vector make the objects not intersect anymore and then apply some force/impulse to make it bounce (if that's what you want, otherwise just move them apart).     The first circle to the left might be where the intersection is detected and the red vector is the direction it has been moving. Then moving it along the normal of the surface (green vector) it would appear sliding along this plane. This might be sufficient for your application.   EDIT: Just realized the image is a bit misleading. The image implies the sphere that is intersecting the plane still is moving along the red vector but my point is that it has moved along its entire vector and should only be moved "up" along the plane's normal. But the red vector is the direction it has already moved (to get to its current position). Sorry, this is perhaps quite confusing. If you have any questions about this, please ask.
  6. How to implement better Collision detection

    You could have an ellipse shaped bound on the ellipse shaped smiley monster. It's a bit complicated but this article explains a very simple way of converting this into a sphere box text which are quite simple and cheap. This way you could have a perfect bound for the ellipse smiley monster.   I'm not sure if this is true or not but it doesn't help with any ellipse - ellipse testing nor sphere - ellipse testing (except they're both have the same axes and orientation, I guess).
  7. This was the second google result when searching for "deferred shading multiple materials" and could perhaps be of help. It has a link to another page from NVIDIA with more information. I just skimmed it through so I'm not sure it's exactly what you're looking for.
  8. In Unreal Engine 3 they support multiple weight sets for meshes so they can have limbs detached but not having weird artifacts where the removed bones are influencing the body (described a little bit here).   My question is, do any of you have an idea how this might be done? I've been thinking they store each part/limb in its own vertex buffer and swap the buffer used depending on the weight set wanted. They also say that when exporting meshes from 3d modelling software "There is no performance penalty for creating your skeletal meshes this way. The individual parts are all combined when being imported into Unreal Editor." Does this mean they are all stored in the same buffer? Otherwise it would be a penalty right?   When having an object (in this case a humanoid) that's rigged with a skeleton and have multiple meshes (parts of the body), how are they connected? Let's say I have a class for objects like this and I want to be able to cut off limbs and having these limbs be completely separate objects, should the bones from the skeleton have a mesh associated with them? Because some parts may contain several bones (like the hand) and I want to keep the hand like 1 logical object and not destructible, how can this be structured in the code?   Let's say I want the forearm and hand to be one atomic part of the body and it contains multiple bones from the skeleton and perhaps several different meshes (maybe not this exact case, but there are other cases). If this is an object of its own, it's not clear to me what would be this objects transform, as there are several bones inside of it with their own transforms. Does anyone have experience with similar stuff?   I'm not sure I was sufficiently clear about these questions, and there are a lot of them, and if so I apologize and just ask and I'll try to clarify.
  9. Personally I do it to learn and get better at it. I also think it's really fun to commit to do something and then do what it takes to accomplish it.
  10. At the line you said the error is you are trying to assign an Entity the address of a method that returns a pointer to an Entity. I guess you would want to assign an Entity pointer (Entity *) the Entity pointer that is returned by the InstantiateEntity() method.