well my question is how do I implement a gui window in my rpg platformer.
graphical user interface
you could take the recommendations of the [khronos.org wiki] in the "OpenGL initialization : Context/Window TOolkits" section, under widget toolkits. But in your case, I feel it would be fine to build your GUI in a manner similar to your sprites because I suspect button behavior, a text entry field and perhaps icon drag and drop would be the height of your needs. Reinventing the wheel is rarely a good idea, but I think you may do well to get your hands dirty a little with this to perhaps appreciate existing libraries.
If that proves too difficult, the other approach would be a [ youTube search : openGL c++ gui tutorial ]. Review some of these, collect your thoughts and then we can continue a meaningful conversation on common ground...
The reality is, you may need to try a few options to know what will be best for your project.
Dev careful. Pixel on board.
2 hours ago, GoliathForge said:But in your case, I feel it would be fine to build your GUI in a manner similar to your sprites because I suspect button behavior, a text entry field and perhaps icon drag and drop would be the height of your needs.
how do I build a gui similar to my sprites?
can you please ask that in a more specific way. I'm assuming you don't want the default os gui provided but instead hardware rasterized elements. Do you think that 2D gui elements are not rectangles just like sprites? Do gui elements not require vertices and a position on screen just like sprites? If you change the texture of one of your sprites to something that appeared gui-ish, would you be able to tell the difference if you were also checking for mouse screen clicks and responded with an action on a detected good click within the gui image rectangle?
I encourage you to please review some existing gui libraries to get a feel for different approaches, then come back and tell us what you liked and didn't like.
Dev careful. Pixel on board.
I want to open a window when a collision occurs with the sprites. I want to show hit points and level and strength and dexterity.
I think a fun exercise for you would be to examine bitmap font rendering then or better yet. That would tie in nicely with your recent animated sprite work. Good Luck.
Dev careful. Pixel on board.
You will only get general answers if you post general remarks.
There are too many ways to "open a window ... [and] show hit points ...". Just as @GoliathForge said, go out on a search. Have a look at the many examples and tutorials.
We cannot possibly be better than these tutorials on such a general level as you present to us. If you run into specific problems while working through an example, post them and be very specific. And, by all means, let go of OpenGL 1. It is 20 years old and the knowledge is fading out.