Jump to content
  • Advertisement


The search index is currently processing. Leaderboard results may not be complete.

Popular Content

Showing content with the highest reputation on 09/11/19 in all areas

  1. 1 point
    I spent a few minutes today on my lunch break doing some weapon mock-ups for my DOOM Challenge entry. For some authentic visuals, I chose to video myself wielding a toy gun, before digitizing it and adjusting it to suit my needs. From what I gather this is fairly similar to how id did the weapons for DOOM. I bought a really cheap little Nerf gun from a local supermarket to use as the basis for the games pistol, and below you can see a screen grab from one of the video frames. Three frames were taken overall, to give a nice range of motion for the weapon recoil when firing. Bringing the grabs into Gimp, the background was removed and the gun desaturated, to remove the toy blue and orange colours. The bitmaps were then down-sampled and palletized using the original DOOM palette. Finally, this was thrown over a screen-shot to check it for visual fit. It looks pretty cool to me, so I'll add some muzzle flash, and try to integrate it into the game. Of course i'll need to throw on a good measure of weapon bob when your walking for that full doomy goodness.
  2. 1 point
    There's more there than I can easily sort out, but I'll point out one thing. XMVector3Transform() treats the input vector as a point (with w = 1), which probably isn't what you want for the direction vector. XMVector3TransformNormal() may do what you want there (in other words, use XMVector3Transform() for the origin and XMVector3TransformNormal() for the direction). I suspect that may be an issue, but it may not be the only issue. There are many places that picking or raycasting (or any similarly complex geometric algorithm) can go awry, and there could easily be other issues at play here. But, I'd at least give the XMVector3Transform()/XMVector3TransformNormal() suggestion a try. I can think of some other things that might make it easier to get this sorted out, but I'll refrain from offering them unless asked, as they're somewhat tangential and may not constitute the kind of feedback you're interested in.
  3. 1 point
    Wow, that's harsh. The list of things I like about C++ also includes at least these: std::string, standard containers, "you only pay for what you use", [and my favorite:] destructors ("RAII").
  4. 1 point
    You may already be aware of this, but OpenGL is deprecated on Apple platforms. Realistically I suspect it might continue to be supported for the foreseeable future, but the fact that it's deprecated might be worth keeping in mind. Regarding the audio issue, I'm basically working on the same problem right now, so I'll comment based on my experience so far. As zhangdoa mentioned, there are professional/commercial third-party solutions available if that's an option for you. There may also be free/open-source cross-platform solutions, but I don't have any suggestions in that category off the top of my head. There's OpenAL, as mentioned previously, but (also mentioned previously) it's deprecated on iOS. I'm not sure what its status on Android is, but it doesn't seem to be the recommended solution in that environment. You mentioned desktop, but didn't specify platforms. If you're targeting e.g. macOS, Windows, and Linux, obviously that adds some complexity to the problem. I'm currently just targeting iOS and Android, so I'll stick to commenting on that. I don't know if OpenSL is available on iOS (I Googled but didn't find a clear answer offhand). iOS offers various technologies though, such as AVAudioEngine, that are fairly straightforward to use. Things seem to be a little more complicated on Android. Options include: - SoundPool for short preloaded sounds. Its feature set is fairly small, which can make it a little difficult to work with, and there have been some reports of environment-specific bugs (although that seems common for Android in general). - MediaPlayer for longer sounds (e.g. music). There may be problems with seamless looping when using the 'looping' feature, which can be a showstopper for e.g. games. There may be some workarounds, but I don't know how reliable they are. - ExoPlayer is an open-source third-party alternative to MediaPlayer. Empirically it appears to support seamless looping, although that may be environment-dependent. - AudioTrack, which is lower-level and requires more effort to use. - On the native side, there's OpenSL, the newer AAudio, and the third-party library Oboe, which wraps both of these. These are all more complicated, I think, at least compared to e.g. SoundPool and MediaPlayer. The seamless looping issue seems to be a vexing problem. If it wasn't for that I'd just recommend SoundPool and MediaPlayer. You didn't mention what sort of audio features you need though, and if you're looking for e.g. complex 3-d audio with effects and so on, then those tools may not be sufficient. If you need more input, it seems like some relevant questions would be what desktop platforms you want to support, and what sorts of audio features you need.
  5. 1 point
    I wrote a quick explanation for the 3D case a while ago. Maybe helpful: https://dl.dropboxusercontent.com/u/55377219/D.%20Gregorius%20-%20Capsule%20Inertia.pdf   Hope that helps!
  6. 1 point
    Here is the step-by-step calculation of the capsule inertia. I have the code in 3D so I downscaled it to 2D for your convenience. Of course you can simplify it but the decoupled approach is nice for clarification. You can also look use this image as a reference (originally from Dirk's paper).   float32 r = m_radius; float32 r2 = r * r; float32 w = 2.0f * r; float32 w2 = w * w; float32 h = b3Length(B - A); float32 h2 = h * h; // Rectangle inertia about the capsule center of mass b3MassData Ic_Rectangle; { // Rectangle mass float32 area = w * h; float32 mass = density * area; // Rectangle inertia about the center of mass (same as capsule center of mass) Ic_Rectangle.center = 0.5f * (A + B); Ic_Rectangle.mass = mass; Ic_Rectangle.I = mass * (w2 + h2) / 12.0f; } // Semicircle inertia about the capsule center of mass b3MassData Ic_Semicircle; { // Circle area and mass float32 circleArea = B3_PI * r2; float32 circleMass = density * circleArea; float32 circleI = circleMass * 0.5f * r2; // Semicircle area and mass float32 area = 0.5f * circleArea; float32 mass = 0.5f * circleMass; // Semicircle inertia about the base float32 Io = 0.5f * circleI; // Paralell axis theorem // I = Ic + m * d^2 // Ic = I - m * d^2 // Semicircle center of mass distance to the base float32 d1 = (3.0f / 8.0f) * r; // Semicircle inertia about its center of mass float32 Ic = Io - (mass * d1 * d1); // Semicircle center of mass distance to the capsule center of mass float32 d2 = d1 + 0.5f * h; // Semicircle inertia about the capsule center of mass float32 I = Ic + (mass * d2 * d2); Ic_Semicircle.center.Set(0.0f, d2); Ic_Semicircle.mass = mass; Ic_Semicircle.I = I; } // Capsule inertia about the capsule center of mass taking two semicircles into account b3MassData Ic_Capsule; Ic_Capsule.center = Ic_Rectangle.center; Ic_Capsule.mass = Ic_Rectangle.mass + 2.0f * Ic_Semicircle.mass; Ic_Capsule.I = Ic_Rectangle.I + 2.0f * Ic_Semicircle.I;
  • Advertisement
  • Advertisement
  • Popular Contributors

  • Member Statistics

    • Total Members
    • Most Online

    Newest Member
  • 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!