'Java Programming Tutorial' | 'Super Mario Game' #18 | Level Design

preview_player
Показать описание
Welcome to episode 18 of our mario game in java tutorial! This episode, we implement a fast and efficient way of level design into our game.

If you have enjoyed the video, leave a like, a comment and subscribe! If someone you know is interested in learning how to make a game in java, please let them know about this series.

Intro Music: Knife Party - Centipede
Outro Music: K-391 - Hang Loose

None of these are owned by me. All rights and credit go to their respective owners.

Stay tuned for more videos! :D
Рекомендации по теме
Комментарии
Автор

I had SOOO much trouble spawning at the wrong locations. Then, I realized that I never got rid of my height restrictions in the Player class. Thanks for these videos.

SpeedAkpodiete
Автор

How did you remove the invisible wall that was blocking the path?

yanadon
Автор

what level map size did you use, how big are the pixels? I need specs to make a map on photoshop. you showed us how to make a grid map for the character just fine. but the level map! how? When I do, its all Black - help!

synfpv
Автор

so very helpful man, keep up the good work!

radwaygo
Автор

I finally got my level.png to draw out. But my player is somehow standing in midair and no longer falls. I can't jump with him anymore either. All I can do is walk right to left from one side of the screen to the other side. Seeing both walls but I'm walking on an invisible path half way up the walls. Should I have needed to make my level.png a certain size? I thought with the camera class that I could use any size. I didn't think I made it awfully large but would that affect it?

chrismacisaac
Автор

Bro im having a problem at
public Handler(){
createLevel();
}
it keeps getting me error

cheachi
Автор

This episode caused my gravity to fail working and i think also some other bugs :-(

did any code change that wasn't shown in the tutorial?

geezer
Автор

Hi, until the previous video I was able to follow everything and the video game worked perfectly as in your videos. Now in this video I have an error. Blocks of grass do not appear. When I run the game, only my player appears. Please answer me, it's important!

milenamaisto
Автор

OfficialGamingNetwork Hi, this is the first video I saw of yours just for fun and it is good. Let me try and explain what the '&' operator does. Note: when I talk about the position of binary values, I am reading right to left.

Lets say we have an RGB value for a light gold (RGB(249, 250, 210)), this value in binary is 11010010. Now I assume you know why you did the right shift operator (>>) of 8 bits to get the Green value (if you don't, light gold >> 8 becomes (we lose the first 8 bits of information)). Our original RGB value equals 16382674, but due to our right shift of 8 bits, it is now equal 63994. However, since we want to get the Green value, we have to use the '&' operator. 

Take note that our Green value is 250 (as specified above). If we look at the binary code again (discarding the leading 0's)) you will notice that the first 8 bits equals 250 and the last 8 bits equals 249. what the '&' operator does is compare what bits to the left of the '&' have the same '1' in the position as the value to the right of the '&' operator. For our example, when you saw, 0xFF, that is hexadecimal for 255, or the maximum value that 8 bits (1 byte) can hold. Over 2 bytes, 255 looks like So if we did the operation of & we need to see in what positions BOTH values have a 1. We can discard the last byte as the value on the right hand side of the '&' has no '1's' in any position. However, the first byte has 6 matches to the right hand side (the matches is exact same value of So our new value is which equals 250.

Another example is if we had a value of 250 on the left hand side and we were comparing it to the value of 100 (01100100). So 250 & 100 & 01100100) has two matching 1's which equals 96. 

If there is an | operator (OR), it means that it will match whenever there is a 1 regardless. Example 240 | 15 (11110000 | 00001111) would equal to 255

Sorry for the ramble.

OzDemos
Автор

I know this is an old video, but is anyone having a problem where everything is being made millions of times, like the walls and players etc... I had the same exact code up here(except the size of things and the amount of entities I added) and I have no idea whats wrong.

mahdiisb
Автор

I know I'm late but I've ran into a problem:jumping, gravity and colission detections don't work anymore
The colission detection actually works, somehow: when I run into a wall, instead of just making me run in place, it sends me far back. If anyone sees this and knows how to fix it please help me

JosephJosetar
Автор

How would I add more tiles? (As in different tiles - such as a dirt block)

Jynxish
Автор

Hey buddy, thanks a lot for the tutorial, but can you explain how you removed the old content ( the old player and old environment because im stuck).

Sooni
Автор

Did you remove the original player? Cause I get two players for some reason....

Izuru
Автор

Please help me. My camera still doesn't work and I don't know why :(

yanli
Автор

what code did you remove for the old player and environment?

cheachi
Автор

after this episode i am getting 2 sprites. ..how to remove 1st one...
and w is not working

mayurwadibhasme
Автор

anyone having trouble in the comments should have at least a basic understanding of java before the tutorials. You need to be able to troubleshoot, rather than just copy word for word.

ryanwalsh
Автор

After this episode my whole game from tutorials 1-17 was ruined. The code was different & it's causing my game not to show anything at all. :(

InRingoWeTrust
Автор

Wow this video was like boom! Magic!!! But it's not working for me lol ;'( What happened to 
public Handler(){
createLevel();
}

Izuru