Jump to content
  • Advertisement

papulko

Member
  • Content count

    54
  • Joined

  • Last visited

  1. Dart (https://www.dartlang.org/) is better suited for large web projects than "plain" JS imo, with the added benefit that it runs both on the client and the server, without the need of external libraries (Node.js etc). There's also Typescript (https://www.typescriptlang.org/), which is similar in that it is more structured than JS, although it won't run on the server natively. I prefer Dart personally.
  2. Thanks so much Alundra, your solution with constructing the corners in view space works much better. Still curious as to why the original solution didn't work though!
  3. Hi, I'm trying to implement cascaded shadow maps in my Direct3D project and I've been struggling with this issue for a few days now. What I'm trying to do is calculate the current view frustum splits in world space by manually constructing frustum splits in NDC space and transforming them with the current inverse viewprojection matrix. I've managed to create the frustums in NDC space, using these values for the first frustum; /// NDC Frustum points (xyzw) LTN:-1.000000 1.000000 0.100000 1.000000 RTN: 1.000000 1.000000 0.100000 1.000000 LBN:-1.000000 -1.000000 0.100000 1.000000 RBN: 1.000000 -1.000000 0.100000 1.000000 LTF:-1.000000 1.000000 0.215443 1.000000 RTF: 1.000000 1.000000 0.215443 1.000000 LBF:-1.000000 -1.000000 0.215443 1.000000 RBF: 1.000000 -1.000000 0.215443 1.000000 LTN means LeftTopNear, LBF means LeftBottomFar and so on. The data for the second and third frustum are similar, but with the different z-values for the far planes (0.464159 for the second frustum and 1.0 for the last one)   Here's the code that is supposed to transform and normalize the frustum points: /// m_viewProjection verified to be correct XMMATRIX invViewProjection = XMMatrixInverse(nullptr, m_viewProjection); /// GFX_SHADOW_CASCADE_COUNT is set to 3 for (unsigned short i = 0; i < Config::GFX_SHADOW_CASCADE_COUNT; i++) { for (int j = 0; j < 8; j++) { m_frustumsWorld[i].point[j] = XMVector4Transform(m_frustumsNDC[i].point[j], invViewProjection); m_frustumsWorld[i].point[j] /= m_frustumsWorld[i].point[j].m128_f32[3]; } } The problem seems to occur when I do the transform. The last frustum (with NDC z-far distance of 1.0) seems to get transformed right with a world z-value corresponding to 100% of the max view distance, but the other two doesn't. Their transformed values puts them extremly close to the camera, not ~21% and ~46% of the max view distance which is what I'm looking for. I've spent days trying to figure out whats wrong appreciate any help I can get!  
  4. papulko

    5 years indie Game Designer, What next?

    I'm not 100% sure what you're asking, are you looking for advice on how to get a paid job in the game industry? In that case my advice is to spend some time creating a portfolio - on your spare time - fill it with whatever it is you're good at, write a standard CV listing any previous jobs and studies you've had, and send both of these by email to as many potential employees as you can. If you haven't received a reply within a week, call them and make sure they've "seen your email". If you get turned down, try your one week offer. If they're still not interested, thank them for taking their time and move on to the next employee.
  5. papulko

    Layer and Frame?

    I think you need to specify what exactly some of your concept keywords actually means. We can't help you if we don't understand your concept of: Level Frame Layer
  6. I find that google's own dart is a great language for large scale web applications and games. It is similar to java / c# in OOP concepts and compiles to native javascript that can be run on any up-to-date browser without plugins. Their website is http://www.dartlang.org if you want to read more about it.
  7. papulko

    WEBGL Game; things started in C++

    I've been using Dart (https://www.dartlang.org/) for a webgl project over the last couple of weeks and i can really recommend it. It has a really clean syntax that is easy to pick up if you're coming from a c++ or java background. Also, it compiles into native (super optimized) javascript which makes browser compability a non-issue. 
  8. papulko

    Vectorial 2D Platformer

    What does the Unity engine have to do with this? He was asking how to implement 2D vector math. Please don't answer specific questions with completely unrelated general advice.   Anyway, vector algebra is a huge subject and will take most people some time and effort to fully comprehend. The good news is that once you have a solid understanding of vector math, you've also covered most of the math concepts required for 3D applications.   This website contains tutorials on programming vectors, and it has interactive examples to clarify the different concepts: http://www.tonypa.pri.ee/vectors/tut01.html
  9. papulko

    What's next in Game programming

    Unfortunately there's no easy answer to that question, as they both have different pros and cons. One major difference is that DirectX is limited to Windows/Xbox/Windows mobile while OpenGL targets multiple additional platforms (Mac, Linux, Android etc). However as far as I know DirectX has been known to be slightly more optimized when it comes to performance. The good news is that their overall structure is quite similar, so once you've got the hang of one of them, the other will be much easier to pick up.
  10. papulko

    What's next in Game programming

    If you do decide to 3D on your own, you are generally left with two choices for graphics; OpenGL or DirectX. You should be prepared to spend quite some time (at least about 4-5 months full time in my case) figuring out and understanding one of these frameworks along with all the math involved. I would also recommend that you find a good, up-to-date book to help you through it.
  11. papulko

    Interpolation

    Interpolation is used to smoothly transition from one fixed value to another.   A variable in the range ( 0.0 - 1.0 ) is used to 'map' those two fixed values onto a relative scale, where 0.0 represents the first value, and 1.0 represents the last. 0.5 represents the one value right inbetween them, and so on.   Say for example that you wish to gradually move an object from point A to point B and you want to do it in 10 frames rather than instantly. All you have to do then is interpolate inbetween those two points, starting at 0.0 and adding 0.1 to the reference value each frame until it reaches a value of 1.0.   There are a few different types of interpolations with slightly different output, but the most straightforward one is called lerp (short for linear interpolation). Here's the logic in pseudocode: float lerp(float start, float end, float percent) { return start + percent*(end - start); } You should know however, that this logic is still bound to the frame rate! 
  • 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!