Hey i need help, I've been watching your vid's and trying to code a game (no shit) But i have a problem with when i am done with this part and start my "game," i see the white window and then my computer crashes. So plz help or reply ;(
i agree that this is very confusing because im pretty new to java and all these packages but once your reading the code it makes sense im getting errors on this but the page still opens the only errors are the feild component .height is not vilible along with the width
I went this far, but when I run the empty frame eclipse, it spams the console with about 10 errors a second: java.lang.IllegalArgumentException: timeout value is negative.
This is obviously due to the sleep time at GameCanvas being negative, but I did everything you said. I'm on linux if that helps.
Dear Java tutorial - Making a 2D game part 2 Bones-underground is a 2d mmorpg. It is absolutely free to play indefinately. We offer a great community, a place where you can become rich and famous, or just hang out with a few friends. We have hundreds of weapons and armors to choose from. You may want to get a pet, or maybe do a little fishing and heaps more game play on my profile and link!!!
@bikenb1 I would advise getting a program called eclipse, google it and i am sure you will find it. It lets you run, write and some other stuff with code. It also shows you which line your errors and in and ect. Not sure how late this is, being 2 months later, but hope I helped!
GameBot, a hardware-based type bot, doesn't make any trace on the game server unlike the other software-based program that you can easily download on the internet. so,NEVER worry about the delete of your account!
@odv000 I understand what your saying, although this is designed so that I can be re-used for many purposes. Java has great garbage collection and less places to go wrong...memory leaks in C etc. SDL is a great API I agree and use it on my C++ projects.
@odv000 And what u think SDL's Lines codes are? Longer, its just pre-made this is a full how to make it from scratch without an extra SDK, becauwe for SDL you need a run-time, for this you don't need one ;)
of coarse sdl app need external rtl, which do all work, but come on java app needs whole virtual environment to run. i mean every time you do something like c=a+b this is external library (virtual machine) do actual work
When you're doing games and so, it's always a better idea to declare all of your instances & variables as global and then initialize them when you need too. ;)
'Tis a very fine tutorial. I read a book online and I understood what you were doing, even if I haven't quite grasped all the code yet. It'll come.
AOF84E 1 month ago
Hey i need help, I've been watching your vid's and trying to code a game (no shit) But i have a problem with when i am done with this part and start my "game," i see the white window and then my computer crashes. So plz help or reply ;(
0110miki 1 month ago
i agree that this is very confusing because im pretty new to java and all these packages but once your reading the code it makes sense im getting errors on this but the page still opens the only errors are the feild component .height is not vilible along with the width
MrJohnboyofsj 2 months ago
I went this far, but when I run the empty frame eclipse, it spams the console with about 10 errors a second: java.lang.IllegalArgumentException: timeout value is negative.
This is obviously due to the sleep time at GameCanvas being negative, but I did everything you said. I'm on linux if that helps.
Thanks in advance.
lvbomars1 3 months ago
Isn't it inefficient to call window sizes twice, the background twice, and such?
LiteCloudServ 6 months ago
This has been flagged as spam show
Dear Java tutorial - Making a 2D game part 2 Bones-underground is a 2d mmorpg. It is absolutely free to play indefinately. We offer a great community, a place where you can become rich and famous, or just hang out with a few friends. We have hundreds of weapons and armors to choose from. You may want to get a pet, or maybe do a little fishing and heaps more game play on my profile and link!!!
boneug 8 months ago
I have type code in a note pad but i dnt know whr to run..........I have run in cmd but there is lots of error...........
bikenb1 8 months ago
@bikenb1 I would advise getting a program called eclipse, google it and i am sure you will find it. It lets you run, write and some other stuff with code. It also shows you which line your errors and in and ect. Not sure how late this is, being 2 months later, but hope I helped!
NoobBitz 5 months ago
This has been flagged as spam show
GameBot, a hardware-based type bot, doesn't make any trace on the game server unlike the other software-based program that you can easily download on the internet. so,NEVER worry about the delete of your account!
pls visit our online shopping mall -> automouse2dotcom
automouse2dotcom 9 months ago
nice tutorial, but WTF java!
i heared many times java is simple it is object oriented, obvious and blah blah blah....
is this what they call simple!?
i mean i could do the same thing you just done with SDL with 10 lines of code!
odv000 11 months ago
@odv000 I understand what your saying, although this is designed so that I can be re-used for many purposes. Java has great garbage collection and less places to go wrong...memory leaks in C etc. SDL is a great API I agree and use it on my C++ projects.
Catkill666 11 months ago
@odv000 And what u think SDL's Lines codes are? Longer, its just pre-made this is a full how to make it from scratch without an extra SDK, becauwe for SDL you need a run-time, for this you don't need one ;)
C0d3Dr4g0n 10 months ago
@C0d3Dr4g0n
lol!
of coarse sdl app need external rtl, which do all work, but come on java app needs whole virtual environment to run. i mean every time you do something like c=a+b this is external library (virtual machine) do actual work
odv000 10 months ago
Most I do all to create a game :O?
nedde97 11 months ago
"javarpg#co#nr" , for some great java rpg tutorial => replace "#" by "."
eatMeification 1 year ago
Just want to say that this has been very helpful.
JulienBrightside 1 year ago
how can i use the quickfixes??
kevowitch1994 1 year ago
where can i download that java? I dont know
Sonicfan1024 1 year ago
@Sonicfan1024 java.com and search for downloads and for the JDK
Catkill666 1 year ago
@Sonicfan1024
New Developer Eh? HAHA! LINUX CAME WITH JDK 6!
NullDeveloper 6 months ago
at
long timeTaken = System.currentTimeMillis();
shouldn't it be
long timeTaken = System.currentTimeMillis()- beginTime?
timetaken is the time needed for update+render+draw..
or what is its purpose of this if im wrong?
TheRealRslive 2 years ago 2
Yes you are correct a tyyping error sorry :)
Catkill666 2 years ago
Okej so what you gota do is:
if(Buffer.contentsLost() == false)
maybe obvius idk...
AwsomeAnte 2 years ago
I dont see why the ! didnt work cause technically thats the same as == false
if its not lost then contents lost is not true hence false, realy weird is your JDK up to date?
Catkill666 2 years ago
dont think so, downloaded the lastest version for like1 month ago..
AwsomeAnte 2 years ago
It says operator ! cannot be applied to java.awt.Graphics
on this line:
if(!Buffer.contentsLost()){
WHY?!
It works for you but not for me?!
AwsomeAnte 2 years ago
When you're doing games and so, it's always a better idea to declare all of your instances & variables as global and then initialize them when you need too. ;)
TheNewIkast 2 years ago
Not necessarily id probaly end up using the same name and having problems inside my functions...tend to forget my variable names
Catkill666 2 years ago
Clearly you are new to programming because that is the worst idea. When you hit 30 years of programming like me, you will know why.
FrankRizzo6662 2 years ago
What using local variables? ive always been told to use them more than global
Catkill666 2 years ago
No, you are right, I was replying to TheNewikast. Globals should not be used.
FrankRizzo6662 2 years ago
@Catkill666 So was I... but only if your using it once. However if its being used as much as it is why not set it globally?
impulss86 1 year ago