Hey Kaarin, I just wanted to thank you so much for this amazing series so far! Absolutely brilliant !!! Thank you. I was wondering if there was a way to be able to randomly spawn objects while in the game or if that requires a lot of work? You’re the bestttttttt
I'm still getting the glitch that sometimes the movement doesn't work, but on restarting it works fine. Saw all the codes, still nothing changed. Someone please help, its frustrating.
Hello, i have big problems with this method: GetEntityYPosUnderRoofOrAboveFloor. just try to make player or enemy hitbox.height >32 and i think u will understand
Hey everyone!👋
Many of you have requested a video on how to make levels for the platformer tutorial.
This is that video! 😎
I hope you enjoy!
Cheers!🤠
Hey man! Thank you for posting this tutorial! People like you make this world a better place!!!!
Hey Kaarin, I just wanted to thank you so much for this amazing series so far! Absolutely brilliant !!! Thank you. I was wondering if there was a way to be able to randomly spawn objects while in the game or if that requires a lot of work? You’re the bestttttttt
Yes you can!
Requires some coding of course. :D
the man who is teaching me more then my profs
Thank you ! :D
Great video. I think there should be a way to just import those pics into GIMP and then paint your boards? I don't know just guessing.
man!!! i tell you that days ago!! thank you so much, you are best
No, you are the best :D
hello where did you make tiles for the game?
Link to where assets are from, can be found in the description.
What settings for the pencil did you use to make the drawing of the ground pixel-perfect at 15:50?
Can I ask why even though I added tile or enemies colors in GIMP and override it it won’t appear, I also refresh it before I play.
I'm still getting the glitch that sometimes the movement doesn't work, but on restarting it works fine. Saw all the codes, still nothing changed. Someone please help, its frustrating.
Bro ur G.O.A.T.❤
Thanks!
How to convert this project into jar file audio and image file are giving null pointer error in jar file
Whoop
I am having the problem with creating runnable .jar file. Can anyone help.
What exactly is the problem ?
please share the source code for this
Hello, i have big problems with this method: GetEntityYPosUnderRoofOrAboveFloor. just try to make player or enemy hitbox.height >32 and i think u will understand
Hey
The code is not designed to handle entities bigger than a tile. If you wish to do that, you need to change the code.
i solve this problem. i think that will be correct:
public static float GetEntityYPosUnderRoofOrAboveFloor(Rectangle2D.Float hitbox, float airSpeed) {
int difYandHeight = (int) hitbox.height;
while (difYandHeight > 32)
difYandHeight-=32;
// this while for 64 and more height
int currentTile = (int) ((hitbox.y + hitbox.height - difYandHeight) / Game.TILES_SIZE);
if (airSpeed > 0) {
int tileYPos = currentTile * Game.TILES_SIZE;
int yOffset = (int) (Game.TILES_SIZE - hitbox.height);
return tileYPos + yOffset - 1;
} else
return currentTile * Game.TILES_SIZE;
}
and enemy.updateInAir :
protected void updateInAir(int[][] lvlData) {
if (CanMoveHere(hitbox.x, hitbox.y + fallSpeed, hitbox.width, hitbox.height, lvlData)) {
hitbox.y += fallSpeed;
fallSpeed += gravity;
} else {
inAir = false;
hitbox.y = GetEntityYPosUnderRoofOrAboveFloor(hitbox, fallSpeed);
int difYandHeight = (int) hitbox.height;
int count = 0;
while (difYandHeight > 32) {
difYandHeight -= Game.TILES_SIZE*1.3f;
count++;
}
tileY = (int) (hitbox.y / Game.TILES_SIZE) + count;
}
}
sorry, without 1.3f there difYandHeight -= Game.TILES_SIZE*1.3f;