• Content count

  • Joined

  • Last visited

Community Reputation

360 Neutral

About felipefsdev

  • Rank

Personal Information

  • Interests
  1. OpenGL VAO required?

    Something that might save you a lot of trouble is just create a single VAO at the initialization and never touch it again. Since you were using older OpenGL version (or compatibility), you probably have a setup for managing attributes (which is the purpose of VAOs), and you can use your own instead of converting everything. Plus, managing by yourself makes easier to integrate to your renderer.
  2. DX11 Font rendering

    Damn, that is so simple and elegant. Well, I'm gonna copy that approach and embed on my framework. Curiously, it's kinda uncommon to see posts about font rendering, while it's not a trivial topic. I'm glad I clicked on this one.
  3. Rotation matrix multiplication causes Gimbal lock

    So, you are making your own math library? Besides learning the difference between quaternions, euler, and the guimball lock problem, that this vide shows very well: https://www.youtube.com/watch?v=zc8b2Jo7mno Take a look at MonoGame math library: https://github.com/MonoGame/MonoGame/blob/master/MonoGame.Framework/Matrix.cs https://github.com/MonoGame/MonoGame/blob/master/MonoGame.Framework/Vector2.cs https://github.com/MonoGame/MonoGame/blob/master/MonoGame.Framework/Vector3.cs https://github.com/MonoGame/MonoGame/blob/master/MonoGame.Framework/Vector4.cs https://github.com/MonoGame/MonoGame/blob/master/MonoGame.Framework/Quaternion.cs It's in C#, but very easy to translate to any language (I translated to C, btw). Imo, much more readable than GLM.
  4. Super Mario Bros 3 Level Design Lessons, Part 1

    I love this game, and I will be looking forward for the part 2. This was a great analysis.
  5. OpenGL ES 3.0 Playing videos on android

    OpenGL? From what I'm understanding, you want direct access to the pixels of a texture, then modify the pixels of that texture (by consequence removing the middle process of decoding to a pixel array in the client's memory). You can do that with glMapBuffer/glUnmapBuffer :) https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glMapBuffer.xhtml https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glUnmapBuffer.xhtml When you use `glMapBuffer()`, you will get a pointer to that (pixel) buffer on client-side. After modifying the buffer, you can use `glUnmapBuffer()` to let the graphic card know that the buffer is ready. I think this is the most "permissive" method to do that in OpenGL.
  6. When To Use Pointers?

    I saw this image days ago, I liked how didactic it is:
  7. Where is this Hot Teacher Trend coming from?

    I agree. This discussion doesn't add any positive social impact, only the suspicion that "the more attractive your teacher, the higher the chances she's a pedophile". Merely prejudice. There's no research data saying this is a trend or that these are all attractive women. And, even if there was, a social research doesn't conclude anything based solely on data, without any historical analysis.
  8. Changing the force by reducing it gradually (like i mentioned in my post) or setting the force to 0 after S seconds sounds perfect for this case. Other undesired effect of changing the mass is that it will change the momentum, and will make the collision response between the character and other objects to vary according with the mass of the character.
  9. I was thinking about that, but if the terrain isn't flat, that can be flawed. Imagine if the player is on a mountain: it's at a high altitude, but technically it's still the ground. Using the altitude as parameter and raycast to determine the altitude isn't a good idea either. If there's a cliff, and the character just stepped out of the cliff, the effect will be quite drastic: the altitude will go from 0 to "MAX_ALTITUDE" (whatever the max altitude tested by the raycast is).
  10. PNG source code

    Paint is a [b]terrible[/b] program for art. Not just lack features artwise, but also lack support for some formats (sometimes can read them, but not save). As Josh said, it's likely that all your files are actually BMP, just with a different extension name (.jpg, .png). Extensions don't determine the actual content of the file. Use a proper graphics editor. These are some free options with good support for PNG (and many other formats): GIMP, Aseprite, GrafX2.
  11. Goofy bitmap horrible nonsense garbage!

    Btw, 1) why are you using BMP and not PNG? and 2) why don't you use a simple library to handle that? I know for some cases it's interesting to make your own implementation of things for learning purpose, reducing dependencies or reducing executable size. But, BMP and PNG are not simple formats. Even if you achieve the implementation of the loader, you will be just executing a step-by-step (like in the list frob mentioned).
  12. You know what would be more safe (physics engines tend to not like when you change certain properties like mass, often) than changing the rigid body mass constantly: apply less force the more time the rigid body is in the air. You could reduce the force that is applied by a certain factor. For example, in each update, you could (pseudocode, since I don't know the particularities of Unity/C#): object::update() { if self::touchingGround() { // Check if the ground is right bellow self.applicableForce = 100.0; // My arbitrary max force } else { // If not touching ground, reduce applicable force to 75% each frame self.applicableForce = self.applicableForce * 0.75 * deltaTime; // Adjust with the delta time } // Check input if getInput("up") { self::applyForce(directionVector * self.applicableForce) // Apply the force in the rigid body (self) } }
  13. I don't think increasing the mass is going to have the effect you desire. Quoting from the Unity docs: "A common mistake is to assume that heavy objects fall faster than light ones. This is not true as the speed is dependent on gravity and drag." swiftcoder, but the movement is based on force, so it will have the desired effect. Velocity of fall will be the same, but pushing the object higher and higher will be more difficult.
  14. To add what missionctrl said, here's a video that explains gimbal lock (at 1:00, the video shows the gimbal lock): https://youtu.be/zc8b2Jo7mno?t=52s If you are using a custom game engine, you need to implement quaternions (of finding a library that does that job for you), and you can get your matrix rotation for proper rotation of the object.
  15. i need ideas

    Remaking old games is a good start. NES games, for example, are a good source of ideas, and fairly achievable for beginners.