Jump to content
  • Advertisement

TheComet

Member
  • Content Count

    632
  • Joined

  • Last visited

  • Days Won

    1

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
    Programmer
  • Interests
    Art
    Education
    Programming

Social

  • Github
    TheComet
  • Twitch
    TheComet93

Recent Profile Visitors

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

  1. TheComet

    What are you working on?

    I'm working on wavesim, a tool for simulating acoustics in static meshes. Realistic sounding environments are grossly overlooked, even in the most modern AAA games, where the state of the art is to slap some crude reverb filters into the environment. This tool will take a static scene as an input, perform a physically accurate wave simulation, and synthesize a lattice of digital filters which can be applied back to reproduce accurate acoustic behaviour in realtime. This eliminates the laborious job of having to manually assign reverb filters and yields far better-sounding results. Currently, I'm working on an algorithm for efficiently decomposing a scene into rectangular domains. Unlike most acoustic wave simulators which typically use Finite Difference methods (FDTD), the algorithm used in this project abuses the well known analytical solution of the wave equation in rectangular domains, enabling error free propagation within the domain. This means the accuracy of the results at worst will be equal to those of an FDTD simulation, and at best be error free. As great as this sounds, development is slow and I don't really have much to show yet. I think the biggest challenge will be to support domains of different densities, which will allow you to simulate what it would sound like e.g. if you're listening to a sound originating on land while being under water.
  2. TheComet

    Manual syntax trees

    Honestly? It was probably about 5-10 minutes.
  3. 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?
  4. 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; }
  5. 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;
  6. 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.
  7. TheComet

    FPP Game

    Who upvoted
  8. 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.
  9. 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.
  10. 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.
  11. 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(...)
  12. See here on examples on how to handle strings: https://docs.python.org/3/library/ctypes.html#return-types
  13. The "proper" way to do it would be something like this, if you had read the documentation, specifically section 16.16.2.9 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
  14. 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
  15. 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
  • 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!