Ulixava

30 bình luận trong “How to make a Java "3D" game? Part 1 of 5! "Getting Things Going With Rendering And Screen"

  1. Wow, C# and Java are really similar! if, IF you are still on youtube maybe make a bigger series in Java 8 on environment, items, health system and all that good stuff? It might rack you alot more views, subs and comments, eh?

  2. USING JRE 1.8.0 (full thing in https://stackoverflow.com/questions/54171913/unresolved-compilation-problems-in-tutorial-and-code-the-method-getgraphics )
    Exception in thread "Thread-2" java.lang.Error: Unresolved compilation problems:
    screen cannot be resolved to a type
    The method getGraphics() is undefined for the type Graphics

    at Component.render(Component.java:32)
    at Component.run(Component.java:46)
    at java.lang.Thread.run(Unknown Source)

  3. If you guys learn the language properly, then you'll be able to play with this code and make whatever you want easily. I suggest watching TheNewBoston's tutorial series on Java, it's very helpful!

  4. Great video! Very helpful but like everyone has said need better microphone and finish series, this is very helpful video in learning java… I know every other code language yet I never bothered to learn java! lol! Great video thoih very helpful highly recommend

  5. I made a better running method:@Override
     public void run() {
      long lastTime = System.nanoTime();
      double nsPerTick=1000000000D/60D;  int ticks = 0;
      int frames = 0;
      
      long lasTimer = System.currentTimeMillis();
      double delta = 0;
      
      while(isRunning)
      {
       long now = System.nanoTime();
       delta +=(now-lastTime)/nsPerTick;
       lastTime = now;
       
       while(delta >=1)
       {
        ticks++;
        tick();
        delta-=1;
       }
       
       try {
        Thread.sleep(2);
       } catch (InterruptedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
       }
       
       frames++;
       render();
       
       if(System.currentTimeMillis() – lasTimer >=1000)
       {
        lasTimer +=1000;
        System.out.println("Frames: " + frames +  " | Ticks: " + ticks + " " );
        frames = 0;
        ticks = 0;
       }
      }
     }
     
     public void render(){
      
     }
     
     public void tick(){
      
     }
    }

Trả lời

Email của bạn sẽ không được hiển thị công khai.