r/learnjava • u/SaltLunch1293 • Jan 24 '26
Best way to learn to make pong?
So ive heard that the best way to get good at programming is to make projects. Im interested in making a simple pong game. One thing. All the guides i can find just put the text in and barely explains it. So my concern is im not going to learn anything from it. So if theres a good guide that actually teaches send it over. Or should i just keep learning the more boring stuff?
3
Upvotes
2
u/mxldevs Jan 24 '26
You need to learn the boring stuff.
If you can't describe pong in terms of the boring stuff, you likely won't be able to actually build pong
1
u/aqua_regis Jan 24 '26
True, but only once you have a solid foundation.
Commonly recommended
And here is where you start to go wrong.
Do you know how pong works? Do you know what components it has?
If so, you have everything you need to make it.
Really, don't look for tutorials that do everything for you and give you everything. You are the one who has to develop projects from zero - that's what programming is all about.
1
u/code_tutor Jan 24 '26
You should make projects that you don't need a guide for. You can follow a guide to learn something new... then make your own project after.
1
u/Specific-Housing905 Jan 26 '26
I would recommend to go to Am'zon and look for a book about game programming in Java.
1
u/nightonfir3 Jan 26 '26
Pong starts with a black screen. Can you make a blank app.
Pong has a ball. Add a ball.
The ball moves in Pong. Make the ball move.
The ball bounces off a paddle. Make a paddle and make the ball bounce off it.
The paddle moves...
Keep going like this until you have Pong. If you get stuck google "add shape in x" for instance (where x is what language/graphics library your using) and do what it says.
0
u/RightWingVeganUS Jan 24 '26
Pong. Tic-Tac-Toe. Connect-Four. Reversi. Mastermind. Yahtzee.
Pick a game, particularly a simple game you could explain to a 5 year old. But before jumping to code, learn how to analyze and design a solution, then evolving the design to code.
Every year I year I teach object orient design or software engineering to college students and we start with Tic-Tac-Toe. While some roll their eyes and opt to skip class, many are amazed at what an elegant solution end end up implementing, far more capable of what they would have done before the exercise, and much faster to code and test.
I do it every year myself and use good old Tic-Tac-Toe for different things:
For myself, these fun, simple problems are perfect for learning new skills and scraping off the rust from old ones.
0
u/RightWingVeganUS Jan 24 '26
I make soy yogurt just about every week in my Instant Pot. Here's my approach. I don't say it's the "best", but it's pretty much the easiest.
Soy Yogurt
Ingredients
Instructions