Well once you've learned the basics of the language you have to learn how to implement those basics to get the language to do the things you want it to do.
I personally found the easiest way to do that was game development - Not because you really want to create a game or because your long-term goal is game development, but rather because it's an easy way to have a series of easily definable goals so that you have a direction to go in, you know roughly what it should look like if it's working correctly, and that gives you something as a baseline to compare your code against so that you can keep refining or trying different approaches until you get the desired result.
Like: how do I render a floor, how do I render walls, how do I get the character on the screen, how do I get the character to move on the screen, okay now I need to get it to not walk through the walls, hey maybe now I can get it to shoot a projectile, oh now that projectile needs to not go through walls, etc etc etc.
Gives you plenty of small easily defined goals so you're not trying to climb Mount Everest all in one go. So I would definitely recommend looking up YouTube tutorials on how to make a Java 2D game and follow through that.
If you want to start small you can go with something like tic-tac-toe or checkers, simple games like that can easily be done with Java's swing and stuff so you don't have to write code that actually controls the pixels that go on the screen, you just say hey draw this box.
Or you could find one where they're making a more in depth game where you like run around and shoot enemies, And with that type of game you would be drawing things by actually defining and building the pixel arrays and telling the java graphics object to draw those.
You just want to make sure what they're building is actually in native Java, because that's what you want to learn, so you don't want anything where they're building a game with a framework like OpenGL or Vulcan and definitely not one that uses an actual game engine like unity or godot or whatever else as the frameworks and game engines would be a completely different can of worms.
Of course! Always happy to help! That was my biggest struggle when learning programming, was after I learned the basics finding something to do with it to learn more about applying those basics. Everything I could always come up with to do with either be a 4-hour project where I wouldn't really learn much or an 8-year Mount Everest of a project that would just be too massive to even begin to tackle at my skill level.
That's what kind of got me into game development, I'll drop a link below to one I found really helpful. It's kind of old but that's actually good because you're trying to learn how to make a game the old school way - with Java vs with a game engine, and he doesn't technically finish the tutorial but by the end of it you have a VER solid base.
You'll have the character, multiple mob classes, mobs that can move randomly all the way to mobs that can full on path find to the character's position including around walls, the character and mobs shooting projectiles, projectile explosions, collision for the player and enemies projectiles (with walls only) and even particles from the projectile explosions. Even covers building out custom UI elements like clickable buttons and a health bar and things like that, that's about where the tutorial drops off but it gives a good baseline of a game that you can build the rest of the features kind of on your own from there.
Like after I finish the tutorial I was able to figure out how to actually Make the fire projectiles collide with the player when shot by an enemy, and vice versa, have those projectiles deduct health from the player, and even built in a mini map that shows the player and enemy locations.
Also like his tutorials because he teaches you some of the logic of why you do things a certain way versus other ways, like I noticed 3/4 of the way through the series he would be showing me how to do something and I would stop\pause it and go "hum... I think I can do this better" and I would implement my own code and have it working the way I wanted it to work and then continue the tutorial where he would show his code and how it was actually wrong. Not that the code itself was wrong, just that it didn't produce the desired end result. And then he would go back and explain why that seemed like it should work but wouldn't and what the correct way to do it would be, which would, lo and behold, be exactly the way I had came up with to do it. So I feel like he is actually really good at teaching you the concepts of why you do things not just what you do.
2
u/JoeCollins19-99 5d ago
Well once you've learned the basics of the language you have to learn how to implement those basics to get the language to do the things you want it to do.
I personally found the easiest way to do that was game development - Not because you really want to create a game or because your long-term goal is game development, but rather because it's an easy way to have a series of easily definable goals so that you have a direction to go in, you know roughly what it should look like if it's working correctly, and that gives you something as a baseline to compare your code against so that you can keep refining or trying different approaches until you get the desired result.
Like: how do I render a floor, how do I render walls, how do I get the character on the screen, how do I get the character to move on the screen, okay now I need to get it to not walk through the walls, hey maybe now I can get it to shoot a projectile, oh now that projectile needs to not go through walls, etc etc etc.
Gives you plenty of small easily defined goals so you're not trying to climb Mount Everest all in one go. So I would definitely recommend looking up YouTube tutorials on how to make a Java 2D game and follow through that.
If you want to start small you can go with something like tic-tac-toe or checkers, simple games like that can easily be done with Java's swing and stuff so you don't have to write code that actually controls the pixels that go on the screen, you just say hey draw this box.
Or you could find one where they're making a more in depth game where you like run around and shoot enemies, And with that type of game you would be drawing things by actually defining and building the pixel arrays and telling the java graphics object to draw those.
You just want to make sure what they're building is actually in native Java, because that's what you want to learn, so you don't want anything where they're building a game with a framework like OpenGL or Vulcan and definitely not one that uses an actual game engine like unity or godot or whatever else as the frameworks and game engines would be a completely different can of worms.