Added: 2 years ago
From: Catkill666
Views: 13,265
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (33)

Sign In or Sign Up now to post a comment!
  • '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.

  • 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.IllegalArgumentExcep­tion: 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.

  • Isn't it inefficient to call window sizes twice, the background twice, and such?

  • 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 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!

  • 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 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 ;)

  • @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

  • Most I do all to create a game :O?

  • "javarpg#co#nr" , for some great java rpg tutorial => replace "#" by "."

  • Just want to say that this has been very helpful.

  • how can i use the quickfixes??

  • where can i download that java? I dont know

  • @Sonicfan1024 java.com and search for downloads and for the JDK

  • @Sonicfan1024

    New Developer Eh? HAHA! LINUX CAME WITH JDK 6!

  • 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?

  • Yes you are correct a tyyping error sorry :)

  • Okej so what you gota do is:

    if(Buffer.contentsLost() == false)

    maybe obvius idk...

  • 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?

  • dont think so, downloaded the lastest version for like1 month 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?!

  • 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. ;)

  • Not necessarily id probaly end up using the same name and having problems inside my functions...tend to forget my variable names

  • 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.

  • What using local variables? ive always been told to use them more than global

  • No, you are right, I was replying to TheNewikast. Globals should not be used.

  • @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?

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more