Or if you only want a 2 sprite animation (2 images)
declare the variable outside the paint method like this
Image pSprite;
and then put this in your paint method if (System.currentTimeMillis() / 300L % 2L != 0L) pSprite = new Image ("Char.png"); else pSprite = new Image ("Char2.png"); g.drawImage(pSprite, 150, 150);
a tip, u start with new stuff all the time and use not yet created methods,
would be nice if u had some kind of a Flow Chart at the begin of the tutorial, so the viewer knows whats coming, or has a simple picture of the program
@RadditzZ Yeah that's what I was thinking too - at least a Class Diagram would be nice :) These tutorials are mostly about Library Classes anyway so it would be great to see how they co-operate.
Using methods not created yet..how confusing :/ ...
TanakaJayy 2 weeks ago
"Remember to make beginning look like ebingg or else the code will not work" BWAHAHAHHAHAHAHAHHA xD
sev07knight 1 month ago
cant you just call the start() method in the if(movieTime>=totalTime) statement? it does the same i think.
NebulaOrbit 2 months ago in playlist Java Game Development Tutorials
This tutorial wasn't your best! I think you should't use hundrets of methods without having build them!
Genuigr 2 months ago in playlist Java Game Development Tutorials
I tried this with "begin". Guess what.. It didn't work! D:
eSBAcake 5 months ago
Or if you only want a 2 sprite animation (2 images)
declare the variable outside the paint method like this
Image pSprite;
and then put this in your paint method if (System.currentTimeMillis() / 300L % 2L != 0L) pSprite = new Image ("Char.png"); else pSprite = new Image ("Char2.png"); g.drawImage(pSprite, 150, 150);
Done.
iXavierProductions 6 months ago
@iXavierProductions
lol people should never never never ever allocate and deallocate stuff in loops
devilazpl 3 days ago
Just wanted to share - bulgarians and probably some other Balkan people might understand "ebing" as doing the nasty.
npacebg 7 months ago
@npacebg but not ebingg! lol
Blackhorsecatie 6 months ago
anyone else not understand this?
lancerator08 7 months ago
Why not just use start() method to restart the animation?
MrBumbolt 9 months ago 7
This has been flagged as spam show
i'm starting with Java games and those movies r very simple 4 me ;P
gg
szypxable 9 months ago
i'm starting with Java games and those movies r very simple 4 me ;P
szypxable 9 months ago
if u read the code and put the words together it all makes sense this is way easier than visual basic XD
skullking42 9 months ago
3:40 if statement in an if statement...INCEPTION
ThEwOtSiT182 9 months ago
@ThEwOtSiT182 IFCEPTION!
jelleverest 4 months ago
Yes, please create the methods first
MrKryddarn 1 year ago
it would be a lot easier to understand if you created the methods first before we use them. but great tutorials bucky.
iVuTECH 1 year ago
@iVuTECH but he explains anyway so... o.o
NomNomPlz 1 year ago
nice tut
a tip, u start with new stuff all the time and use not yet created methods,
would be nice if u had some kind of a Flow Chart at the begin of the tutorial, so the viewer knows whats coming, or has a simple picture of the program
RadditzZ 1 year ago 3
@RadditzZ Yeah that's what I was thinking too - at least a Class Diagram would be nice :) These tutorials are mostly about Library Classes anyway so it would be great to see how they co-operate.
88Cortex 1 year ago
Ur right Bucky, I just write ur comment line without constuctor, withourt methods and it works, "ebingg" is a key word!! :)
freee111 1 year ago
i'd rather do
if (movieTime >= totalTime) { movieTime -= totalTime; sceneIndex = 0;
}
so the animation loop is consistent with the time passed.
But maybe im confused. i should watch the next videos to see what he's trying to do before commenting :P
fermixx 1 year ago
Frame is the better term to refer to one image of an animation instead of scene. Scene is a term for a series of similar frames.
hoyun 1 year ago
Oh man I tried to copy the "ebingg" for fun but I wrote it wrong... how stupid can it get oO
relysaa 1 year ago
Beijin. Or else it will not work?! Hahaha.
gasto5 2 years ago 43
long time passed
lol
ultimatedorkwad 2 years ago
nice work bucky. make more tutorial pls
casterfile 2 years ago 40
Thanks can't wait for more! And I want to say the screen looks a bit blurry.
Believer424 2 years ago