Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

1 - Java 2D Game Tutorial/Help (part 1) - Side-scrolling game

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
65,626
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jan 1, 2010

(This is part 1 of 2) This tutorial will teach you how to make a Java side scroller 2D game such as Super Mario.

Points to note:

A) You can loop the background so that your character stays in one spot and the background moves (like how it is in old Mario games)

B) You can use different images for your "main character" such as one of him walking left, crouching, etc. so that when you press left it seems as if the character actually turns left

C) You can add jumping capabilities by using a thread and a run method to make it look like the jump is animated (I've talked about this in previous videos)

D) For every other object you add (such as an "enemy" that must be killed or a missile that is shot) you must create another class to hold that item's x coordinates, y coordinates, etc.

If you need help implementing any of the above items send me a message and I will send you code to do so since I'm working on a full side scroller (2D and 3D) with enemies, missiles, save points, etc. Also, I will make videos in the future talking about some basics of these items.

Thank you

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 16 dislikes

Link to this comment:

Share to:

Top Comments

  • pull the mic a lil from your face!

  • R.I.P Headphone users);

see all

All Comments (192)

Sign In or Sign Up now to post a comment!
  • i need the picture

  • Somehow KeyListener doesn't work for me.

  • What are the disadvantages if we make x and y static instead of creating getX and getY methods?

  • Maybe you don't know: Eclipse organizes the imports by pressing Ctrl+Shift+O.

  • dat cursor

  • I cant make a game :( i use eclipse just like you but I dont got a src :( now I cant make a sh*t

  • @mastamass132 I respect your commitment! Yea, I have unity and am a bit sad mostly because it doesnt support java and C++, but C# is close enough to Java that i guess it wouldn't matter. I think this tut was amazing, i mean, not to brag or anything, but after this i was able to make my own snake game from scratch, this guy helped a lot! Also, yea unity is hard. it's 3D, but if you can't simply watch some guy type onto a screen, thats pathetic. hope all goes well unity 3d game programming!:)

  • @302MineCrafter i'd rather not..  I now official hate coding.

  • @TheTreyVidz Seriously, just watch thenewboston's tutorials. That's how I learned Java.

  • @mastamass132 I WAS using Unity until I figured out how restricted you were. So now I'm learning how to use a REAL programming language. It's fine if you want to use it though! It's just that I don't really like it.

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