Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (42)

Sign In or Sign Up now to post a comment!
  • .... when i jump it bugs out

  • good stuff but man you need a better mic :D

  • 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.
  • Good tutorial, horrible mike. Painful to listen to, could do without the slurping sounds and heavy breathing too.

  • My left.png image is coming out with a white background...did you cover this in your videos? Cuz I'm lost there >.<

  • when i press the up key, the dude jumps like CRAZY! How do I fix this????!!!!

  • 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???

  • Thumbs up if you have made a *slighty* normal game so far!

  • 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 u didnt do the:

    h = false;

    k = false;

    done = false;

  • This helped!

  • 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

  • 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(JFram­e.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 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.

  • 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)

  • thnx a lot man :)

    but when i press up my character dissapears (goes up rlly fast, out of the screen)

  • thanks man

  • man! I could not stand to listen to more than 30 seconds. Get a new mic!!!!

  • 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

  • it will only let me jump once

  • 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 Did you set k?

  • Comment removed

  • Comment removed

  • Only for beginners good. No one would ever program a good game like that.

  • 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

  • 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

  • where's the next tutorial ;'(

  • 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

    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 }

  • Thanks so much for this tutorial, it´s fantastic!!!

  • Looking forward for the enemy tutorial :)

  • no offense but ur mic is terrible. it sounds like ur sitting next to an airplane

  • Comment removed

  • @iVuTECH "houston, I think we've got a problem..."

  • Thanks for the tutorial!

  • Your tutorials are really the best!!

    Please keep doing such a good work ; )

  • you're so cool

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more