I did everything you typed here and i get errors that i cannot change from boolean to int and there is no syntax for that. i keep getting errors with render. FUCK THIS.
For those of you have a grey window popping up with no sign of errors double check to make sure you put "thread.start();" after "thread = new Thread(this);" and it should fix the problem.
I copied your code to what seems like verbatim, and I have two less warnings than you. I debug the program, and I find out that the program isn't drwaing any pixels; the form is completely blank. The warings that I have are at the lines where it says, "private Render render;" sayig "The field Display.render is never read locally"; and "private void stop() {" saying "The method stop() from the type Display is never used locally". I have no other warnings. What should I do to fix this?
There are an error when I trying to run it, it says:
Exception in thread "Thread-3" java.lang.NullPointerException at com.sshoot.spaceshooter.Display.render(Display.java:79) at com.sshoot.spaceshooter.Display.run(Display.java:59) at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-2" java.lang.ArrayIndexOutOfBoundsException: 65536 at com.mime.mineblock.graphics.Render.draw(Render.java:21) at com.mime.mineblock.graphics.Screen.render(Screen.java:19) at com.mime.mineblock.Display.render(Display.java:72) at com.mime.mineblock.Display.run(Display.java:57) at java.lang.Thread.run(Thread.java:722)
Exception in thread "Thread-3" java.lang.ArrayIndexOutOfBoundsException: 65536 at com.mime.TDGame.graphics.Render.draw(Render.java:21) at com.mime.TDGame.graphics.Screen.render(Screen.java:19) at com.mime.TDGame.Display.render(Display.java:73) at com.mime.TDGame.Display.run(Display.java:58) at java.lang.Thread.run(Unknown Source)
I have copied everything correctly but when i run i get blank screen w/ no pixels. I have no errors and 1 warning " The value of the field Display.render is not used" please help!
@SethBowdenn ok for those who are having issues getting the pixels to show once you run the program check your code for any misplaced "()" or ";"
I found my issue was under "public void run() {" I put "while(running);{" the ";" after the word (running) does not belong because it is a while statement.
only took an hour to notice that error.... got to love programming!!!
Exception in thread "Thread-2" java.lang.ArrayIndexOutOfBoundsException: 65536 at net.byo.src.Graphics.Ga.draw(Ga.java:36) at net.byo.src.Graphics.Gb.render(Gb.java:19) at net.byo.src.A.render(A.java:77) at net.byo.src.A.run(A.java:92) at java.lang.Thread.run(Unknown Source)
I'm having an issue with the DataBufferInt import. It's telling me to change the pixels type to DataBufferInt instead of int[]. My code is identical to yours, but I'm getting this error and you aren't. Help!? lol
Adding onto iemandmetgeenhoofd's comment(top comments), add thread.start(); in the private void start() method in Display. And a something cool, change pixels[i] = screen.pixels[i]; in the render method(not class) to pixels[i] = screen.pixels[1]; for a randomly colored screen :D
Thanks for the good guide, but, when i debug i only get pixels from the right top corner to bottom left, why? and its in the square only that is a line.... AND when i do as u doing in tutorial 4.5 so it prints all the pixels in the consol, it says that they have do all the pixels, but it havent....
help i'm getting a problem with the code. on this line of code: "for (int 1 = 0; 1<WIDTH * HEIGHT; 1++) {" it says that the 1 after int has a "Syntax error on token "1", invalid VariableDeclaratorId" i don't know why!
@TH3CHERNO so I write all ur code and I start the program (their is no errors on screen besides the yellow caution things u have at the end of the video on the public void stop, public void start and private Render render) I don't understand y when I start it, it just shows the same window, it is still gray as it was when it was first created, no black screen or pixels what so ever! So please just post the file in the description for the code would be so much easier for all of us having problems
omg plz he;p im same as capnsquishy!!! i got no errors and im on mac eclipse!!!
can u plz pm me a download of ur code so i can plz fix my errors?? and btw u dont know how much java ive learned from these 4 vids so far!! plz i cant go on till i fix problems!!!!! thx!
If there is any possiblility to get the code, to easier understand the wrongs in my code i would be very thankful... right now I have a hard time to see the wrongs I´ve checked through the comments and nothing off those wrongs is my wrongs... plz if u could be kind to pm me the code i would really help me out
Hey jerk! thanks for explaining how to get the frikkin grid maker plugin! I went all over Timbucktoo to find the thing... You should really mention how to get it in your videos
The point of this vid is to help u. If u dont know anything about visit java tutorial page in first vid or listen and try to understand how he explains it. You cant just ask him for the coding of his own game.
Hi I have now watched the video through 3 times now, and I have written the same code as you have, and I don't get any render, only an empty frame. why is that ?
@Th3CHERNO I have copied the code exactly I have checked multiple times and can't figure out whats wrong I just have my white box from before but no pixels if you could help it would be great. P.S. Great tutorials so far =)
mine says "Cannot cast from WritableRaster to DataBufferInt" an the code underlined is "pixels = ((DataBufferInt)img.getRaster()).getData();" What is wrong?
Hey, Everything wendt without any problems before this tutorial, I have looked trhrough and compared your andm ine code and cant find any differences and mine renders a diagonal line :( Plz help?
@THE3CHERNO Hey dude, I really need your help, I have everything you have in your video, however my Java screen isn't showing the pixels, please help, I really love your videos and I never will stop! Please help! Thanks.
Exception in thread "Thread-2" java.lang.ArrayIndexOutOfBoundsException: 65536 at com.mime.mineblock.graphics.Render.draw(Render.java:21) at com.mime.mineblock.graphics.Screen.render(Screen.java:19) at com.mime.mineblock.Display.render(Display.java:80) at com.mime.mineblock.Display.run(Display.java:57) at java.lang.Thread.run(Thread.java:722)
blah..... not working for me..... code check! just a suggestion... can u copy and paste the code into the description after each video? then it's easier to see something we can't see even on HD in the video. Thanks!
In your 4.5 video i put the System.out.println("x: " + x + " y: " + y); in the render class. but when it runs i still get a white screen and in the console it only says "running..." not the desired y and x coords. i think my render file isnt getting used in the display class. PLEASE HELP
Cool. I initially had problems displaying the 256x256 colours, but after going through the video again scratching my head, i realised that I had not seen the portion which explains not to activate tick() and render() more than once by using "while (running) { tick() render() }. works now :-)
It is not giving me the pixel thingy instead it says: what does it mean? Please help
Exception in thread "Thread-3" java.lang.ArrayIndexOutOfBoundsException: 1600 at com.games.Minergame.graphics.Render.draw(Render.java:20) at com.games.Minergame.graphics.Screen.render(Screen.java:21) at com.games.Minergame.Display.render(Display.java:75) at com.games.Minergame.Display.run(Display.java:58) at java.lang.Thread.run(Unknown Source)
When i start mine the window changes color between black and white really fast like it's flickering and i cant see any pixels. any ide what im doing wrong?
when i debug i get com.mine.minefront.Dispaly.at localhost:####(may be out of synch) in desplay line 30 and line 90 i checked it over and over again looks exactly the same as urs... :/ any possible solutions i would like to continue
Im getting an error with the Graphics g =bs.getDrawGraphics(); Watched the tutorial over and over again. Can't see what im doing wrong... I sent you an eMail, hope i can get help, nice tutorials btw :D
Awesome Video Tutorial! Can't believe Im done with Video 4 already. Only issue I had was that in the Display class I had: pixels[i] = screen.pixels(i); and it should have been pixels[i] = screen.pixels[i];
for your draw method, it is redundant to pass in a render object as a parameter. Each object of the Render class has it's own set of local variables. It's like saying:
"Exception in thread "main" java.lang.Error: Unresolved compilation problems: Type mismatch: cannot convert from DataBufferInt to int[] The method getData() is undefined for the type DataBuffer"
@TH3CHERNO Getting Error "Exception in thread "Thread-3" java.lang.ArrayIndexOutOfBoundsException: 2 at engine.running.graphics.Render.draw(Render.java:19) at engine.running.graphics.Screen.render(Screen.java:17) at engine.running.Display.render(Display.java:66) at engine.running.Display.run(Display.java:36) at java.lang.Thread.run(Thread.java:662)
This has been flagged as spam show
Me also... Eclipse keeps saying it is an unreachable code!!!! Graphics g = bs.getDrawGraphics(); is the code
PLZ help!!!
HaloMaster287 15 hours ago
Eclipes is saying
Graphics g = bs.getDrawGraphics();
is an unreachable code
PLZ HELP!
18BeSLick 19 hours ago
YESSSSSSSSSS I WORKED THANKS LOVIN THE TUTORIALS message me if you guys need help :P
ocarinatyphoon 1 day ago
Hey, I get everything right but the image wont show up on the screen
jcben9 1 day ago
Eclipse keeps tellling me this:
Graphics g = bs.getDrawGraphics();
is unreachable code. Can someone please help, ive even tryed googling it but cant figure it out
ZakisbackMC 1 day ago
can someone who got all this code right post it somewhere for us to check ours by? This is just frustrating as hell
pancakesimone 3 days ago
hmmmm i only get blue and green pixels...
pancakesimone 3 days ago
i have an error on render pixels pls help
pixels[xPix + yPix * width] = pixels[x + y * render.width];
666DemonThe 6 days ago 3
@666DemonThe so do I. does it say y cannot be a variable? and the same for x?
xXGamingDawsonXx 2 days ago
@666DemonThe That is an array index out of bound exception I'm assuming, I'm trying to figure that one out now.
HDStaticz 5 hours ago
I did everything you typed here and i get errors that i cannot change from boolean to int and there is no syntax for that. i keep getting errors with render. FUCK THIS.
nadenessnick 6 days ago
I ment how do I manually import it? Cuz when I type that on the top it still has the red line under the ((DataBuffer stuff.
47KGB 6 days ago
how do i manually import the DataBufferInt????? D: please help me
47KGB 6 days ago
@47KGB Just type: "import java.awt.image.DataBufferInt;" at the top of the Display class where all your other imports are, just like I did. :)
TH3CHERNO 6 days ago
I'm getting a problem. two of the times I've used the pixels code, it says I'm missing a variable.
HhipsterVlogz 6 days ago
myn wont start :S:S:S
Zorkoyd9 1 week ago
public Display() { screen = new Screen(WIDTH, HEIGHT); img = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB); pixels = ((DataBufferInt)img.getRaster.().getDataBuffer()).getData(); }
for img.getRaster can't resolved or is not a field.
Hedgoeg 1 week ago
@Hedgoeg There is a "." between getRaster and the ()
zenach48 6 days ago
For those of you have a grey window popping up with no sign of errors double check to make sure you put "thread.start();" after "thread = new Thread(this);" and it should fix the problem.
notenoughclearance 1 week ago
@notenoughclearance yes I did that but it don't work
dennan98 1 week ago
@T3CHERNO
I copied your code to what seems like verbatim, and I have two less warnings than you. I debug the program, and I find out that the program isn't drwaing any pixels; the form is completely blank. The warings that I have are at the lines where it says, "private Render render;" sayig "The field Display.render is never read locally"; and "private void stop() {" saying "The method stop() from the type Display is never used locally". I have no other warnings. What should I do to fix this?
PsytranceMan777 1 week ago
There are an error when I trying to run it, it says:
Exception in thread "Thread-3" java.lang.NullPointerException at com.sshoot.spaceshooter.Display.render(Display.java:79) at com.sshoot.spaceshooter.Display.run(Display.java:59) at java.lang.Thread.run(Unknown Source)
dennan98 1 week ago in playlist 3D Game Programming in Java
dous the game includes an multiplayer at the end ??
McEpicVlog 1 week ago in playlist 3D Game Programming in Java
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 65536
RagingTriton 1 week ago
haha, so happy i got here, i've done a run through of your videos twice, this time was perfect,
thanks, and i'm definitely going to carry on until the bitter end!! :)
sexdrugsandrave 1 week ago
i can't fit my errors in the 500 char limit box :/ must of done something wrong
sexdrugsandrave 1 week ago
for those of you with the problem whereas you get nothing but a whiteish screen don't forget to call game.start in the main method.
ultimatedorkwad 1 week ago in playlist 3D Game Programming in Java
I have a black screen :Z
ArielTetenboim 1 week ago
OMG I GOT THE x wrong to y lol
Williaml9518 1 week ago
Exception in thread "Thread-2" java.lang.ArrayIndexOutOfBoundsException: 65536 at com.mime.mineblock.graphics.Render.draw(Render.java:21) at com.mime.mineblock.graphics.Screen.render(Screen.java:19) at com.mime.mineblock.Display.render(Display.java:72) at com.mime.mineblock.Display.run(Display.java:57) at java.lang.Thread.run(Thread.java:722)
Williaml9518 1 week ago
Mine didn't work all I got was a black screen!
ThatGamer42 1 week ago
help!
it doesnt draw and i get this error :(
Exception in thread "Thread-3" java.lang.ArrayIndexOutOfBoundsException: 65536 at com.mime.TDGame.graphics.Render.draw(Render.java:21) at com.mime.TDGame.graphics.Screen.render(Screen.java:19) at com.mime.TDGame.Display.render(Display.java:73) at com.mime.TDGame.Display.run(Display.java:58) at java.lang.Thread.run(Unknown Source)
shanedaman112 1 week ago
mine isn't working.
TutorialMonster100 1 week ago
been getting same problem no pixels these are the errors
at com.mime.minefront.display.start(display.java:39) at com.mime.minefront.display.main(display.java:97)
bobloony8 2 weeks ago
I have copied everything correctly but when i run i get blank screen w/ no pixels. I have no errors and 1 warning " The value of the field Display.render is not used" please help!
SethBowdenn 2 weeks ago
@SethBowdenn ok for those who are having issues getting the pixels to show once you run the program check your code for any misplaced "()" or ";"
I found my issue was under "public void run() {" I put "while(running);{" the ";" after the word (running) does not belong because it is a while statement.
only took an hour to notice that error.... got to love programming!!!
SethBowdenn 2 weeks ago
Could anyone help?
I can't see the pixels, but only gray on the applet.
Chillers1337 2 weeks ago
I seriously didn't understand NOTHING in this video :(
umcarainteressante 2 weeks ago in playlist 3D Game Programming in Java
Real men put createBufferStrategy(10);
drewholt1 2 weeks ago
is there an HD version of the video
TechnologyGeekify 2 weeks ago in playlist More videos from TH3CHERNO
PLEASE SOMEONE HELP HIS TEXT QUALITY IS SHIT!
TechnologyGeekify 2 weeks ago in playlist More videos from TH3CHERNO
@TechnologyGeekify Do Control + It zooms in make sure your quality is at 720p!
ThatGamer42 1 week ago
dude, I cant see the text and I cant hear what your saying.
I got the first class and All the code could have been simplified.
~official youtube critic
TechnologyGeekify 2 weeks ago in playlist More videos from TH3CHERNO
Exception in thread "Thread-2" java.lang.ArrayIndexOutOfBoundsException: 65536 at net.byo.src.Graphics.Ga.draw(Ga.java:36) at net.byo.src.Graphics.Gb.render(Gb.java:19) at net.byo.src.A.render(A.java:77) at net.byo.src.A.run(A.java:92) at java.lang.Thread.run(Unknown Source)
Error I Get When Debugging
fuj1nman1 2 weeks ago in playlist 3D Game Programming in Java
I have copyed the code and I just have the normal white screen without the pixels please help anyone :)
CleanPawnege 2 weeks ago in playlist 3D Game Programming in Java
I'm having an issue with the DataBufferInt import. It's telling me to change the pixels type to DataBufferInt instead of int[]. My code is identical to yours, but I'm getting this error and you aren't. Help!? lol
kevlam585 3 weeks ago
@kevlam585 nvm, just needed an extra set of (). word.
kevlam585 3 weeks ago
Help i cant see the windows that opens. It just doesnt open :( Help me
CydexaN 3 weeks ago
when i click debug nothing even opens up i have the spinning loading circle next to my mouse but nothing opens up
TheLazerLump 3 weeks ago
why I get an error when I write: screen = new Screen(WIDTH, HEIGHT);
12:30
TheDgdc 3 weeks ago
hey please help i get a white screen is it because i set it in 2d how do i change it thanks
Blackpheonicx 4 weeks ago
This code is already really messy, and quite flawed o.0
CDJSnede 1 month ago
in render.java it says y cannot be resolved as a variable
MiradoSamurai 1 month ago
Ummm... on Macintosh "img = new BufferedImage[WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB];" isn't working please help
ilovehpwands 1 month ago
its doesnt work for me, just a blank white screen.
xKevin117x 1 month ago
at screen.render();
it is saying i have a unreacheble code now i know what unreacheble code is but i do not know how to fix it!
xxXshadowclawXx 1 month ago
Adding onto iemandmetgeenhoofd's comment(top comments), add thread.start(); in the private void start() method in Display. And a something cool, change pixels[i] = screen.pixels[i]; in the render method(not class) to pixels[i] = screen.pixels[1]; for a randomly colored screen :D
TheNickMead 1 month ago
Comment removed
TheNickMead 1 month ago
pls use another screen recorder..
relayism 1 month ago
I got a NullPointerException even though I copied ALL the code! HELLLLPPPPPP!
UltraGamer641 1 month ago
is that a 0 or O in g.drawImage cuz 0 works but O doesn't help?
TheJrd2000 1 month ago in playlist 3D Game Programming in Java
can u put a download link, pls? :D
GermanXNATutorials 1 month ago in playlist 3D Game Programming in Java
I GOT NO ERRORS,ALL I GOT WAS A WHITE SCREEN
robocos987 1 month ago
Could you post the code somewhere so we could go back through it to check for mistakes?
FitzBombz 1 month ago 9
ok, so i ifxed the pixels problem, but i keep getting a black scren?! help D=
Quanose1 1 month ago
in my Display.java it KEEP FREGGIN SAYING: pixels cannot be resolved to a variable, PLEEEEEEEEEEEEAAAAAAAASSSSSSSSSSSEEEEEE help me -.-
Quanose1 1 month ago
HELP! : ok so on my Screen.class, dow under the super(width, height) it is saying that my:
test.pixels(i) = BLAH has to be a variable, PLEASE HELP!!
Quanose1 1 month ago
@Quanose1 Are you sure it is (i) and not [i], because if it was (i), it should be [i].
HDStaticz 5 hours ago
This has been flagged as spam show
Thanks for the good guide, but, when i debug i only get pixels from the right top corner to bottom left, why? and its in the square only that is a line.... AND when i do as u doing in tutorial 4.5 so it prints all the pixels in the consol, it says that they have do all the pixels, but it havent....
BuqUwHizUkI 1 month ago
Comment removed
BuqUwHizUkI 1 month ago
Comment removed
BuqUwHizUkI 1 month ago
help i'm having another problem. on line: "Graphics g = bs.getDrawGraphics();" it has the Unreachable Code" error! idk why!
SilentAero7 1 month ago
@SilentAero7 hi i have the sam prob did u get a fix??
MinecrafterGuide 2 weeks ago
help i'm getting a problem with the code. on this line of code: "for (int 1 = 0; 1<WIDTH * HEIGHT; 1++) {" it says that the 1 after int has a "Syntax error on token "1", invalid VariableDeclaratorId" i don't know why!
SilentAero7 1 month ago
@SilentAero7 You can't name an int variable 1. Rename it to some sort of letter.
I think you might have mixed up the i and the 1 on the screen when he was typing it out.
TastyMunky 1 month ago
@SilentAero7 You can not have a variable with a name starting with a number.
HDStaticz 5 hours ago
Hey, could you also send the code to me, cuz I have a problem in my code, but I don't know what. It's something with "render" and "stop". Thanks
MysterixiFy 1 month ago in playlist 3D Game Programming in Java
@TH3CHERNO so I write all ur code and I start the program (their is no errors on screen besides the yellow caution things u have at the end of the video on the public void stop, public void start and private Render render) I don't understand y when I start it, it just shows the same window, it is still gray as it was when it was first created, no black screen or pixels what so ever! So please just post the file in the description for the code would be so much easier for all of us having problems
imapenguin411 1 month ago
@imapenguin411 Did you make sure that in the Display class under the render method, that after the if(bufferedstategy == null) return;
Make sure that you have this:
screen.render();
mylifeprogrammer 1 month ago
If you don't, no pixels will ever initialize
mylifeprogrammer 1 month ago
i got the titel and no pixels
i had an animation but when i did what you did it all went to shit
so i got wrid of the new code adn wached all of the tuts and itt stil dont work
can you PM me the codeor somethng
HyperPluwShooter 1 month ago in playlist 3D Game Programming in Java
omg plz he;p im same as capnsquishy!!! i got no errors and im on mac eclipse!!!
can u plz pm me a download of ur code so i can plz fix my errors?? and btw u dont know how much java ive learned from these 4 vids so far!! plz i cant go on till i fix problems!!!!! thx!
- Finn
theskells3 1 month ago
If there is any possiblility to get the code, to easier understand the wrongs in my code i would be very thankful... right now I have a hard time to see the wrongs I´ve checked through the comments and nothing off those wrongs is my wrongs... plz if u could be kind to pm me the code i would really help me out
benjarbk 1 month ago
Hey jerk! thanks for explaining how to get the frikkin grid maker plugin! I went all over Timbucktoo to find the thing... You should really mention how to get it in your videos
TheLukeShow84 1 month ago
The point of this vid is to help u. If u dont know anything about visit java tutorial page in first vid or listen and try to understand how he explains it. You cant just ask him for the coding of his own game.
iSavageSoH 1 month ago
I also had a white screen. Inside your start() function make sure you make a call to run()
guided1 1 month ago in playlist 3D Game Programming in Java
Can you put your code so far into a link please, cause ive just lost everything? @TH3CHERNO
vid2vid98 1 month ago
I get an "Unreachable code" error at "Graphics g = bs.getDrawGraphics();"
Any suggestions?
Mareqalz 1 month ago
hello, i tried this it just gives me a blank screen can you message me the code for all three pages.
johnm117 1 month ago
when I click debug, it suspends on: super(width, height); in Screen.java and test.pixels[i] = random.nextInt(); also in Screen.java
DuckThom 1 month ago
@DuckThom Same With Me!!
TheRocketmonster 1 month ago in playlist More videos from TH3CHERNO
Guys, the solution is easy :) Underneath thread = new Thread(this); in your start method just write thread.start();
I hope this works for you too :D
KingEndon1 2 months ago in playlist 3D Game Programming in Java
Comment removed
jtfyou 2 months ago
I have a question is it good when i get diagonal lines in different colors
iemandmetgeenhoofd 2 months ago
Comment removed
WeThreeCreepers 2 months ago in playlist 3D Game Programming in Java
check if you have thread.start(); I forgot this little line of code and had a blank screen!
iemandmetgeenhoofd 2 months ago 5
Omg 8 hours of rewriting and I finally have PIXELS!!!
freakofnature1241 2 months ago in playlist Uploaded videos
could you PM me the code plz its giving me a blank screen
slymodi 2 months ago
I have zipped my working code while following the tutorial till this episode here files.nigel.jp/Minefront_4.zip goodluck
Pindamann 2 months ago
@Pindamann thanks a bunch.
camarenalove 1 month ago
Hi I have now watched the video through 3 times now, and I have written the same code as you have, and I don't get any render, only an empty frame. why is that ?
MrChaos28 2 months ago
15:30 Just a reminder for my self where i whas.. xD
CharlieboiiGaming 2 months ago
i'm using the exact same program, I have the exact same code. I just get a frame with the game title and inside it blank. Please help!
wonnorcakes 2 months ago
on line 70 it jusr says that void is a invalid type for the variable main. can anybody help me?
fancyman3553 2 months ago in playlist 3D Game Programming in Java
EVERYONE WITH RENDERING PROBLEMS!
Check the line that says img = new bufferedImage with all the parameters and make sure it says
TYPE_INT_RGB
not TYPE_INT_ARGB
that fixed mine....
and dont forget screen.render right after creating the buffer strategy
xMachinimakersx 2 months ago
@Th3CHERNO I have copied the code exactly I have checked multiple times and can't figure out whats wrong I just have my white box from before but no pixels if you could help it would be great. P.S. Great tutorials so far =)
ceezo1611 2 months ago in playlist Uploaded videos 6
mine says "Cannot cast from WritableRaster to DataBufferInt" an the code underlined is "pixels = ((DataBufferInt)img.getRaster()).getData();" What is wrong?
TheOriginalPentiva 2 months ago
@TheOriginalPentiva Never mind I changed it back to what it was before and refreshed Eclipse and that has worked
TheOriginalPentiva 2 months ago
@TheOriginalPentiva pixels = ((DataBufferInt)img.getRaster().getDataBuffer()).getData(); not pixels = ((DataBufferInt)img.getRaster()).getData();
freakofnature1241 2 months ago in playlist Uploaded videos
Can someone please send me the source because I have tried everything and its still not working.
mustardftw 2 months ago
@mustardftw Yea me too, if anyone has a source code up to this point, THAT WORKS! Please send it to us. It would be greatly appreciated.
freakofnature1241 2 months ago in playlist Uploaded videos
Also for test.pixels[i] = random.nextInt(); it says for the "i" in the "[]" "i cannot be resolved to a variable." Any idea?
freakofnature1241 2 months ago
Black screen, but only 1 pixel. :/
freakofnature1241 2 months ago
Hey, Everything wendt without any problems before this tutorial, I have looked trhrough and compared your andm ine code and cant find any differences and mine renders a diagonal line :( Plz help?
MartinAntonsenHere 2 months ago
@THE3CHERNO Hey dude, I really need your help, I have everything you have in your video, however my Java screen isn't showing the pixels, please help, I really love your videos and I never will stop! Please help! Thanks.
Minerstation 2 months ago in playlist 3D Game Programming in Java
Keep the hard work up!
DavidREntwistle 2 months ago
@TH3CHERNO Could you take a look at my code? I took the video and paused it, checked the code line by line, and still a white screen.
Capnsquishy 2 months ago
I've no errors, just a white screen.
Capnsquishy 2 months ago
@TH3CHERNO Curious question, I'm running eclipse on my Macintosh and it doesn't render the pixels for me. Do they work differently?
Capnsquishy 2 months ago
@Capnsquishy Nope. Same code on Mac should be fine... make sure you have the EXACT code written down that I wrote!
TH3CHERNO 2 months ago
@TH3CHERNO Could you send me the exact code you've written in a PM or something? :P
My pixels won't generate either, I think I'm missing something so could I have your code?
yystudios 2 months ago
This has been flagged as spam show
@TH3CHERNO HELP I GET ERROR:
Exception in thread "Thread-2" java.lang.ArrayIndexOutOfBoundsException: 65536 at com.mime.mineblock.graphics.Render.draw(Render.java:21) at com.mime.mineblock.graphics.Screen.render(Screen.java:19) at com.mime.mineblock.Display.render(Display.java:80) at com.mime.mineblock.Display.run(Display.java:57) at java.lang.Thread.run(Thread.java:722)
Williaml9518 1 week ago
woops! forgot to type game.start(); lol...
snickers10m 2 months ago
blah..... not working for me..... code check! just a suggestion... can u copy and paste the code into the description after each video? then it's easier to see something we can't see even on HD in the video. Thanks!
snickers10m 2 months ago
Why do I not get an answer on my question?
Please, I realy want to know, what that means...
BurgerKingHarkinian 2 months ago in playlist 3D Game Programming in Java
In your 4.5 video i put the System.out.println("x: " + x + " y: " + y); in the render class. but when it runs i still get a white screen and in the console it only says "running..." not the desired y and x coords. i think my render file isnt getting used in the display class. PLEASE HELP
youfun11 2 months ago
Why is it yPix +xPix * height and not width * height?
I don't get it..
BurgerKingHarkinian 2 months ago
This has been flagged as spam show
Can you post me the code (PM ME) cuz when i run it, it comes up with the frame and the game name, WITHOUT the pixels :(
47KGB 2 months ago
This has been flagged as spam show
Can you post me the code (PM ME) cuz when i run it, it comes up with the frame and the game name, WITHOUT the pixels :(
47KGB 2 months ago
This has been flagged as spam show
Can you post me the code (PM ME) cuz when i run it, it comes up with the frame and the game name, WITHOUT the pixels :(
47KGB 2 months ago
Or do java.awt.image.*; :3
daymond12345 2 months ago in playlist 3D Game Programming in Java
Can you post me the code (PM ME) cuz when i run it, it comes up with the frame and the game name, WITHOUT the pixels :(
47KGB 2 months ago 12
@47KGB i have the same problem
youfun11 2 months ago
@youfun11 so do i
monster24energy 2 months ago in playlist Favorite videos
@47KGB same :(
smartdog96 2 months ago
@47KGB @TH3CHERNO Can u pm the the code you have so far in this video, please i get lots of errors and i dont know how i fix them
Thanks
AiiZiCkCinema4D 1 month ago in playlist 3D Game Programming in Java
I just get "DataBufferInt cannot be resolved to a type" when i do ((DataBufferInt)img.getRaster().getDataBuffer());
DecimateeGamingg 2 months ago
@DecimateeGamingg you have to type ((DataBufferInt)img.getRaster()).getDataBuffer();
youfun11 2 months ago
@youfun11 ayh thanks :)#
DecimateeGamingg 2 months ago
help? my window just is white with no pixels on it please help i dont know whats wrong i get no errors
DCodeMast3r 2 months ago 14
@DCodeMast3r Same here its being a tard
TheLukeShow84 1 month ago
Cool. I initially had problems displaying the 256x256 colours, but after going through the video again scratching my head, i realised that I had not seen the portion which explains not to activate tick() and render() more than once by using "while (running) { tick() render() }. works now :-)
Danmansonman 2 months ago
It is not giving me the pixel thingy instead it says: what does it mean? Please help
Exception in thread "Thread-3" java.lang.ArrayIndexOutOfBoundsException: 1600 at com.games.Minergame.graphics.Render.draw(Render.java:20) at com.games.Minergame.graphics.Screen.render(Screen.java:21) at com.games.Minergame.Display.render(Display.java:75) at com.games.Minergame.Display.run(Display.java:58) at java.lang.Thread.run(Unknown Source)
alex1234567899100 2 months ago
please help when i run it all i get is the window i dont get the pixels or anyblack areas? please help anyone thank you!
gamermastery01 2 months ago
Sorry i don't know what when wrong, but i didn't even get a screen is it maybe that i'm using Eclipse EE? Please Reply!
rambolikesCOD 2 months ago in playlist Favorite videos
Your render settings are a bit... wacky. All the things you do lag behind for a second or two and then pop into place...
TheSmooveFan 2 months ago
On line 27 pixels = ((DataBufferInt) img.getRaster()).getData();
it gives me an error saying
"Cannot cast from WritableRaster to DataBufferInt"
any help???
screamz332 3 months ago
When i start mine the window changes color between black and white really fast like it's flickering and i cant see any pixels. any ide what im doing wrong?
Ve0nz 3 months ago
when i debug i get com.mine.minefront.Dispaly.at localhost:####(may be out of synch) in desplay line 30 and line 90 i checked it over and over again looks exactly the same as urs... :/ any possible solutions i would like to continue
tuckstaer 3 months ago in playlist More videos from TH3CHERNO
Oh, btw, its at the part where we typed createBufferStrategy(3);
302MineCrafter 3 months ago in playlist 3D Game Programming in Java
I got an error. Here it is.
Exception in thread "Thread-3" java.lang.IllegalStateException: Component must have a valid peer
Explain.
302MineCrafter 3 months ago in playlist 3D Game Programming in Java
Im getting an error with the Graphics g =bs.getDrawGraphics(); Watched the tutorial over and over again. Can't see what im doing wrong... I sent you an eMail, hope i can get help, nice tutorials btw :D
TheTobijes 3 months ago
Awesome Video Tutorial! Can't believe Im done with Video 4 already. Only issue I had was that in the Display class I had: pixels[i] = screen.pixels(i); and it should have been pixels[i] = screen.pixels[i];
Kikode2005 3 months ago
for your draw method, it is redundant to pass in a render object as a parameter. Each object of the Render class has it's own set of local variables. It's like saying:
object.doSomeAction(object);
Hope this will help future coding practices
twoofakindmagic 3 months ago in playlist 3D Game Programming in Java
remember to write the right code and excactly the same as in the video
gfxchatforum 3 months ago
@gfxchatforum cant see half the video :P
pianoman112233 3 months ago
is this bit right i couldn't see it :/
pixels = DataBufferImg(img.getRaster().getDataBuffer().getData());
it says there is an error but the video quality is bad
pianoman112233 3 months ago
I get a blank screen! HELP!
superawsomeluigi 3 months ago 2
@TH3CHERNO Getting Error:
"Exception in thread "main" java.lang.Error: Unresolved compilation problems: Type mismatch: cannot convert from DataBufferInt to int[] The method getData() is undefined for the type DataBuffer"
pls help
hallo85245699 3 months ago
@TH3CHERNO Getting Error "Exception in thread "Thread-3" java.lang.ArrayIndexOutOfBoundsException: 2 at engine.running.graphics.Render.draw(Render.java:19) at engine.running.graphics.Screen.render(Screen.java:17) at engine.running.Display.render(Display.java:66) at engine.running.Display.run(Display.java:36) at java.lang.Thread.run(Thread.java:662)
" When attempting to run after this...
ctx94 3 months ago
source code plz
xXEpicTomatoXx 3 months ago
Im not geting the full pixels im just geting one littel part plz help
minecrafter905 3 months ago in playlist 3D Game Programming in Java
i got it to run but not pixels render plz help
minecrafter905 3 months ago
HEy, im getting an exception, a nullpointerexception, and as far as im aware, i have followed all instructions.
I have checked that i have initialised the variable, and changed the names, then it redirects me to the Screen class.
matthewj234 3 months ago
Good videos, man.
jasejunk 3 months ago
if you get a black screen its probably because yo put > instead of < at the for loop in screen
Thumbs up!
Darkzlime 3 months ago
mine didn't work?
CraftGames 3 months ago
Yay I fixed my issue!
I hadn't set up the threads properly.
TheCheddar97 3 months ago
For some reason on my mac and pc it doesn't render the pixels help!
Magnamite9 3 months ago in playlist 3D Game Programming in Java
This has been flagged as spam show
Did you get an email from masterfrijoles@gmail.com cherno? I attached my source cuz they don't render the pixels
MasterFrijoles 3 months ago
do you like have to use canvas at all?
DrFrijoles 3 months ago