Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

  • Days Won


TheComet last won the day on April 19

TheComet had the most liked content!

Community Reputation

3922 Excellent

About TheComet

  • Rank
    Advanced Member

Personal Information

  • Role
  • Interests


  • Github
  • Twitch

Recent Profile Visitors

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

  1. This isn't something I'm trying to implement (yet), it's just a curiosity I've had. If you watch the following video from 14:30-14:50 you will see that Banjo is "mounted" (is this the correct term?) on a deforming mesh. Here is another example in Spyro the Dragon, from 1:45-2:05: This seems simple but the more I think about it, the more I am stumped as to how one would achieve this. A moving platform is pretty simple to handle, because you can just calculate an offset to the platform object's center. But that doesn't work for a skinned mesh. Yes, you can to determine which triangle your character is colliding with, but then what? Keeping track of the triangle's position isn't enough, because the vertices may change relative to one another. So you'd have to keep track of a point P on a triangle as it changes shape. What happens when you walk from one triangle over to another triangle? How do you handle the frame in which this occurs? To sum it up, I'm interested in answers to the following questions: In general, what is this even called? "Mounting" a character to a mesh? I can't find anything under that term if I google it. How does the performance of this technique compare between today's games and games made 10 years ago? Does the increase in polygons make it not worth it because it's too computationally expensive now? Do you know of any papers that describe different ways to implement this technique?
  2. Okay I think I have a solution cozzie. This works on paper but I didn't actually "simulate" it to verify that it works. First, let's actually forget about the arrow for a second and also forget about "rotation" and "translation" and "scale". Try to focus on what this problem is really about: It's a change of basis. You have a set of points that exist in the standard basis for R^3 (aka "model space"): You are looking for a matrix M : R^3 -> R^3 which maps the standard basis to a new basis B: Given points p0 and p1 of the arrow in world space, you can calculate the new basis vectors: The new "Z" basis is the arrow's direction: p1-p0. The new "X" basis can be obtained via the cross product with the world's "UP" direction. The new "Y" basis can be calculated with the cross product of the two new basis vectors. Now, because there is also a translation involved, it is necessary to first translate to (0,0,0), apply matrix M, then translate back. Because the standard basis is already at (0,0,0) it makes things quite a bit easier. The matrix M is simply: In your code that would look something like this: bool CDebugDraw::AddArrow(const CR_VECTOR3 &pPos1, const CR_VECTOR3 &pPos2, const CR_VECTOR3 &pColor, const bool pDepthEnabled, const bool pPersistent, const uint64_t pLifeTime) { if(!AddLine(pPos1, pPos2, pColor, pDepthEnabled, pPersistent, pLifeTime)) return false; /* p1 ------- X / | \ | / | \ | / | \ | p2 -----|-----p3 | Z | | | | p0 */ // Form new basis vectors CR_VECTOR3 e3 = pPos2 - pPos1; CR_VECTOR3 e1 = CMathHelper::CrossVec3(e3, CR_VECTOR3(0, 1, 0)); CR_VECTOR3 e2 = CMathHelper::CrossVec3(e1, e3); // Fill in basis vectors into our "B" matrix (note it is transposed because your library uses row major) CR_MATRIX4X4 M; B.m11 = e1.x; B.m12 = e1.y; B.m13 = e1.z; B.m14 = 0; B.m21 = e2.x; B.m22 = e2.y; B.m23 = e2.z; B.m24 = 0; B.m31 = e3.x; B.m32 = e3.y; B.m33 = e3.z; B.m34 = 0; B.m41 = 0; B.m42 = 0; B.m43 = 0; B.m44 = 0; // Create translation matrix "T" (note it is transposed because your library uses row major) CR_MATRIX4X4 T; T.m11 = 1; M.m12 = 0; M.m13 = 0; M.m14 = 0; T.m11 = 0; M.m12 = 1; M.m13 = 0; M.m14 = 0; T.m11 = 0; M.m12 = 0; M.m13 = 1; M.m14 = 0; T.m11 = pPos1.x; M.m12 = pPos1.y; M.m13 = pPos1.z; M.m14 = pPos1.1; // Combine both matrices into the final transformation matrix "M" CR_MATRIX4x4 M = CMathHelper::MultiplyMatrix4x4(T, B); // Define the arrow vertices in model space CR_VECTOR3 p1 = CR_VECTOR3( 0, 0, -1); CR_VECTOR3 p2 = CR_VECTOR3(-0.1, 0, -0.9); CR_VECTOR3 p3 = CR_VECTOR3( 0.1, 0, -0.9); // Do transformation p1 = CMathHelper::TransformVec3Coord(p1, M); p2 = CMathHelper::TransformVec3Coord(p2, M); p3 = CMathHelper::TransformVec3Coord(p3, M); if(!AddLine(pPos1, pPos2, pColor, pDepthEnabled, pPersistent, pLifeTime)) return false; if(!AddLine(p1, p2, CR_VECTOR3(1.0f, 0.0f, 0.0f), pDepthEnabled, pPersistent, pLifeTime)) return false; if(!AddLine(p1, p3, CR_VECTOR3(1.0f, 0.0f, 0.0f), pDepthEnabled, pPersistent, pLifeTime)) return false; if(!AddCross(p2, 0.02f, CR_VECTOR3(0.0f, 0.0f, 1.0f), pDepthEnabled, pPersistent, pLifeTime)) return false; if(!AddCross(p3, 0.02f, CR_VECTOR3(0.0f, 0.0f, 1.0f), pDepthEnabled, pPersistent, pLifeTime)) return false; return true; }
  3. enum class Thing { FOO = 0x01, BAR = 0x02 }; Thing thing = Thing::FOO | Thing::BAR; // doesn't compile This is an age old problem. What is the proper way to achieve what I'm trying to do here? As far as I can tell, using enum class is more a hindrance than a useful tool with flags. I end up typing less with a normal enum: enum Thing { FOO = 0x01, BAR = 0x02 }; unsigned char thing = FOO | BAR;
  4. TheComet

    Who's your intellectual idol?

    For me at the moment it would have to be Joe Rogan. While he's not particularly intellectual in any specific field, the discussions he has lead in his podcasts are often highly intellectual. He is really good at asking the right questions and extracting all of the information out of someone on a particular subject.
  5. TheComet

    FPP Game

    Who upvoted
  6. TheComet

    Ways to avoid Subconscious Prejudice

    By talking to the person you've judged and seeing if what you believed to be true about them is true or not. When I do this, I feel like the majority of the times my initial judgement of the person was correct. I don't know if there is some confirmation bias here though (there probably is). There's a reason why stereotypes exist, it's because there is some truth to them. A very easy example I can think of is: Can you pick the weak, submissive person out of a crowd? These people typically correlate with long hair, eyes to the ground, head tucked into their shoulders, weak posture, etc. The ability to quickly measure others against yourself is built into our monkey brains. It's instinctual to avoid punching a muscly guy two times your size in the face and picking on the weaker guy. Is this a bad thing and should you train yourself to ignore your instincts? I think it depends on the situation. Social gathering? Yeah you should probably ignore your prejudgments. Drinking at a bar? Definitely listen to them.
  7. When I was born, the doctor accidentally handed me a computer keyboard. It took only a few seconds for him to realize the mistake he had made but it was too late; I had already logged on to thegamecreators.com and downloaded DarkBASIC Classic, a horribly written software package for developing DirectX 7 based games in the BASIC language. I spent the next 6 years of my life learning the unfathomable number of quirks of DarkBASIC instead of learning how to walk and interact with other humans. My parents were worried, so they bought me a football. Finally, I had a chair to sit on and write games properly. After having worked on over 200 projects, I realized how bad DarkBASIC was, so I downloaded Ogre3D 1.7.8 and compiled it in 2 hours. I had no idea what the hell was going on. C++ was difficult and strange and really, really complicated. The next 5 years were all C++ centered, I learned the language, I developed a multitude of different applications but still haven't made a single game yet, even to this day. Somehow, C++ has made me worry about all of the little things that didn't matter in DarkBASIC: Design patters, memory considerations, build systems, unit testing, performance considerations... I am being bogged down by all of this crap and it is preventing me from just having fun and writing games. This is what I miss most about DarkBASIC, as horrible as it was.
  8. TheComet

    Have you ever had your game idea stolen?

    Have you ever stolen sand from a beach? Game ideas are so abundant and completely useless too, they're not worth "stealing". I say useless because they've not been put to the test to see if they even work or not, and even if they have, someone still has to invest 2 years of their life to make it a reality.
  9. A lot of those conversions are unnecessary and you should probably load the DLL "outside" of the function that's calling it. Another thing I noticed is this section: Your function's return value is void so you need to set it as such. Here's how I'd do it: import ctypes as ct # Load DLL and initialize all types once here float3 = c_float * 3 mc_dll = ct.CDLL("mc_dll.dll") mc_dll.get_normal.argtypes = [c_float, c_float, c_float, c_float, c_float, c_float, c_uint, c_uint, c_uint, float3] mc_dll.get_normal.restype = None # returns void def get_normal(x_grid_min, x_grid_max, y_grid_min, y_grid_max, z_grid_min, z_grid_max, x_res, y_res, z_res): output_arr = float3() mc_dll.get_normal(x_grid_min, x_grid_max, y_grid_min, y_grid_max, z_grid_min, z_grid_max, x_res, y_res, z_res, output_arr) return V3(output_arr[0], output_arr[1], output_arr[2]) Then, if you were to save this to "mc.py" you could use it as: import mc normal = mc.get_normal(...)
  10. See here on examples on how to handle strings: https://docs.python.org/3/library/ctypes.html#return-types
  11. The "proper" way to do it would be something like this, if you had read the documentation, specifically section about arrays and pointers: So let's do that: DLLEXPORT void get_triangles(int* p) { p[0] = 123; p[1] = 456; } import ctypes as ct IntArray2 = ct.c_int * 2 # define new type that is an array of 2 ints arr = IntArray2() # instantiate this new type lib = ct.CDLL("./mything.dll") lib.get_triangles(arr) # pass it to your get_triangles function print(arr[0]) # prints 123 print(arr[1]) # prints 456
  12. TheComet

    Help disassembling laptop

    Laptops are hard to disassemble especially the modern ones. But that doesn't mean it can keep its secrets from you! What you'll want to do is get one of those industrial grade vacuum cleaners. You know, the 4.5kW 3 phase ones that suck so hard, it puts Nunu from Teletubbies to shame. Attach that to the ventillation shaft of your laptop and the dust will come flying out in an instant. The average time of sucking depends on the person, but it's usually around 2-3 minutes. Make sure to dispose of the laptop's expelled matter in an environmentally safe way. What I like to do a lot of the time is cook it up with pasta, it has proteins and vitamins in it. I've heard from others they like to swallow it directly
  13. TheComet

    what do you listen to while making / playing games??

    For coding it's usually repetitive or calm music. Solar Fields -- who made the soundtrack for Mirror's Edge -- has been a looong favourite of mine, I find myself returning to their music over and over again over the past 8 years. Some of my favourites: https://www.youtube.com/watch?v=GGgL2EF7QMg https://www.youtube.com/watch?v=QQYm8sG6IgM If you like progressive beats, Hybrid has a plethora of different styles. Their y2k album stands out the most to me, but they also make orchestral music combined with electronic. https://www.youtube.com/watch?v=gBq3Rn93xGA&list=PLC36B483573D932EB&index=8 I also really like progressive trance: https://www.youtube.com/watch?v=Y0yajN_sReE Deep house: https://soundcloud.com/dima-deepmix/dima-zvezdopad#t=30:12 When I get sick of all of the electronic music I'll switch it up for something like this: https://www.youtube.com/watch?v=xjrtKcPuvA8
  14. One thought you might have when hearing "LED Cube" is: What use are the LEDs in the center? Are they even visible, or are they covered up by all of the other LEDs surrounding it? They are. That's why it's preferable to choose LEDs with small housings and space them as far apart as possible. The "empty space to LED ratio" needs to be as large as possible. After searching multiple LED suppliers, I found that the smallest viable RGB LED is 5mm in diameter, with pin lengths of 25mm. To get an idea of what the cube might look like and also to figure out how the LEDs should be connected to one another, I decided to model the LED in blender. I came up with the following layout. It would be impractical to address all LEDs simultaneously. This would mean having 4096*3 control signals! I figured that the highest number of LEDs I would dare control simultaneously would be 768, which happens to be the exact number of LEDs in a single "slice" of the cube. In order to control all 16 slices, we use multiplexing: That is, we need to cycle through each slice repeatedly and apply the 768 signals for the active slice. If you do this fast enough, the human eye will think all of the LEDs are turned on. Knowing that ICs generally are able to sink higher currents than they are able to source currents, it is preferrable to use a common anode LED and connect all anodes in a cube slice together, making it possible to switch slices of the cube on and off with power transistors. The anode is the connection branching off to the right in the picture above. The 3 cathodes for controlling the red, green and blue LEDs in the housing are branched off downwards. The idea here is to chain the LEDs together such that the anodes can be soldered together like so: And by soldering these strings into an array, we get a single slice of the cube with all anodes connected to the same net: 16 of these slices are then stacked on top of each other such that the cathodes align perfectly with the underlying layer and can be soldered together: The result is a structure that looks like this (using 4x4x4 here for clarity, things get messy to look at with 16x16x16): The 768 + 16 pins that end up sticking out of the bottom of this structure will be soldered onto a PCB. The number of signals can further be decreased by using shift registers (most likely I'll be using 32x 24-bit shift registers which will decrease the 768 signals to 32. This, an FPGA can handle). To finish things off, since this is blender, I rendered some pictures of how the cube might look in the end. Enjoy!
  15. TheComet

    Why Is Animation so Under-utliized as a Medium?

    This question doesn't have a simple answer. You could probably write a thesis on why. Certainly one of the major reasons is this idea that cartoons are for kids (in the Western world). It's engraved into everyone's heads. If some friends came up to you and said "hey dude, let's go watch a movie. It's this cartoon that [...]" your brain would immediately conclude in this moment that this movie is going to be lame and for 12 year olds. That seems to be the natural reaction. It's interesting that we are so quick to judge cartoons like this, despite there being quite a few cartoons that are not for kids (Rick & Morty, South Park, The Simpsons, etc.)
  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!