Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Using opengl  (Read 1843 times)

0 Members and 1 Guest are viewing this topic.

digimikeh

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • Email
Using opengl
« on: July 10, 2020, 05:10:15 am »
Hello!!

I'm looking for a way to do a game just like Donkey Kong Country from Super Nintendo, you know, the game is smooth, good graphics and animations.....

After seeing some showcases i saw that many of the games runs a bit lag, i don't know either if thats because recording screen or something else... so i investigated a little more and found that i can use opengl for 2d content which means that SFML by default does not uses openGl... is this right?

In such case, do you think i'm forced to use opengl to create something like Donkey Kong Country or the default SFML video system is ok?..

In case i need opengl, does someone has a good book or resource to learn SFML + Opengl?

Thanks so much!..

Edit:
I understood that SFML uses OpenGL, so i think i neee to focus on learning how to move sprites smoothly using time & physics..
« Last Edit: July 10, 2020, 04:18:41 pm by digimikeh »

Hapax

  • Hero Member
  • *****
  • Posts: 3351
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Using opengl
« Reply #1 on: July 12, 2020, 11:13:54 pm »
Hi! :)

It's likely that it's the capture software that is showing lag. Without using OpenGL directly, 2D can be done (just as) smoothly using just SFML (yes, SFML uses OpenGL itself).

(click to show/hide)
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

fallahn

  • Sr. Member
  • ****
  • Posts: 492
  • Buns.
    • View Profile
    • Trederia
Re: Using opengl
« Reply #2 on: July 12, 2020, 11:27:17 pm »
Just for clarity: the first example (space racers) actually mixed opengl with SFML. However the remake uses 'pure' SFML :)

As for books, I highly recommend https://www.packtpub.com/game-development/sfml-game-development over any of the other SFML-centric books which I've read (and https://gameprogrammingpatterns.com/contents.html is also worth a read too)

Hapax

  • Hero Member
  • *****
  • Posts: 3351
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Using opengl
« Reply #3 on: July 13, 2020, 11:18:12 pm »
Apologies. I intended to mention the use of direct OpenGL in tandem with SFML in your game!
Does the "remake" use SFML exclusively and does it still have 3D elements?
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

fallahn

  • Sr. Member
  • ****
  • Posts: 492
  • Buns.
    • View Profile
    • Trederia
Re: Using opengl
« Reply #4 on: July 14, 2020, 01:56:53 pm »
Sorry for hijacking this thread somewhat :) - Yes the remake still has 3D elements, which are created using standard sf::VertexArrays and some vertex shader trickery, rather than using OpenGL directly (so I guess it depends on your definition of 'pure'). I posted some experiments on twitter in the past, and the source is here if anyone feels like digging around.

EDIT: In fact a better exxample might be this:  ;D
« Last Edit: July 14, 2020, 02:01:30 pm by fallahn »