Author Topic: OpenGl Pong: simple demonstration of OpenGl 2D graphic vs standard graphic  (Read 5559 times)

0 Members and 1 Guest are viewing this topic.

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: OpenGl Pong: simple demonstration of OpenGl 2D graphic vs standard graphic
« Reply #15 on: September 05, 2021, 11:42:22 am »
@bplus
Hi
sorry for the late answer, but as you know by my nickname, I often have few time:
 about your question on the distortion if it is used a rectangle screen instead of a square screen I think no because in Opengl we draw the ball that has one radius and we don't copy the image of circle from a system of cohordinates to the other system.
As soon as I'll post the WINDOW version of code.
Programming isn't difficult, only it's  consuming time and coffee

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: OpenGl Pong: simple demonstration of OpenGl 2D graphic vs standard graphic
« Reply #16 on: September 05, 2021, 11:59:21 am »
Yeah I got the ball well formed after some fiddling, I think you left too many remnants of the two different code methods and it is adding to confusion. Plus I wonder if you are making the best gl choices from all the options there are but I am biased with my regular 2D coding style with QB64. Frankly I was overwhelmed by all the different command choices of gl that do basically the same thing.

I would like to see it built from scratch with just the ball bouncing off walls in the simplest, least lines as possible form with helpfully named variables. Then add one paddle to start hitting ball.


Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: OpenGl Pong: simple demonstration of OpenGl 2D graphic vs standard graphic
« Reply #17 on: September 05, 2021, 07:33:18 pm »
Hi Bplus
fine to meet your interest about OpenGl

about
Quote
I would like to see it built from scratch with just the ball bouncing off walls in the simplest, least lines as possible form with helpfully named variables. Then add one paddle to start hitting ball.

you're right a good tutorial must show how to build from scratch the simple demo of Pong.
So I rewrote it step by step, posting for each step a demonstration file filled by comments and   consuming my hand joints by typing more and more long selfexplaining variables' names.
you can find the starting demo posted in another thread. And It maybe that if it is good enough it gains the program demo area.

Thanks for feedbacks
Programming isn't difficult, only it's  consuming time and coffee