Should I figure out the ball problem in my pong game by myself or reuse someones code?

I'm making my first game, and I'm a bit confused on how I should go with solving the problems. I basically got everything going except the ball's movement. After I basically program everything in main, for practice, I'm going with making the ball in a class and the paddles etc.

Anyway, I hear that better programmers use others code in thierss to save time etc. Should I solve the ball's movement by myself or use someones code? And will this make me less able to solve the more difficult problems in future games that don't have usable code etc.

And more generally when making games, should I always use others code that fits or just try and solve these problems by myself?
Last edited on
Generally, you should try to reuse as much code as possible by using preexisting libraries that are designed for a particular job.
The ball movement should be trivial though, so I don't really see how you could save any effort by using a library in this case.
Thanks, so basically stuff like that I should do myself while just reusing libraries for certain repetitive stuff that's used in games.

I see. Thanks.
Topic archived. No new replies allowed.