#13 More Block Selecting (Minecraft 2D) -- Java Game Development (LWJGL)
Uploader Comments (TheCodingUniverse)
All Comments (18)
-
@DKMeNIcE Damn, I must've been really tired or something. Glad you fixed the thing.
-
@DKMeNIcE Solved it by changing the world sizes. Obviously it was changed after recording and it wasn't relayed to us. WIDTH of 21 and HEIGHT of 16 is what it should be.
-
My right and bottom boundaries aren't blocking the selection. I have the exact same code as you but it seems like World.BLOCKS_HEIGHT - 2 and World.BLOCKS_WIDTH - 2 just aren't the right numbers. You forgot to add the world.java to pastebin, however following this tutorial I set it to the same as you, 24 for the width and 20 for the height. In order to get my boundaries to work I need the resulting number to be 19 for right and 14 for the bottom. meaning -5 for right and -6 for down.
-
@TheCodingUniverse Soooo...Are you making a tutorial on the player or not? It seems if I make another class, I have to make all the ints static(lol) and if I make a void in the Boot class it won't work(lol).
-
@Williaml9518 Oh, lol, sorry, I didn't see that. My apologies.
-
@TheCodingUniverse What?! I wasn't off topic. I was just telling some other guy asking for help that I use JFrame only, not you!!!
-
@Williaml9518 Err, off-topic, I guess?
-
@cheater39 umm. I only use JFrame sorry.
Why does it matter if you use public or private? I know what the difference is but why not just go ahead and make it all public?
NerdsWBNerds 3 weeks ago
@NerdsWBNerds Because making something publics implies that it should be used by external classes. It's generally a good habit to make everything private or protected if possible and have accessor methods handle the internal variables.
TheCodingUniverse 3 weeks ago