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

Author Topic: PONG SFML C++  (Read 6304 times)

0 Members and 1 Guest are viewing this topic.

Saracen9

  • Newbie
  • *
  • Posts: 1
    • View Profile
PONG SFML C++
« on: July 30, 2015, 12:27:14 pm »
Hi

I am new to the forum and coding too! I need to create PONG using c++ and sfml and have been experimenting but unfortunately after creating the first shape, for which the code was correct, I now have hundreds of errors which I do not know how to overcome!

I am really struggling to complete this project for uni and if i don't I can kiss goodbye to my second year.

I am a maths student with limited knowledge of coding and I'm not entirely certain I have set up visual studio correctly yet...

Please if someone could advise me, it would be really really helpful as I am running out of time...

Thank you in advance.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: PONG SFML C++
« Reply #1 on: July 30, 2015, 12:34:45 pm »
What knowledge and experience in programming do you have? Do you know C++ well? If the Pong with SFML is your first programming project, that's probably a bad idea...

Furthermore, if you need help, then read these rules carefully. It will make answers more meaningful. However, you should be aware that this is an SFML and not a C++ forum; if your questions are basic programming problems, we'd recommend checking out another website (a forum, StackOverflow, etc.).
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
AW: PONG SFML C++
« Reply #2 on: July 30, 2015, 12:40:21 pm »
Since it's an uni project, ask your assistant first, because they get paid to help you.

C++ is complex and if you have never worked much with it, you shouldn't use it for a critical uni project and you shouldn't expect it to just work.

Whether you make or not make your uni year is honestly none of our concerns, so bringing it up is unnecessary. Plus if you can't finish the project on your own, maybe you're not ready for the next semester?

Above all you didn't provide any information on the errors, your build system, OS and code.
Please read the forum rules.
« Last Edit: July 30, 2015, 12:42:37 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Sayuri

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: PONG SFML C++
« Reply #3 on: July 30, 2015, 02:47:22 pm »
I am a maths student with limited knowledge of coding and I'm not entirely certain I have set up visual studio correctly yet...
Just curious : why does a math student have to take a course about game programming/sfml? Or is it an elective course? Just curious, since i'm an informatics student. But yea, expl0it3r is correct, it's your teachers job to help you setting up visual studio and sfml and teaching you the basics about game progrmaming and sfml.

Anyway, if you want to read some guides:
About SFML and setting it up for visual studio:
http://www.sfml-dev.org/tutorials/2.3/start-vc.php

Someone already made a tutorial about pong in sfml, you can find it here (it has 2 parts : #1 is basics of SFML and #2 is about pong)
http://www.gamedev.net/topic/628110-sfml-2-tutorial-pong/

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: PONG SFML C++
« Reply #4 on: July 30, 2015, 03:52:53 pm »
Pong is a fairly trivial game to implement. You should be able to find plenty of resources online to help you. Also, there's a working Pong example shipped as part of the SFML sources.
If you need more, then my "bouncing ball" example on the wiki shows a pretty simple example of bouncing a ball around a window (pong style) - that might also help: https://github.com/SFML/SFML/wiki/Source:-Bouncing-ball

Edit: Other random resources that may help you at some point.

http://www.sfml-dev.org/learn.php

http://www.koonsolo.com/news/dewitters-gameloop/

http://gameprogrammingpatterns.com/

http://gafferongames.com/game-physics/fix-your-timestep/

http://www.redblobgames.com/

http://www.gamedev.net/
« Last Edit: July 30, 2015, 05:58:18 pm by Jesper Juhl »