Programming Snake in Java! (Full Tutorial)

Be sure to leave a like, and subscribe for more!

Download my version of snake!
http://www.mediafire.com/download/jfd5ek7t1oz5878/Snake.jar

Look at the source code over on github!
https://github.com/Jaryt23/SnakeTutorial

Code is free for use for anyone, as it is intended for educational purposes.

Many people often ask me how I learned to do Java programming. It simply was by making basic things, and doing more difficult tasks as the time goes on. I could have programmed this in probably about under half an hour, however because I wanted to take things slow, so you could learn some things, it turned out to be longer then it would’ve normally. Hopefully you can learn something out of this, and next week a may upload a similar video, but for pong!

Comments

Chris Mathany says:

Got it , thank you.

Chandra Shekhar says:

can u pls send source code to chandrashekhar9945@gmail.com

Inception Gaming says:

I have been programming for quite a while and i started learning java a few months back and i learned a ton of new things from this and im only at 23 mins! AWESOME! Keep up all the good work man! That’s a sub and a like from me!

Susie Chen says:

Thank you!! your video was very helpful 🙂

Eric Ho says:

I spent about 3 hrs watching and following the tutorial, and I had just got half way through.
But I spent 1hr reading the code and I almost got the sense of the mechanism already. 😛

RNW says:

Thanks for the time but you are the crappiest tudor ever. Every single line and move you created was stopped and then you talking to yourself of what might work better, you changing it and nobody can tell what the piss you just did. Can’t stand people who think out loud and don’t explain that they are changing something to what they concluded from their personal inner conversation or if they want you to do what they told you to do. CLEAR THAT SHIT UP. Then you explain to write this piece then you delete it with another inner “talk out loud” conversation. ADVICE.; when giving instruction on how to write code for beginners, NEVER GIVE OPTIONS, JUST STICK TO A PLANNED SCRIPT ESPECIALLY WHEN YOURE TYPING AND DELETING. You start giving options on the 2nd INTERMEDIATE tutorial for piss sake. Once again, thanks for the effort but it’s one thing to know how to write code, which is great, it’s another to LEARN HOW TO TEACH PEOPLE TO WRITE CODE. I have Two Masters and in MENSA and I had trouble

Antony Quigley says:

how old are you? and i have no experience in programming, sould i learn C, C++ or java?

Jmanthesin says:

How would I make this game two players?
Thanks.

Jay Babcock says:

you also hardly explain anything. You just say now were going to do this, but don’t explain why or what it does.

Vinny Martin says:

For
timer.start();
it is giving me an error and telling me The method start() is undefined for the type Timer. What is the fix for this?

daveshn says:

Is there anyway you can edit and re-upload this to take out all the back-tracking you do? I’m trying to code along with the video and I have to pause constantly, delete, and wait for you to decide what the correct line of code is.

Elmo says:

I got this on my mac now 🙂 I got to do load of other tutorials to try and understand some concepts though.

The.#1 T says:

Question what is the minimum ram required to run JavaScript.

Tyler Dong says:

Yo yo

Zach Allec says:

listen kid, youre clearly a genius and will more than likely go on to do huge things in life, but i cannot properly convey in words to you how god awful of a tutorial this was. your tact, your voice affliction, your constant lack of explanation, your continual mistakes and fast pace of correcting said mistakes, the entire thing combines for a sort of neapolitan of disaster.

ive been studying java for roughly a month and ive excelled at a slightly above pace; im no jaryt bustard but im doing well. thats mainly in part due to various books and youtube tutorials alike. speaking on the video tutorials, theyve always remained consistently helpful. the people who made them had a knack for teaching, sort of how you have a knack for java. jaryt, let me tell you, you do not possess the knack for teaching that the others do. i tried my best to follow along, and it wasnt necessarily the logic or methods or anything java related that made it difficult to follow along, it was the befuddlement i experienced when trying to decipher what the fuck you were saying and where the fuck you made your mistake before you “went to bed” all in an unreasonably face paced environment. i know for a fact that im not speaking for myself. tutorials arent meant to leave viewers discouraged with wasted time on their hands; theyre meant to help. clearly, youre doing just fine with java and thats fantastic; but the truth is you have nothing to offer others, ergo youre unable to help.

save all of us some time yourself included and refrain from making and further tutorials until youre fully capable.

el brigadinho says:

it’s very fun but we don’t see caracters !

Bradley Berthold says:

Thanks for the tutorial! I could tell you must have been tired though, because of that simple mistake with the taillength where you kept doing “< " when it should have been ">“. I saw the “<" and was like, umm. Also, the collision, you just have to check x,y against all points in the snake except for the head. So again there you had it reversed too - I think the code you ended up with in the loop became far too complicated because of that. But great tutorial otherwise, I like how you try and explain things thoroughly.

human3562 says:

Is there any major difference between Eclipse and Netbeans java?

Youssef Samwel says:

SpeakUP

Akash Gandotra says:

Would you say this is a good example of OOP programming?

ASWEEPEI says:

I dont seem to have paintComponent on my version of Java. How do I get it? or has it been updated since? please help.

Cyplex GD says:

line 24 wont work the one snake = new snake i have it the exact same as yours and thats the only thing that wont work

Caleb Russell says:

I keep getting a “Duplicate field Snake.ticks” for the lines public int ticks = 0, direction DOWN; and on the line public int ticks = 0; Somebody please help meeeee!

lєαƒα lєє says:

Just wanted to pass by and mention that I really like your coding style, I wish I’d be good at programming as well xD Needa finish my project and idek where to start haha.

TheNinerion says:

Thanks for the tutorial, but one thing I found a bit frustrating is that you explain random little things that are aimed at total beginners (“the != means not equal” or “if you want to increment i, say i++”), but then launch into blocks of coding and jumping around that a beginner cannot possibly follow. You also often don’t explain why you are doing something, or what purpose your actions have, leaving us to figure out your line of thinking.

KomsKala Kangeman says:

font suks??????

 Write a comment

*

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

Please click below to support us on Facebook!