Java game programming tutorial for AP students/equivalent level – In one video!

My website:
If you go through the whole thing, please let me know what you want to see next!

Some information: I recently completed an internship helping out an AP Computer Science class in high school and I learned a lot about what level of programming they are at. This series is made for someone who is at that level or has had some other kind of equivalent introduction to java. This game programming tutorial is not made to teach you java but is made to teach you game design and some different programming practices involved with game design.


Retro Gaming - Clash Of Clans says:

its called parts holy

Otis Wong says:

i love this guy!

Dylan Mullen says:

I love how nice this guy is. Giving 7 hours of his time to explain to us, and with good explanations, and also being very nice and active in the comment section.

geojf jf says:

Are you going to be adding a tutorial on game programming(level, enemies, etc.)?

Java Programming says:

Thats nice! I’m using all the stuff I learned from you in my 30 sec game devlog series. Thank you every much!

Jonas says:

Hey Marcus! Really awesome video, after searching for hours this is by far the best graphic tutorial. Thanks a lot for the work! I’ll keep watching your followups and recommend you to friends. I have a question though.

Java has the possability to do so if you say take in game as parameter into a method you can use game.(variabel) to access an instance variabel of game. So my question is why do you use getmethods when instance variabels can fill the same function in an easier manner?

Thanks a lot!

VileStorms says:

great, ill watch it completely tomorrow for fun

Tom Ventura says:

For anyone following this and noticing FPS inconsistencies – I recommend switching “changeInSeconds = 0;” to “changeInSeconds–;” in the while loop where you call update();.
This way you’ll make up for any time lost in case your changeInSeconds was > than 1, which it will most likely be most of the time.

Kino Cartoon says:

Do you speak German? I totally can understand everything you say but your pronunciation sounds like that from a German.

Sergio Andujar says:

Thanks Marcus! 🙂

Neil Whalen says:

I am trying to implement the sprite sheet with padding (the one you briefly show made by Kenney) like you go over briefly in lesson 7. However when I add “1” to each argument in the for loops the console throws a exception saying the coordinates are out of bounds. Would you know how to fix this? Since my code works in the sheet without padding, I am not sure what it going wrong.


이민영 says:

비디오가 7시간이야 ㄸ

Megas Alexander says:

7 fucking hours????????

Llawx says:

Thats awesome because it is in only one video

Carlos Gonzalez says:

where is the assets folder in your website?

Thommas Rg says:

Where did you learn all this? Is there a book oriented to these topics? I speak Spanish and I am trying to watch the video tutorial.

(FPoly HCM - K12.3v2) Phan Le Quoc Trung says:

how to dowload video

zoyeb shaikh says:

thanks Marcus Dubreuil your efforts is really appreciated

It's Simon says:

Around 46 minutes.. in my code im getting an error….
Exception in thread “Thread-1” java.lang.NullPointerException
at RenderHandler.renderImage(
at Game.render(

Tzivo says:

7h This is going o be a long night…

Tiago Duraes says:

incredible work, thank you

The Vendetta says:



im having some trouble. for some reason nothing is appearing on my canvas. just to double check if i was doing something wrong in my programming, i copied and pasted EVERYTHING up to lesson 6 (im on leason 4 btw) and still nothing. im using eclipse and this is really annoying me. please help.

SethOfCarso says:

I’m new into coding but thx for the extended version
Maybe in your next video you can do something about collisions and atacks

Ephraim Bane says:

How would I export this to a jar file, so that I could share it with my friends?
Regularly exporting the jar file doesn’t work 🙁

VoyShare says:

How do you do the small “code overview display” in the top right corner? Could you tell me what that is called? I tried googling around but didn’t find anything

Serious4Gaming says:

at 2:57:34 why do you use Integer.praseInt() and not Integer.valueof()? what is the difrence?

Sean Dillon says:

Ayyyy mans got osbuddy on the home screen whutsgud

Banana Tech XL HUGKLM says:

wat software are u using

SebasuChan Lee says:

I need help on the graphics, for some reason it cant find the image file for GrassTile. I am using Java Eclipse Mars. I tried putting the Grass Tile into my src folders but it didn’t work.

Exception in thread “main” java.lang.IllegalArgumentException: input == null!
at Source)
at main.Game.loadImage(
at main.Game.(
at main.Game.main(

GermanySups says:

Could you give out the sprites for free for no creative common use

HeapTV says:

Good Work

nostick says:

why is cmd open

Otis Wong says:

i like this guy his games r so good. like if u agree

Rafael Mateo says:

Can you make a tutorial on how to do a side scroller?

Morten Dahl Pedersen says:

Fantastic video! Thank you a lot for making this.

For some reason the GrassTile.png is all black when I run it, I can’t really understand why that is the case. There is no error or anything.
It was clear to me at 1:24:24 when I could see that there was a black box in front of my blue rectangle.

Clearly, you don’t have time to look into an error like this. But do you have any idea why this is happening?

I hope you will continue to update content like this, truly amazing work.

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!