Are you seriously trying to teach people game programming with java ?
The only thing you can help with is the selection of packages and libraries for game development.
Game physics and collision and stuff is easy enough to not make tutorials about. If someone can't do that by himself he probably shouldn't try to PROGRAM games.
The source code is wrong! I made a few errors, and couldn't get it right again. So I copied the source code and now it doesn't work properly...The background "resets" at the wrong spot while moving forward and after moving for a short time it stops reseting, so the background goes blank. I don't know what to do now
I found a much easier and simpler way to do the jumping. You don't need to do all the stuff in the run() method. just create y, dy, gravity and onGround variables then put this on the end of the move() method: if (onGround == false) { dy += gravity; y += dy; } else dy = 0; if (y >= 150) { y = 150; onGround = true; } else onGround = false; Then put: if (onGround == true) { dy = -2; onGround = false; } in the Key up event, then cast p.y to an int in the drawImage() method.
Hey man if you log back from your apparent extended vacation, can you please help me?? D:
I have a background the same size as yours. and I followed your instructions and code, but there's a gap between each, can you tell me how to fix this???
Hi, I've implemented your code but I have a bug I cannot find, when I jump, it keeps jumping. Like it constantly keeps going up to its max and back down again and keeps repeating. How can I stop this loop?
incrible that's exactly what i needed: Learn how to make a game with no engines help, but there's still a question: as i heard we usually make a game with a main loop running in a thread and other things happening in another thread, (that is exactly what i wanted to learn) but untill now you haven't used threads except for the animation of the jump
hi good vid i have a question nothing to do with the vid i have been doing java for quite a while now but always do things in the same class so if i had public window(){ setTitle("Mario Styled Game"); setSize(400,400); setResizable(false); setVisible(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
in a class that is not my main how would i call upon it in my main class?
@koolpop104 Assuming window extends JFrame you could throw most of his code into your class, just override the run() methods and so on. However to create a window in his code just call window() somewhere in it something along the lines of "window myWindow = new window()" should do it.
Dear 2 - Java 2D side scrolling Game Tutorial (part 3) - Scrolling background/jumping Bones-underground is a 2d mmorpg. It is absolutely free to play indefinately. We offer a great community, a place where you can become rich and famous, or just hang out with a few friends. We have hundreds of weapons and armors to choose from. You may want to get a pet, or maybe do a little fishing and heaps more game play on my profile and link!!
When i saved and tried to run the program after you finished the thread and the cycle when i whant to run the program i get no background and i get no character.. The frame is empty
im making a spaceship sidescroller so what would i do if i wanted to be able to control UP and DOWN just like i can control going right? any help would be appreciated
How can i make it so my character moves back to the same image it was before it jumped? Because in this example, when you hold jump, and release it, the character moves back to one specific image. But i want it to point left when i jump left and point right when i jump right and not just point right ( as in this example ), and the same when i release jump. Did you understand? I cant seem to figure it out:) Great tutorial btw!
On the keyRealesed method he uses if(key == KeyEvent.VK_UP){ dy=0; still = i.getImage(); <--- This makes the icon turn back to the default imageIcon }
.... when i jump it bugs out
MicahVance 38 minutes ago
good stuff but man you need a better mic :D
nikkiridulfo 1 day ago
Are you seriously trying to teach people game programming with java ?
The only thing you can help with is the selection of packages and libraries for game development.
Game physics and collision and stuff is easy enough to not make tutorials about. If someone can't do that by himself he probably shouldn't try to PROGRAM games.
n4pgamer 5 days ago
The source code is wrong! I made a few errors, and couldn't get it right again. So I copied the source code and now it doesn't work properly...The background "resets" at the wrong spot while moving forward and after moving for a short time it stops reseting, so the background goes blank. I don't know what to do now
Togglevolt 1 week ago
redstoneprofessional 2 weeks ago
Good tutorial, horrible mike. Painful to listen to, could do without the slurping sounds and heavy breathing too.
Lordbunson 3 weeks ago
My left.png image is coming out with a white background...did you cover this in your videos? Cuz I'm lost there >.<
Gbormacar 1 month ago in playlist Java Game Programming: 2D Side Scroller
when i press the up key, the dude jumps like CRAZY! How do I fix this????!!!!
thebestbestman123 1 month ago in playlist Java Game Programming: 2D Side Scroller
Hey man if you log back from your apparent extended vacation, can you please help me?? D:
I have a background the same size as yours. and I followed your instructions and code, but there's a gap between each, can you tell me how to fix this???
SuperBoombyebye 1 month ago
Thumbs up if you have made a *slighty* normal game so far!
Quanose1 1 month ago 2
Hi, I've implemented your code but I have a bug I cannot find, when I jump, it keeps jumping. Like it constantly keeps going up to its max and back down again and keeps repeating. How can I stop this loop?
Slimfool1 2 months ago in playlist Java Game Programming: 2D Side Scroller
@Slimfool1 u didnt do the:
h = false;
k = false;
done = false;
Williaml9518 2 months ago
This helped!
MrPitbull917 3 months ago
incrible that's exactly what i needed: Learn how to make a game with no engines help, but there's still a question: as i heard we usually make a game with a main loop running in a thread and other things happening in another thread, (that is exactly what i wanted to learn) but untill now you haven't used threads except for the animation of the jump
anyway
thanks a lot you really rock
rafantebruno 4 months ago
hi good vid i have a question nothing to do with the vid i have been doing java for quite a while now but always do things in the same class so if i had public window(){ setTitle("Mario Styled Game"); setSize(400,400); setResizable(false); setVisible(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
in a class that is not my main how would i call upon it in my main class?
thanks to anyone who helps and again good vid:)
koolpop104 4 months ago
@koolpop104 Assuming window extends JFrame you could throw most of his code into your class, just override the run() methods and so on. However to create a window in his code just call window() somewhere in it something along the lines of "window myWindow = new window()" should do it.
RyanfaeScotland 4 months ago in playlist Java Game Programming: 2D Side Scroller
I added some stuff, now my character won't jump!!!!!!!!!!
I press up, it displays the picture, but no jump :(
Help
(Probably wrong video, and I'm a java newbie)
Allenmarxchannel 5 months ago
thnx a lot man :)
but when i press up my character dissapears (goes up rlly fast, out of the screen)
geronimoaris 5 months ago
thanks man
SuperYuxuan 6 months ago
man! I could not stand to listen to more than 30 seconds. Get a new mic!!!!
Xraller 7 months ago
Dear 2 - Java 2D side scrolling Game Tutorial (part 3) - Scrolling background/jumping Bones-underground is a 2d mmorpg. It is absolutely free to play indefinately. We offer a great community, a place where you can become rich and famous, or just hang out with a few friends. We have hundreds of weapons and armors to choose from. You may want to get a pet, or maybe do a little fishing and heaps more game play on my profile and link!!
boneug 8 months ago
When i saved and tried to run the program after you finished the thread and the cycle when i whant to run the program i get no background and i get no character.. The frame is empty
TheCompboy 8 months ago
it will only let me jump once
crusader584 8 months ago
Hmm. When I press jump my character goes up and down REALLY REALLY fast and then goes slower and slower until he stops.. lol : (
MegaTrekant 9 months ago
@MegaTrekant Did you set k?
HugTheTeddy 8 months ago
Comment removed
realdenni199 10 months ago
Comment removed
realdenni199 10 months ago
Only for beginners good. No one would ever program a good game like that.
SurviveZ 11 months ago
im making a spaceship sidescroller so what would i do if i wanted to be able to control UP and DOWN just like i can control going right? any help would be appreciated
N1G3L2 11 months ago
0:04 ok cool nice music im looking forwad to this tut 0:06 OMG FUUUUUUCK GET A BETTER MIC kidding bro XDDD nice tut
jackekolasnubben 1 year ago
where's the next tutorial ;'(
Monkeyboy92037 1 year ago
How can i make it so my character moves back to the same image it was before it jumped? Because in this example, when you hold jump, and release it, the character moves back to one specific image. But i want it to point left when i jump left and point right when i jump right and not just point right ( as in this example ), and the same when i release jump. Did you understand? I cant seem to figure it out:) Great tutorial btw!
vegardertilbake1 1 year ago
@vegardertilbake1
On the keyRealesed method he uses if(key == KeyEvent.VK_UP){ dy=0; still = i.getImage(); <--- This makes the icon turn back to the default imageIcon }
winst23 1 year ago
Thanks so much for this tutorial, it´s fantastic!!!
profmarcelosouza 1 year ago 22
Looking forward for the enemy tutorial :)
Wallelo 1 year ago
no offense but ur mic is terrible. it sounds like ur sitting next to an airplane
iVuTECH 1 year ago 61
Comment removed
Razvan1408 1 year ago
@iVuTECH "houston, I think we've got a problem..."
iGuitarify 8 months ago
Thanks for the tutorial!
InfiniteBlueSky 1 year ago
Your tutorials are really the best!!
Please keep doing such a good work ; )
anoniim1 1 year ago
you're so cool
Kollindyr 1 year ago