Java Game Development #17 - Animations

preview_player
Показать описание

In this video we learn how to add animations into our java game. If you have any questions then be sure to leave a comment or contact me on twitter; realtutsgml. If you learned something then be sure to leave a like, comment, and favorite.

Have fun learning!

Рекомендации по теме
Комментарии
Автор

These are seriously awesome videos and you have an awesome channel. It was kind of upsetting when you said "Let's try for 30 likes this time", when I personally prefer you to others such as TheNewBoston who has like millions of views. You are awesome dude, keep it up

emptyglo
Автор

The key you provided for file access was invalid. This is usually caused because the file is no longer stored on MediaFire.

How to get all that animation?

Паук-шх
Автор

Yes I do, They will be hosted on CodingMadeSimple.
Our site that will be put up very soon. Help support it here igg.me/at/codingmadesimple

RealTutsGML
Автор

How can you change what entity is on top?

iq
Автор

NP your welcome. I am learning myself this was like the second tutorial I did in Java. but I have done some VB, C++, C#, PHP but as a hobby lol

rtester
Автор

These tutorials are phenomenal! My game looks exactly like yours except:
spaceship = sick guy
bullets = puke
enemies = zombies
space = park

hahaha

bugfacedog
Автор

Would you continue your tutorials with other type of games such as 3D 1st person shooter, terrain generation or flight simulator?

koranonta
Автор

mine didn't work please help ive been following along and right when I got to collision detection it doesn't work. the program runs and I can move the player but when I fire at a enemy it doesn't do anything, nothing shows up in the console or anything

bendavey
Автор

Really? I have had comments suggesting that I speed up! Since this is Game Development I am assuming you know basic java. But I will try and slow it down a bit.

RealTutsGML
Автор

Had to leave
g.drawImage(tex.enemy[0], (int) x, (int) y, null); //in under the render methods or it didn't want to work.
and the pause and slow mo method to see the animation class...but somehow it works.

hex
Автор

Here is one way to do what you ask.
Game.java

add to the top with the rest of the variables:
public static boolean isMoving = false;

in keyPressed() method add
isMoving = true; after each movement key

in KeyReleased() method add
isMoving = false; after each movement key

Player.Java
in the tick(); method put:
if (Game.isMoving) {
pa.runAnimation();
}else{}

in the render() method put:
if (Game.isMoving){
pa.drawAnimation(g, x, y, 0);
}else {g.drawImage(tex.player[0], (int)x, (int)y, null);}

rtester
Автор

Hey, I have everything in the program exactly as you do but when i play the game my fps drops from 8000 to like 5000 really quickly why is this? I know we deleted the code for erasing the bullets that we had before.

glorychild
Автор

Hey, great tutorials.I have small problem about the key listener and the movement.When you go left and right or up and down really fast the movement stop for a sec(sometimes indefinitely) how do I fix that?

Red_Spark.
Автор

I have a problem in my code. do you think I could email it to you to get your opinion on what went wrong?

junebaker
Автор

how do you make the animation stop when a button is released

ranma
Автор

couldn't you have just used ellipsis in the animation class instead of overloading the constructors 13 times? and use array of BufferedImages? would've been easier. or am i missing something?

tomaspeverell
Автор

How would one remove the bullet that destroyed the enemy ship?

rtester
Автор

Do you publish ur own games ? REPLY PLZ

smashmelons
Автор

do you know how could i make an idle animation? something like while(!moving) or somethign like that?

fma
Автор

Can you do a tutorial about how to make a platformer in Java Eclipse.

AminionCompany