mosra / magnum-examples

Examples for the Magnum C++11 graphics engine
https://magnum.graphics/
The Unlicense
282 stars 95 forks source link

[WIP] Pong example game #108

Open DrDub opened 10 months ago

DrDub commented 10 months ago

Hello,

I'm learning Magnum and trying https://github.com/mosra/magnum/issues/102

This is a base code that shows three triangles and can be played with the keyboard. The "ball" bounces and the computer follows the ball with its paddle.

I'd appreciate some guidance on what you had in mind here w.r.t. to

This is supposed to be a "simple" example but it starts to cover more and more ground. It currently does not include showing the scores but that'll in a way subsume the 'text' example.

Finally, any guidance in how to get the VertexColorGL2D to make a rectangle rather than a triangle will be appreciated Ball.cpp#56.

[And please comment on the code, I'll be happy to rewrite it in a different direction.]