(ep 22)mine says "Selection does not contain a main type"
if "public static void main(String[] args) { DisplayMode dm = new DisplayMode(800,600,8, DisplayMode.REFRESH_RATE_UNKNOWN); display d = new display(); d.run(dm); }" is not a main type, i dont know what is
Um... my new screen class KINDA works... it shows a white screen then it flashes the actual images for just a second and then stops... anyone? Can anyone help? Please?
My code is fine but when I run the application the animation is perfect for 2.5 sec and for the last half it start flickering like hell (worst than the crappy version of the animation). Does my computer suck or am I wrong with my code?
i keep getting 3 errors, with no red in either of my 3 programs
Exception in thread "main" java.lang.NullPointerException at ImportantStuff.ScreenManager.restoreScreen(ScreenManager.java:111) at ImportantStuff.bucky.run(bucky.java:48) at ImportantStuff.bucky.main(bucky.java:13)
two of them are restore screens and one is b.run, they arent in red and according to the tutorials they are exactly the same down to the spaces.
After I spent around 2hours on this , it decided not to work and I don't know why. when I run it the whole screen starts to flicker black and white. can someone pls help? I don't feel like going through all the tutorials again to find the problem.
ive checked my code over and over ran through all the videos and still all my program does is go black for a little less than a second... what did i do wrong?
@neohelios77 Thanks man, I spent about an hour searching for the problem, even rewriting the whole thing, and all I forgot was an "!" shoulda checked here first!!!
thx a lot! but PLS somebody help! I am getting a black screen like many others with no pictures. I tried it on my other computer and I got a blank white screen instead. Ive checked the code and the directory and they perfectly match. Anybody fix this problem yet?
I am following the tutorials bucky.java, unfortunatley I have 72 errors which may just come down to 1 { or } but as I cannot see the full code have to keep watching same ones, as good as they are it doesnt make my fingers type better as I am trying to watch, at the end of each tutorial could you maybe show the code line by line so we can pause it at the end of each tutorial?
@tauamepacce You can't do that with paint. You could use GIMP and when you select "new" - there's something like "fill color" - there you can set your background to transparent. If you don't get it - google it. Worked for me.
For anyone that tried using a background image that wasn't big enough, you might have gotten a flashing screen under the photo. You can fix this by resizing the bg image to fit the screen size easily:
public void draw(Graphics g) { g.drawImage(bg,0,0,(int)s.getWidth(),(int)s.getHeight(),null);
not sure if i messed something up but when i load it i get a blank screen, it was suggested that the directory to the image is wrong but i know for sure that my directory is correct. i could send you my code and you could take a look but im not sure if thats possible. any help would be appreciated. thanks again for the wonderful tutorials and keep it up! =P
I think it's because some people just want to check out what it will be in the end before they try it, but I trusted Bucky this far and just went with it :D.
(ep 22)mine says "Selection does not contain a main type"
if "public static void main(String[] args) { DisplayMode dm = new DisplayMode(800,600,8, DisplayMode.REFRESH_RATE_UNKNOWN); display d = new display(); d.run(dm); }" is not a main type, i dont know what is
oscarsimpson70 2 weeks ago in playlist Java Game Development Tutorials
Comment removed
darkinin 3 weeks ago
am i the only one that gets a null pointer exception from the movieloop method that is thrown fromthe update method?any ideas????
TheChrisPetropoulos 3 weeks ago
lol this shit works
devilazpl 1 month ago
I got 5 warnings
Yoieh 1 month ago
@Yoieh What are they? Just yellow? I have 5 yellow warnings and it still works fine.
sev07knight 1 month ago
@sev07knight yes the are yellow but its just a black screen for me in like 2 sek :P
than its stops
Yoieh 1 month ago
Am I the only one that had it worked?
sev07knight 1 month ago
@sev07knight Yeah main dident :( 5 warnings
Yoieh 1 month ago
i get a white screen probably cus my monitor is 1024x768
mcduder1 2 months ago in playlist Java Game Development Tutorials
In my script, it shows background and the animation's first scene, but it doesn't animate. What's wrong? D:
Applejack525 2 months ago
Why did we build the method createCompatibleImage? We never used it!
Genuigr 3 months ago in playlist Java Game Development Tutorials 5
In ScreenMenager class:The import java.lang.reflect.InvocationTargetException is never used. Why is imported ?
And what is imported in bucky class ?
az000990 3 months ago in playlist Java Game Development Tutorials
@az000990 same stuff that was imported in the first animation tuts
hobosapiensapien2 2 months ago in playlist Java Game Development Tutorials
Um... my new screen class KINDA works... it shows a white screen then it flashes the actual images for just a second and then stops... anyone? Can anyone help? Please?
302MineCrafter 3 months ago in playlist Java Game Development Tutorials
The new screen class sucks. It might not flicker, but at least the old one doesn't show a black screen.
winPGRM 3 months ago in playlist Java Game Development Tutorials
Confused, i typed word for word w/o errors, and i only get the background, no faces.
leopardtate 4 months ago
@leopardtate nevermind, i figured it out.
leopardtate 4 months ago
I get the black screen of doom with this "perfect screen manager :D", the flickering one works fine tho :(
amiorkovtube 4 months ago
Comment removed
Togglevolt 4 months ago
Comment removed
Togglevolt 4 months ago
I just get a black screen and the exception is "Exception in thread "main" java.lang.IndexOutOfBoundsException:"
anyone know whats going on?
FloormanUK 5 months ago
Great videos, worked perfect.
dicyrus 5 months ago
Well i got The new Display stuff(resolution thing) to work, but nothing else....
Tamazon19 6 months ago
@Tamazon19 Me too! Well... everything shows up for just a second at the end and then just stops the program...
302MineCrafter 3 months ago
@302MineCrafter same here :(
Yoieh 1 month ago
No i didn't click your ads on purpose.
BapidBeagle 6 months ago in playlist Java Game Development Tutorials
I can´t see my images :(
Masterpurzel 6 months ago
if your getting the error "Exception in thread "main" java.lang.NullPointerException"
check that the line f.createBufferStrategy(2); is outside(after) your try catch statement in the SCREEN MANAGER class around line 61
Deadly699 7 months ago
My code is fine but when I run the application the animation is perfect for 2.5 sec and for the last half it start flickering like hell (worst than the crappy version of the animation). Does my computer suck or am I wrong with my code?
philvlam 7 months ago
anyone know why I would get my background, and looking fine I might add, but not the liitle images?
got them before during the initial animation, the choppy one that is...
but after this, nothing.
xFaize 7 months ago
@xFaize make sure your writing your file right.
TheAngel2ome 6 months ago
@TheAngel2ome or that your calling it in the draw method.
ex:
g.drawImage(a.getImage(),0,0,null);
TheAngel2ome 6 months ago
If you are getting a blank screen or nothing at all:
In screenmanager.class check the update method. As well as the fix mentioned earlier (should be !s.contentsLost()). Make sure the if method is:
if(w != null)
For some reason I'd typed mine as equal to null!
stubblychin 7 months ago 6
Damn I dint put '!' before s.contentsLost() in update method so it didn't worked for my :/ .. took me like 20 min to work it out and fix it :/
KrisThePolishman 8 months ago
Holy crap doing this is so much easier in C# XNA
demonwx10 8 months ago
i keep getting 3 errors, with no red in either of my 3 programs
Exception in thread "main" java.lang.NullPointerException at ImportantStuff.ScreenManager.restoreScreen(ScreenManager.java:111) at ImportantStuff.bucky.run(bucky.java:48) at ImportantStuff.bucky.main(bucky.java:13)
two of them are restore screens and one is b.run, they arent in red and according to the tutorials they are exactly the same down to the spaces.
Uberp0wned 9 months ago in playlist Java Game Development Tutorials
i'm looking for a tutorial where the graphics actually show up
THE16THPHANTOM 9 months ago
I solved the problem by getting the code from the website:
arengorsky 1 year ago
Comment removed
arengorsky 1 year ago
@arengorsky thenewboston/forums.
sorry youtube won't let me post a website.
arengorsky 1 year ago
After I spent around 2hours on this , it decided not to work and I don't know why. when I run it the whole screen starts to flicker black and white. can someone pls help? I don't feel like going through all the tutorials again to find the problem.
arengorsky 1 year ago
My screen just goes black :/
SirGamer199318 1 year ago
nevermind me im an idiot
Randude14 1 year ago
Comment removed
Randude14 1 year ago
Mine doesn't work, I copied the script but it doesn't work!
Please someone help!
When I press the run button, I see that my comp is thinking (I see a hourglass for a sec) and then nothing happens
Maybe it's about my hardware, maybe it can't handle running it
I have:
CPU: 2.01GHz single core
GPU: ATI x1600pro 256mb(DX9; Shader3.0; doesn't support OpenGL)
Motherboard: Old piece of s***
RAM: 1GB ddr
please help!!!
HomelessShrimps 1 year ago
mine just shows one face doesnt show the other face
what have a done wrong
ronny22 1 year ago
You are the best!
Oskwish 1 year ago
wow whole my screen went flashing and the background was rly small and my animation he aint went blinking! :(
IobbyI90 1 year ago
ive checked my code over and over ran through all the videos and still all my program does is go black for a little less than a second... what did i do wrong?
jdatabean 1 year ago
@jdatabean have u fixed this problem? i have the same one :(
lank3aaa 1 year ago
@jdatabean i had the same problem .. it turned out to be in the Animation class.. i had..
public void Animation() instead of public Animation() ..as soon as i took out the 'void' it worked :)
serloinz 1 year ago
it worked soo happy right now ^^
thx bucky your the best
Lexilion77 1 year ago
Sorry, I'm getting the black screen issue, too. Would you be able to post your code, please?
neohelios77 1 year ago
@neohelios77
SOLUTION:
typo at line 87 (or so) in ScreenManager.java:
if(s.contentsLost()){
should be corrected as follows:
if(!s.contentsLost()){ //duh... that's what I get for straight-copying his code & not paying attention!
Found solution on Bucky's forum (see his YouTube TheNewBoston user page for address). GREAT forum, BTW; good supporting info for his tutorials.
If you are having black screen, then double check your code.
Thanks Bucky!
neohelios77 1 year ago
@neohelios77 Thanks man, I spent about an hour searching for the problem, even rewriting the whole thing, and all I forgot was an "!" shoulda checked here first!!!
Sebastiantroy1 9 months ago
Comment removed
kk2331995 1 year ago
Are all these Java Game Tutorials Java Applets? Just checking
5trayProductions 1 year ago
@5trayProductions
The game program in the tutorial is a full-screen Java application, not an applet, but you can probably convert it to an applet easily.
ndkevinr2 1 year ago
This has been flagged as spam show
Thanks Bucky... u rock!!
lsq991 1 year ago
thx a lot! but PLS somebody help! I am getting a black screen like many others with no pictures. I tried it on my other computer and I got a blank white screen instead. Ive checked the code and the directory and they perfectly match. Anybody fix this problem yet?
jafarhh 1 year ago
@jafarhh have u fixed it?
lank3aaa 1 year ago
u r super awesome!
zengrz 1 year ago
i followed this tutorial but all i get is a full screen window fill with black color.
no bg, no face1 and face2.
anyone knows what is going on??
moneycashyu 1 year ago
I am following the tutorials bucky.java, unfortunatley I have 72 errors which may just come down to 1 { or } but as I cannot see the full code have to keep watching same ones, as good as they are it doesnt make my fingers type better as I am trying to watch, at the end of each tutorial could you maybe show the code line by line so we can pause it at the end of each tutorial?
Good Tutorials though, good job!
dashbyictfd 1 year ago
does your face images got a blank square around it? or the area around it was transparent?
is there a way to apply transparency?
tauamepacce 2 years ago
@tauamepacce You can't do that with paint. You could use GIMP and when you select "new" - there's something like "fill color" - there you can set your background to transparent. If you don't get it - google it. Worked for me.
relysaa 2 years ago
For anyone that tried using a background image that wasn't big enough, you might have gotten a flashing screen under the photo. You can fix this by resizing the bg image to fit the screen size easily:
public void draw(Graphics g) { g.drawImage(bg,0,0,(int)s.getWidth(),(int)s.getHeight(),null);
coydigga 2 years ago
@coydigga Thanks dude! You fixed my issue! You help me not kill people with annoying flashing screens!
TheDougydoo 9 months ago
not sure if i messed something up but when i load it i get a blank screen, it was suggested that the directory to the image is wrong but i know for sure that my directory is correct. i could send you my code and you could take a look but im not sure if thats possible. any help would be appreciated. thanks again for the wonderful tutorials and keep it up! =P
TheMurakai 2 years ago
@TheMurakai in your ScreenManager class make sure in update() you have:
if (!contentsLost... (aka if NOT contents lost)as opposed to
if(contentsLost.... after all you want to show your screen only if you HAVEN'T lost the contents!!!
Sebastiantroy1 9 months ago
@Sebastiantroy1 Thankyou very much kind sir!
MrCrazyeyes000 1 month ago
funny your other vids have only like 900 views and this 1 has 2500
11wesley11 2 years ago
@11wesley11
I think it's because some people just want to check out what it will be in the end before they try it, but I trusted Bucky this far and just went with it :D.
Zombiedevice 2 years ago
Comment removed
11wesley11 2 years ago
Comment removed
11wesley11 2 years ago
I'm getting no pointer exception in the movie loop, how do I fix that?
all the program does is make the screen blink a few times.
ultimatedorkwad 2 years ago
Make openGL tutorials. plz
papano12 2 years ago
btw: To set the image dead center for a 800x600 display mode: here is the code:
int x = 800/2-(124/2);
int y = 600/2-(102/2);
g.drawImage(a.getImage(), x,y, null);
TurtlezHelpVideos 2 years ago
124 is the width of my image and 102 is the height
TurtlezHelpVideos 2 years ago
If you know its an 800x600 display mode why are you wasting time dividing by two? lol
Farzher 2 years ago
Comment removed
allasktulu 2 years ago
Thanks bucky you saved us form seizures and the pain of a major headache and your tutorials are sweet look forward to learning more and having fun
WSPSNIPER2 2 years ago 2
Awsome!! Ey bucky, you don't have to thank us, we thank you for all of your great tutorials!
But you never finished tucora/phpgame, do you?
Tspider4 2 years ago
what you know about, is it a faster way --> VolatileImage
DynamicSun 2 years ago
risky plaaaaaaay
georgewig 2 years ago
Very nice! YOU're awesome!
1deividas1 2 years ago
Btw:
Private int comment = currentComments++;
bBbLlAaRrGgH 2 years ago
I just get a plain white screen D:
bBbLlAaRrGgH 2 years ago
Had the same pb before, pb was that the image were not loaded properly.
Make sure the directory of the image are correct.
allasktulu 2 years ago
But the directory worked when we used images.java
bBbLlAaRrGgH 2 years ago
@allasktulu thanks for reminding to check the directories, cause i was an idiot and forgot on folder to include
Trialtrex21 5 months ago
Thank you!
Magipojken 2 years ago
Thanks Bucky... u rock!!
heySourabh 2 years ago 22
Thank You, Bucky!
68kaspar 2 years ago 11
Hey can you do some Maya Texturing Tutorials?
S3FLionheart 2 years ago
This comment has received too many negative votes show
First a second time.
chrisxdeboy 2 years ago
This comment has received too many negative votes show
ONE MILLIONTH
ZanderMander 2 years ago
This comment has received too many negative votes show
FIFTH
aizee1 2 years ago
This comment has received too many negative votes show
FIRST
weyov5 2 years ago