I've been looking for a tutorial like this for a couple years, glad I finally found it. So many tutorials talk about the java language itself which bores me and I have to "try" and skip ahead but miss things. I'm already highly experienced in Java as a whole, just not game development. Thank you for making this. I will start watching and going through these in my free time. :)
Back to the start again. Going to redo all these tutorials probably will take less time then they did before and also will comment everything so I understand it. Today is the day I start a game not just props for a game :D
I recently started wondering if I would make a game engine just to have a better understanding of them. I always thought that you were awesome for always coding everything yourself. Yesterday I found your series, it may be a couple of years old but I'll still follow through everything ^^ Thank you for sharing your knowledge!
After hours of searching, I FINALLY found the problem. Even after updating drivers and looking up what version of Opengl my driver supported (which was 4.4) it still did not work. If you are having this problem you are most likely on a laptop. Apparently, on most laptops there are 2 GPU's: the Intel(R) HD Graphics one and the NVIDIA Geforce one. For most PC use, the onboard Intel graphics hardware is just fine. You will not notice a difference between onboard and discrete graphics when using desktop applications. There is a difference, however - integrated Intel graphics use much less power than NVIDIA graphics. By using the low-power onboard graphics when a high-power dedicated graphics card isn’t necessary, laptops can save power and increase battery life. When you launch an application that needs high-powered 3D graphics, such as a PC game, the laptop powers on the NVIDIA graphics hardware and uses it to run the application. This increases 3D performance dramatically, but takes more power - which is fine if your laptop is plugged into an outlet. When you go to Control Panel > Hardware and Sound > Device Manager > Display Adapters there you can see the two GPU's. The problem is that eclipse is run with the Intel GPU, which for me had Opengl version 3.1. When doing: Display.create(); String version = GL11.glGetString(GL11.GL_VERSION); System.out.println(version); I get " 3.1.0 - Build 9.17.10.2932" To make your pc use the NVIDIA GPU for Eclipse, go to Control Panel > Hardware and Sound > NVIDIA Control Panel > Manage 3D Settings: Option1: Either change "Preferred graphics processor" to "High-performance NVIDIA processor" to make your laptop always use the NVIDIA GPU. Option2: OR go to program settings > add > select the eclipse.exe in your eclipse installation folder and change "Preferred graphics processor" to "High-performance NVIDIA processor". Now I had a problem where the second option to only apply it for eclipse is not applied for some weird reason, so I just made my laptop use my NVIDIA GPU all the time. If you really don't want to do that you can right click the eclipse.exe and choose "Run with graphics processor" option. If anyone finds out why the second option does not work please tell me. When doing: Display.create(); String version = GL11.glGetString(GL11.GL_VERSION); System.out.println(version); I get "4.4.0 NVIDIA 344.48", you should now be able to make a new ContextAttribs(3, 2) without a problem.
I will show how to solve this problem if you use C++ and Windows. You can add these lines at the beginning of your main.cpp file. One line is for NVIDIA Geforce and another line is for AMD Radeon. After this your Exe file will use "High-performance NVIDIA processor" always. #include extern "C" _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; extern "C" __declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001;
Great job. I have no almost no prior java game coding knowledge, but so far this strongly motivates me to learn java. Also, you do a great job explaining so do understand this, even without knowing java, very well. Keep up the great work!
*Common Problems and Solutions:* If you get the following error: *org.lwjgl.LWJGLException: Could not create context (WGL_ARB_create_context)* or *Pixel format not accelerated* then your computer may not support the version of OpenGL that we're trying to use (version 3.2). Try removing the parameters from the *Display.create()* method and try again. You may have trouble on the later tutorials however, depending on exactly which version of OpenGL your computer supports. Also, in case you had annotations off, you need to do the ContextAttrib stuff all in *one line* like this: ContextAttribs attribs = new ContextAttribs(3, 2).withForwardCompatible(true).withProfileCore(true); If the display opens and closes straight away without an error then make sure you didn't miss the *!* in the *(!Display.isCloseRequested())* part.
+Geometry Dash Adrian That's exactly what this series is doing. In this tutorial series I've now covered almost all the OpenGL concepts that I used in Socuwan. In fact, a lot of the stuff I've shown in this series is better than in Socuwan because when I was implementing this stuff in Socuwan I was doing it for the first time.
Geometry Dash Adrian I only just uploaded episode 39 a couple of weeks ago :P The Opengl tutorials go out every 2 weeks, so the next one will be out tomorrow.
Just finished watching the whole video and thought it was great (I've only done simple pure java games), definitely can't wait for the next episode! Great job man
+Bandit Leader No. If you're switching to LWJGL 3, you would have to. But this tutorial series is still for version 2(.93). I'm still working with the "old" version myself, the major change in the newer one is that the developers thought it was becoming to big so they removed a few things. It's now e.g. using a different library for managing the display (GLFW) and there are some elements missing you would have to implement yourself (the mathmatical classes in the util package). Of course you can still use the "old" version, it's the same OpenGL, and you can follow this really awesome series easier.
+Geosearchef Please don't switch to LWJGL 3 because I was using that (LWJGL 3.0.0b build 64) until I got stuck in input camera. i can't get position normal or delta from the mouse class, so now I'm redoing all the work but with LWJGL 2.9.3 because the 3 version is a pain in the ass XD.
Wow, I'm amazed. For the 1st time ever, somthing showed in a programming tutorial I watched, works instantly without any errors xD I'm getting better at this!
With people getting errors with unsatisfiedLinkError, right click on the JRE System Library in the package Explorer (assuming your using eclipse) - build path -> configure build path then double click on the native library location, that will bring up an explorer window and just point it to your lwjgl -> natives -> windows. it did the trick for me. i'm using version 2.9.2. hope that helps.
Mac users: In the closeDisplay method in the DisplayManager class, remember to add a System.exit(0); just after Display.destroy(). If you do not do this, the display will linger and just be annoying.
This is one of the best set of video game tutorial creation videos I have ever seen. After watching this TheChernoProject Display method and this Display method I can see were a new screen method would fit in.
Doing these tutorials in c++ now. Got through the first 40 episodes before but now I feel like java isn't the encouraged language to make a game in because of the speed. Java is still my favorite language and I love these tutorials.
@@gravedigger7380 I don't think it's so hard to transform the code from Java to C++ cuz the opengl is basically the same and the steps are the same too. I think you just need a lil bit of logic :3
LOL this is my 4th time watching this series because I am trying to learn it rather than just copying it. I want to be a software engineer or developer when I go to university. Cheers!
Hi, I just found your channel by mistake but I'm very impressed with the two videos I've accidentally watched, will definitely be sticking around and whenever I've got free time I'll be watching these! Always wanted to learn how to do stuff like this but I'd only consider myself an amateur java programmer and as I don't play too many games a lot of the other tutorials I've had a quick skim through don't explain in much detail for people like me who don't really understand the whys and the hows. But yea thanks! Makes a nice change from banking software I have to deal with at work!
Hey - these look great, thanks so much for your efforts! A quick question before diving in: These were released in 2014. I see from some other comments (several years old themselves) that this material is still relevant, the main areas of concern being GFLW is used now for window display and input and for math we can use JOML. Is that still the case? I am a bit confused because some comments indicate that you are using version 2 of LWJGL but here in this first video you are using 3.0. Can I follow these with the latest release? Thanks for your input. Cheers :)
The main aim of the tutorials is to teach OpenGl. OpenGl is the API that allows us to render 3D graphics. In these videos I use OpenGL 3+, which is still relevant today (and I use for my games). LWJGL is the Java library that gives us access to the OpenGL API. It also handles other useful things, such as window creation and user inputs. In the videos I use LWJGL 2, but the current version available today is LWJGL 3. All the OpenGL code is the same, all the gamedev concepts I teach are still relevant, it's just the things specific to LWJGL 3 that are different. As mentioned, these primarily include setting up the display and handling user inputs. So if you can learn how to do those two things with LWJGL 3 elsewhere, then you can follow these tutorials for everything else.
I know a couple years have gone by but wanted to say thank you for this tutorial. You just gave me a reason to take another look into Java and experiment with Blender, LWJGL, and other stuff :)
Wait a second did u say by the time you get to tutorial 25 we will have terrain gen, lighting, 3rd person player, fog, skybox, multipul light sources and multiplayer ok this is way to much you are the best UA-camr ever it normally takes people 100 episodes just to set up a terrain :D
Woah, si j'arrive à m'accrocher à ce tutoriel je vais en apprendre plus sur Java et la création d'un jeu 3D que je ne l'aurais jamais imaginé ! Wonderful and brilliant, you just speak a little bit fast but that's really nothing, i can keep up the pace :D . Great work !
Hello! This is exactly the type of tutorial I would be incredibly interested in. However, before diving in, I wanted to ask if this is completely dependent on Java? I would much rather do all of this in C++!
+Frank Botos The majority of the code is OpenGL calls and GLSL shader code, which is pretty much the same in any language. The only big differences will be setting up the display and handling user inputs. I know that quite a few people have followed this tutorial series all the way through using C++.
Okay awesome! As long as it's stuff like mouse/keyboard input and window creation I believe I can figure that part out. Thanks a lot for sharing this knowledge, I am looking forward to learning!
Note that the author used the eighth java. In no case try to follow the instructions if you have a different Java, for example 16. I have been looking for the cause of the errors for a very long time, until I changed the Java to an older one.
why the actual HECK !! UA-cam didn't show this channel when i searched for OpenGL tutorials !!! take this UA-cam .I. , +1 sub , gold channel , a life saver . thank you
For those of you that get the "Could not create openGL context" error, call the Display.create() function with no parameters, then call GL11.glGetString(GL11.GL_VERSION); This will give you a string with your opengl version. You might not support opengl v3.2
カラス I'm getting this error but couldn't figure out how to fix it. However, the window opens just fine, with no errors, if I use Display.create(), with no parameters, instead of the PixelFormat and attribs version of it. I'm using a Linux Ubuntu 64bit, from a laptop (onboard videocard), if that information is useful.
@@ryanwilson5079 Hard to read but not really limiting as if you're good enough you could build any C++ program in machine or asm. Would take forever though and good luck reading it lol
I tried, and got the following error: Exception in thread "main" java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException at engineTester.MainGameLoop.main(MainGameLoop.java:20) Caused by: java.lang.ClassNotFoundException: org.lwjgl.LWJGLException at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 1 more I'm using java-11-openjdk.
So I'm started today to this series. I hope I learn something good and make my own game engine and games. Thank you so much for this tutorials man!!! :D
Don't know if you still read the comments, but I was wondering if this is still relevant? It seems like the best tutorial on UA-cam. Should I stick with lwjgl 2 or go to lwjgl 3? What are the benefits of one versus the other?
Try to follow it with lwjgl 3. I did this a while ago and besides from the first or maybe also second episode it works farely well Edit: Some resources: github.com/LWJGL/lwjgl3-wiki/wiki/2.6.6-LWJGL3-migration github.com/JOML-CI/JOML/wiki/Migrating-from-LWJGL-2
@@profiluefter Thank you very much. I will stick with LWJGL 2 for now because I am a noob at this, but I might switch over later. With exams and everything lately, I am only on episode 10 or so ;)
Thank you for this awsome tutorial !! :D im using java for a while now and just wanted to get started with Opengl and this is just perfect !!! thx !!! :D
Hello ThinMatrix,then all first I want to apologize for the possible mistakes, but I'm french and speaks some English.I followed this very complete tutorial(frankly, better findable on the net, GG!), and having small bugs (because being maniacal, I renamed all the classes and methods, so at the end its stuck more too :P), I decided to redo the tutorial.Small questions:- Is your tutorial is compatible in C++? Because OpenGL methods remain the same, should be just that I converted. - Is your tutorial compatible with OpenGL 4.5?- And, where is your documentation? I would be interested.Thank you for your future answers,Best regards,ShE3py.
Yes, the majority of the code will be very similar in C++, with basically all the OpenGL functions and GLSL code (from tutorial 5 onward) being the same. The only differences will be with setting up the display and handling user inputs (mouse, keyboard, etc.) And yes, the tutorials are all compatible with the modern versions of OpenGL.
thanks you thank you THANKS YOU SOOOOOO mutch I have been looking for somone like you for a long time and your just so good at teaching im really exited to continue your tutorials thanks!!!
if you get the UnsatisfiedLinkError in Netbeans, go to File>Project Properties>Run>Type into VM Options: -Djava.library.path=(location of the natives folder)
I love these tutorials, I just wish that so much had not changed from then until now. I mean, I could always downgrade the programs to backtrack to this time, but would that affect dramatically the quality capable from LWJGL3 and Java 14?
For those who don't want to use an IDE and are developing in linux... Download lwjgl-2.9.3. (Google lwjgl-2.9.3 sourceforge). The following commands got a basic test file (Main.java) to compile and run for me in linux. I unzipped lwjgl and the (resulting in the folder lwjgl-2.9.3/ ( do `unzip lwjgl-2.9.3.zip` from the folder where you want this folder to go)), with sibling folders 'src' and 'bin' for my source and .class directories respectively. These commands run in the folder that contains src, bin and the lwjgl-2.9.3 folder. compile: javac -d bin -cp bin:lwjgl-2.9.3/jar/lwjgl.jar:lwjgl-2.9.3/jar/lwjgl_util.jar:lwjgl-2.9.3/jar/jinput.jar src/Main.java run: java -cp bin:lwjgl-2.9.3/jar/lwjgl.jar:lwjgl-2.9.3/jar/lwjgl_util.jar:lwjgl-2.9.3/jar/jinput.jar -Djava.library.path=lwjgl-2.9.3/native/linux Main --------------------------- Hope this helps anyone who's struggling to do this. I was and my first problem was that the lwjgl wiki and the latest version of lwjgl don't really match up -_-. Took a while to figure out why nothing would compile or run since I expected the wiki, of all places, to be up-to-date X_X.
we can modify the tutorials to re-create our own game engines and install high poly models from blender as well for example we could re code the obj loader and the events list and create real looking trees with textures to match them
Tr4pStyLe Thanks! I just learned everything from loads of different online tutorials and game dev sites and forums, so there's not really one specific resource that I can recommend which would teach you everything.
Why not use Netbeans or any other IDE, does it make a difference when following the series? Thanks for the tutorials as well as the awesome videos of your game :D!
what knowledge of java should I have before watching through these tutorials? Are there any specific areas/tutorials I should look into first, or should I just dive in xD. (I have watched and understood most of the tutorials from ProgrammingKnowledge thus far but want to try my hand at something more advanced). Thanks
I think you should be experienced enough with Java that getting exceptions such as null pointer exceptions and index out of bounds exceptions aren't going to cause you any trouble, and you should easily be able to debug and fix them. There aren't really any specific areas that you especially need to know, but you'll just need a general understanding of Java code because I don't explain any of the Java aspects in the tutorials.
Nice tutorial, I'm almost through them one in 1.5x speed. Now I want to go through the once more and implement my own engine on the way. Are these first videos still applicable today after 4.5 years? Should I use LWJGL2 or 3 now and are there a lot of differences?
The main differences between LWJGL 2 and 3 are with setting up the display and handling mouse/keyboard inputs. All the OpenGL code (which makes up the vast majority of these videos) is still relevant today.
Hello everyone! Is there this kind of tutorials but in c++ language? Thanks in advance! EDIT: I forgot to show my appreciation on this tutorials. Great great work!!!
I only have previous experience in game development with game maker which included lighting , inventories & smooth camera movement.I'm going blind into this tutorial and try to figure out on my own what all the codes mean,I will also do lots of research.
Finally you uploaded the video, but can't you do at least 2 videos a week?? it will gonna take too long, i would like to know about the game loops more, your's looks pretty simple, i use a more complex approach (using c++) do you have any good suggestion or code that explain the logic behind game loops? (when to update the scene and display...etc) and i really would appreciate you if you focus and explain more in detail the following topics : 1. draw multiple objects for a scene. 2. mesh loading including animations. 3. terrain generation. thanks in advance
The game loop will get more complex in future tutorials, and I'll explain it further :) And I would absolutely love to upload 2 tutorials a week but I just don't have enough time! Each tutorial takes like a full day to plan, code, film, record, and edit together. And at the same time I want to be working full time on my game and also producing weekly dev logs. Unfortunately there are simply not enough hours in the day for me to get out 2 tutorials a week :(
mathe star although it is one of the best written tutorials out there, still it lacks some titles that you need the most for game development, (object loader) thanks for your suggestion.
***** good work with the schedule, but i really wished that you included COLLADA parser instead of OBJ file formats, although it depends on your time you will to spend on these tutorials, i believe COLLADA will help people more in the long run.
Exception in thread "main" java.lang.Error: Unresolved compilation problem: Display cannot be resolved at game/engineTester.MainGameLoop.main(MainGameLoop.java:22) My line 22: while (!Display.isCloseRequested()) {
Actualy, just a question becaus I am thinking about working with networking in java. Which library did you juse in Socuwan to do the Server and Client stuff or did you do it with the java inbuilt functions?
So I am interested in this series but I would like your opinion ThinMatrix. I prefer C++ so that will be my choice of languages. (nothing against Java) Are there any specific libraries other than Windowing and OpenGL that will be more difficult to do this in C++? I will be using GLFW and GLEW for windowing and OpenGL. As for general java libraries I imagine it wouldn't be too much to find equivalent C++ standard libs.
+MrGameengineer It should all be pretty similar for C++, and I know quite a few people have followed this tutorial series using C++. It shouldn't be any trickier than using Java.
+ThinMatrix I have another quick question that might benefit other C++ users. Not having watched every single video in this series yet, do you create a library of sorts for the "gameEngine" and separate, unique games will use that library? Or in this series is the code base "gameEngine" all one monolithic code project? The reason I ask is to know up front if I should create the gameEngine as a static lib.
Beginner game developer: *exists*
ThinMatrix: "I'm about to start this man's whole career."
that's something
extremely underrated comment
this is not for game developers
deop deop um yes it is?
@@linuxterm7622 ¿Como?
Hey! You're seeing this for the first time. Let me warn you: this is gonna be a epic journey, enjoy!
thanks, I will come back to this when i finish the series xD
@@rae4652 You finish it?
yup, i'm really excited to get this goin, don't think i'll get bored out of it.
ikr im so pumped
VALEU POR AVISAR!
I've been looking for a tutorial like this for a couple years, glad I finally found it. So many tutorials talk about the java language itself which bores me and I have to "try" and skip ahead but miss things. I'm already highly experienced in Java as a whole, just not game development. Thank you for making this. I will start watching and going through these in my free time. :)
Back to the start again. Going to redo all these tutorials probably will take less time then they did before and also will comment everything so I understand it. Today is the day I start a game not just props for a game :D
I recently started wondering if I would make a game engine just to have a better understanding of them. I always thought that you were awesome for always coding everything yourself. Yesterday I found your series, it may be a couple of years old but I'll still follow through everything ^^
Thank you for sharing your knowledge!
After hours of searching, I FINALLY found the problem. Even after updating drivers and looking up what version of Opengl my driver supported (which was 4.4) it still did not work. If you are having this problem you are most likely on a laptop.
Apparently, on most laptops there are 2 GPU's: the Intel(R) HD Graphics one and the NVIDIA Geforce one. For most PC use, the onboard Intel graphics hardware is just fine. You will not notice a difference between onboard and discrete graphics when using desktop applications. There is a difference, however - integrated Intel graphics use much less power than NVIDIA graphics. By using the low-power onboard graphics when a high-power dedicated graphics card isn’t necessary, laptops can save power and increase battery life.
When you launch an application that needs high-powered 3D graphics, such as a PC game, the laptop powers on the NVIDIA graphics hardware and uses it to run the application. This increases 3D performance dramatically, but takes more power - which is fine if your laptop is plugged into an outlet.
When you go to Control Panel > Hardware and Sound > Device Manager > Display Adapters there you can see the two GPU's.
The problem is that eclipse is run with the Intel GPU, which for me had Opengl version 3.1.
When doing:
Display.create();
String version = GL11.glGetString(GL11.GL_VERSION);
System.out.println(version);
I get " 3.1.0 - Build 9.17.10.2932"
To make your pc use the NVIDIA GPU for Eclipse, go to Control Panel > Hardware and Sound > NVIDIA Control Panel > Manage 3D Settings:
Option1: Either change "Preferred graphics processor" to "High-performance NVIDIA processor" to make your laptop always use the NVIDIA GPU.
Option2: OR go to program settings > add > select the eclipse.exe in your eclipse installation folder and change "Preferred graphics processor" to "High-performance NVIDIA processor".
Now I had a problem where the second option to only apply it for eclipse is not applied for some weird reason, so I just made my laptop use my NVIDIA GPU all the time. If you really don't want to do that you can right click the eclipse.exe and choose "Run with graphics processor" option. If anyone finds out why the second option does not work please tell me.
When doing:
Display.create();
String version = GL11.glGetString(GL11.GL_VERSION);
System.out.println(version);
I get "4.4.0 NVIDIA 344.48", you should now be able to make a new ContextAttribs(3, 2) without a problem.
I will show how to solve this problem if you use C++ and Windows. You can add these lines at the beginning of your main.cpp file. One line is for NVIDIA Geforce and another line is for AMD Radeon. After this your Exe file will use "High-performance NVIDIA processor" always.
#include
extern "C" _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
extern "C" __declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001;
"We are using LWJGL and OpenGL 3+"
subscribed!
@Kamey im working on it
I really appreciate you zooming into your code as you walk us through. Thank you very much for doing that!
Great job. I have no almost no prior java game coding knowledge, but so far this strongly motivates me to learn java. Also, you do a great job explaining so do understand this, even without knowing java, very well. Keep up the great work!
I know this is 7 years old but your real lucky I got many issues and I got out of ONE issue but got another one but good tutorial..
I would love it if you redid this series using up to date Java and LWJGL, it would be legendary!
*Common Problems and Solutions:*
If you get the following error: *org.lwjgl.LWJGLException: Could not create context (WGL_ARB_create_context)* or *Pixel format not accelerated* then your computer may not support the version of OpenGL that we're trying to use (version 3.2). Try removing the parameters from the *Display.create()* method and try again. You may have trouble on the later tutorials however, depending on exactly which version of OpenGL your computer supports.
Also, in case you had annotations off, you need to do the ContextAttrib stuff all in *one line* like this:
ContextAttribs attribs = new ContextAttribs(3, 2).withForwardCompatible(true).withProfileCore(true);
If the display opens and closes straight away without an error then make sure you didn't miss the *!* in the *(!Display.isCloseRequested())* part.
+ThinMatrix why won't you show us how to make a socuwan type-game?
+Geometry Dash Adrian That's exactly what this series is doing. In this tutorial series I've now covered almost all the OpenGL concepts that I used in Socuwan. In fact, a lot of the stuff I've shown in this series is better than in Socuwan because when I was implementing this stuff in Socuwan I was doing it for the first time.
+ThinMatrix OK, but you didn't upload Episode 40
Geometry Dash Adrian I only just uploaded episode 39 a couple of weeks ago :P The Opengl tutorials go out every 2 weeks, so the next one will be out tomorrow.
+ThinMatrix Hope u promise bro :)
Just finished watching the whole video and thought it was great (I've only done simple pure java games), definitely can't wait for the next episode! Great job man
Thank you :)
Do note that in LWJGL 3 the "Display" class has been replaced with "GLFW" class.
So everything that says "Display" i have to replace it with "GLFW"?
+Bandit Leader No. If you're switching to LWJGL 3, you would have to. But this tutorial series is still for version 2(.93). I'm still working with the "old" version myself, the major change in the newer one is that the developers thought it was becoming to big so they removed a few things. It's now e.g. using a different library for managing the display (GLFW) and there are some elements missing you would have to implement yourself (the mathmatical classes in the util package).
Of course you can still use the "old" version, it's the same OpenGL, and you can follow this really awesome series easier.
+Geosearchef Please don't switch to LWJGL 3 because I was using that (LWJGL 3.0.0b build 64) until I got stuck in input camera.
i can't get position normal or delta from the mouse class, so now I'm redoing all the work but with LWJGL 2.9.3 because the 3 version is a pain in the ass XD.
thanks, I was freaking out, thought something was wrong with autocompletion
:P thank goodness i got v2 of LWJGL '':{
This is where all started. This videos about OpenGL is OG.
Wow, I'm amazed. For the 1st time ever, somthing showed in a programming tutorial I watched, works instantly without any errors xD
I'm getting better at this!
With people getting errors with unsatisfiedLinkError, right click on the JRE System Library in the package Explorer (assuming your using eclipse) - build path -> configure build path then double click on the native library location, that will bring up an explorer window and just point it to your lwjgl -> natives -> windows. it did the trick for me. i'm using version 2.9.2. hope that helps.
Mac users: In the closeDisplay method in the DisplayManager class, remember to add a System.exit(0); just after Display.destroy(). If you do not do this, the display will linger and just be annoying.
"이 강의가 없었다면 지금의 나는 없었다"
본질에 매우 충실한 강의.
대학생 시절, 컴퓨터공학을 전공했지만 늘 자신감이 없었던 나에게
엄청난 실력과 압도적인 자신감을 가져다준 유일한 강의입니다.
YES! It's finally here, thank you so much for doing a tutorial series. It will benefit me so much, thanks!
This is one of the best set of video game tutorial creation videos I have ever seen. After watching this TheChernoProject Display method and this Display method I can see were a new screen method would fit in.
Doing these tutorials in c++ now. Got through the first 40 episodes before but now I feel like java isn't the encouraged language to make a game in because of the speed. Java is still my favorite language and I love these tutorials.
I'd assume you're using GLFW instead, but I was curious to if I should be using c++ over java.
@@gravedigger7380 I don't think it's so hard to transform the code from Java to C++ cuz the opengl is basically the same and the steps are the same too. I think you just need a lil bit of logic :3
Good to know, thank you. :)
LOL this is my 4th time watching this series because I am trying to learn it rather than just copying it. I want to be a software engineer or developer when I go to university. Cheers!
Great Video! , it would be great if you remade this series with LWJGL 3.
This is so nostalgic for me, this helped get me started on my coding and game development journey, good times.
Can you please create a new 3D game development series using LWGL3?
if you really need to learn lwjgl 3 just learn lwjgl2 in this series and from then on it's easy to switch to 3
Hi, I just found your channel by mistake but I'm very impressed with the two videos I've accidentally watched, will definitely be sticking around and whenever I've got free time I'll be watching these! Always wanted to learn how to do stuff like this but I'd only consider myself an amateur java programmer and as I don't play too many games a lot of the other tutorials I've had a quick skim through don't explain in much detail for people like me who don't really understand the whys and the hows.
But yea thanks! Makes a nice change from banking software I have to deal with at work!
Emersonbarclay I'm glad you like them :)
TO ANYONE DOING THIS TUTORIAL IN 2021! LISTEN UP! Be sure to set the Java version to 1.8 or else your project will not work.
i have java16 and its works
what i like about this is that notch uses the models and the same stuff
Hey - these look great, thanks so much for your efforts! A quick question before diving in: These were released in 2014. I see from some other comments (several years old themselves) that this material is still relevant, the main areas of concern being GFLW is used now for window display and input and for math we can use JOML. Is that still the case? I am a bit confused because some comments indicate that you are using version 2 of LWJGL but here in this first video you are using 3.0. Can I follow these with the latest release? Thanks for your input. Cheers :)
The main aim of the tutorials is to teach OpenGl. OpenGl is the API that allows us to render 3D graphics. In these videos I use OpenGL 3+, which is still relevant today (and I use for my games).
LWJGL is the Java library that gives us access to the OpenGL API. It also handles other useful things, such as window creation and user inputs. In the videos I use LWJGL 2, but the current version available today is LWJGL 3. All the OpenGL code is the same, all the gamedev concepts I teach are still relevant, it's just the things specific to LWJGL 3 that are different. As mentioned, these primarily include setting up the display and handling user inputs. So if you can learn how to do those two things with LWJGL 3 elsewhere, then you can follow these tutorials for everything else.
@@ThinMatrix Thank you! Cheers :)
Had the same concern, glad you got a reply! By any chance, do you know how to pack a game made in Java utilising OpenGL for the Web?
@@ItsMeChillTyme at the end of this guys series packaging is discussed: ua-cam.com/video/VyKE7vz65rY/v-deo.html
@@staticvoidsolutions4998 thank you so much!
I know a couple years have gone by but wanted to say thank you for this tutorial. You just gave me a reason to take another look into Java and experiment with Blender, LWJGL, and other stuff :)
Wait a second did u say by the time you get to tutorial 25 we will have terrain gen, lighting, 3rd person player, fog, skybox, multipul light sources and multiplayer ok this is way to much you are the best UA-camr ever it normally takes people 100 episodes just to set up a terrain :D
Mohammed Qureshi other people eplain stuff
This fella made a better game in 2014 in his "first display" than most Unity users make with assets in 2019.
This is what I have been looking for!
Woah, si j'arrive à m'accrocher à ce tutoriel je vais en apprendre plus sur Java et la création d'un jeu 3D que je ne l'aurais jamais imaginé ! Wonderful and brilliant, you just speak a little bit fast but that's really nothing, i can keep up the pace :D . Great work !
Hello! This is exactly the type of tutorial I would be incredibly interested in. However, before diving in, I wanted to ask if this is completely dependent on Java? I would much rather do all of this in C++!
+Frank Botos The majority of the code is OpenGL calls and GLSL shader code, which is pretty much the same in any language. The only big differences will be setting up the display and handling user inputs. I know that quite a few people have followed this tutorial series all the way through using C++.
Okay awesome! As long as it's stuff like mouse/keyboard input and window creation I believe I can figure that part out. Thanks a lot for sharing this knowledge, I am looking forward to learning!
Always coming back to this tutorial.
This is awesome, thanks for this, I will totally try to follow it :)
Note that the author used the eighth java. In no case try to follow the instructions if you have a different Java, for example 16. I have been looking for the cause of the errors for a very long time, until I changed the Java to an older one.
I have java 16 and its works
Great, thanks for tutorial!!! And good luck with your multiplayer game.
Thanks :)
Hey, mine throws this: `Exception in thread "main" java.lang.NoClassDefFoundError: sun/misc/Unsafe`, what can i do?
same. I really don't know what to do here.
okay, i found a solution from somebody else. you move all 3 jar files to classpath and delete modle-info file.
@@therealmemernet thanks! I'm gonna try it
@@skywalker778 no problem!
@Kürassier1806 Damn, it's been 8 months since I posted that(it feels like yesterday). I'm glad my solution helped you!
why the actual HECK !! UA-cam didn't show this channel when i searched for OpenGL tutorials !!! take this UA-cam .I. , +1 sub , gold channel , a life saver . thank you
Didn't think anyone who wasn't Indian used Eclipse with a light theme.
Any Problems with Indians?
Oh my god you are by far the greatest person I have found on this subject who knows what they are doing I am subscribing to you!!!
Recordfriction Thank you :D
No problem but seriously man I am looking forward to all of your future tutorials AND your showings of the game you're making :D
For those of you that get the "Could not create openGL context" error, call the Display.create() function with no parameters, then call GL11.glGetString(GL11.GL_VERSION); This will give you a string with your opengl version. You might not support opengl v3.2
カラス I'm getting this error but couldn't figure out how to fix it.
However, the window opens just fine, with no errors, if I use Display.create(), with no parameters, instead of the PixelFormat and attribs version of it.
I'm using a Linux Ubuntu 64bit, from a laptop (onboard videocard), if that information is useful.
*****
You have 4.5
353.30 is the version of your NVIDIA drivers.
Thanks for that advise.
Love your tutorial series TM! So helpful! Can't wait for the next one!!
It's works! The like button works!
Really looking forward to the rest of this series! :)
hi from 2019 new years night! so basically I am in 2020
20/02/2020 :)
@@noon453gf 29/02/2020
@@chelovekchelovekov5134 hhhh thats good
Oh boy well wait till you see what's in store for you!
you don't want to be in 2020 stay in 2019
Keep these tutorials coming, Id love to be able to make something like what you have made
When I do this on my Mac, the code executes, but I get a red and black flashing screen. How do I fix this?
me too 😳😳
Just got the time to do the tutorial, happily done it all and it all worked out :D
doing this tutorial on Scratch.MIT.edu right now. Tried Java and c++ but found them both far too limiting.
Lol
Java and C++ limiting when compared to scratch? Are you trolling?
thats what c# is for
try assembly and machine language
@@ryanwilson5079 Hard to read but not really limiting as if you're good enough you could build any C++ program in machine or asm. Would take forever though and good luck reading it lol
Please keep the series up!
I tried, and got the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
at engineTester.MainGameLoop.main(MainGameLoop.java:20)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.LWJGLException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 1 more
I'm using java-11-openjdk.
I solved it using jre1.8.
Thanks I had the same issue
So I'm started today to this series. I hope I learn something good and make my own game engine and games. Thank you so much for this tutorials man!!! :D
OMG MAN YOUR AMAZING THANK YOU SOO MUCH IF I MAKE MY GAME WELL U WILL HAVE ALLOT OF SHOUT OUTS
Don't know if you still read the comments, but I was wondering if this is still relevant? It seems like the best tutorial on UA-cam. Should I stick with lwjgl 2 or go to lwjgl 3? What are the benefits of one versus the other?
yeah, you are not alone, i wonder the same myself :)
Try to follow it with lwjgl 3. I did this a while ago and besides from the first or maybe also second episode it works farely well
Edit: Some resources: github.com/LWJGL/lwjgl3-wiki/wiki/2.6.6-LWJGL3-migration github.com/JOML-CI/JOML/wiki/Migrating-from-LWJGL-2
@@profiluefter Thank you very much. I will stick with LWJGL 2 for now because I am a noob at this, but I might switch over later. With exams and everything lately, I am only on episode 10 or so ;)
i treid an it worked i am now going to carry on watching your open gl 3d game tutrials
Very straightforward. Loved it! Looking forward for the next ones. :)
ThinMatrix: lets make a tutorial that shows people how to make a 3d world in Java!
90% of people: MINECRAFT
I've been searching something like this for weeks!
Thanks
Thank you for this awsome tutorial !! :D im using java for a while now and just wanted to get started with Opengl and this is just perfect !!! thx !!! :D
Just started this tutorial, it seems very promising so I'm going to watch part 2 right now. :D
Also subbed + liked.
Earleys' Channel - All kinds of Games Thank you! :)
Thank you so much for doing this again. It was so awesome :D PLEASE don't stop this mid way like most people. You're a great guy :)
Colin Allen Thanks! I'll do my best :)
Thanks just finished learning the 1st tutorial today :). You're the best man!!!!
Hello ThinMatrix,then all first I want to apologize for the possible mistakes, but I'm french and speaks some English.I followed this very complete tutorial(frankly, better findable on the net, GG!), and having small bugs (because being maniacal, I renamed all the classes and methods, so at the end its stuck more too :P), I decided to redo the tutorial.Small questions:- Is your tutorial is compatible in C++? Because OpenGL methods remain the same, should be just that I converted. - Is your tutorial compatible with OpenGL 4.5?- And, where is your documentation? I would be interested.Thank you for your future answers,Best regards,ShE3py.
Yes, the majority of the code will be very similar in C++, with basically all the OpenGL functions and GLSL code (from tutorial 5 onward) being the same. The only differences will be with setting up the display and handling user inputs (mouse, keyboard, etc.) And yes, the tutorials are all compatible with the modern versions of OpenGL.
Okay, tanks.
thanks a lot for taking the time to do this even though you we know you are so busy working on your game :)
Don't get demotivated when you see Unity's logo.. You are here bcoz you love the whole process of programming, not just results😃
I am so freaking excited abt watching this series
YES !!! finally ! ( It has been almost one the years since I asked for that!!!! Thank you ! )
I am going to slowly pace myself, a video per day. Something to look forward to.
Please remake this tutorial series with LWJGL 3. I think many people would thank you a lot.
im gonna try to follow this series in c++
Ummmmmmmm, with the LWJGL okay good luck!
thanks you thank you THANKS YOU SOOOOOO mutch I have been looking for somone like you for a long time and your just so good at teaching im really exited to continue your tutorials thanks!!!
if you get the UnsatisfiedLinkError in Netbeans, go to File>Project Properties>Run>Type into VM Options: -Djava.library.path=(location of the natives folder)
I love these tutorials, I just wish that so much had not changed from then until now. I mean, I could always downgrade the programs to backtrack to this time, but would that affect dramatically the quality capable from LWJGL3 and Java 14?
I like your tutorials. They are always nice.
+ALVIN MUTHUI I'm glad you like them! :)
For those who don't want to use an IDE and are developing in linux...
Download lwjgl-2.9.3. (Google lwjgl-2.9.3 sourceforge).
The following commands got a basic test file (Main.java) to compile and run for me in linux. I unzipped lwjgl and the (resulting in the folder lwjgl-2.9.3/ ( do `unzip lwjgl-2.9.3.zip` from the folder where you want this folder to go)), with sibling folders 'src' and 'bin' for my source and .class directories respectively. These commands run in the folder that contains src, bin and the lwjgl-2.9.3 folder.
compile:
javac -d bin -cp bin:lwjgl-2.9.3/jar/lwjgl.jar:lwjgl-2.9.3/jar/lwjgl_util.jar:lwjgl-2.9.3/jar/jinput.jar src/Main.java
run:
java -cp bin:lwjgl-2.9.3/jar/lwjgl.jar:lwjgl-2.9.3/jar/lwjgl_util.jar:lwjgl-2.9.3/jar/jinput.jar -Djava.library.path=lwjgl-2.9.3/native/linux Main
---------------------------
Hope this helps anyone who's struggling to do this. I was and my first problem was that the lwjgl wiki and the latest version of lwjgl don't really match up -_-. Took a while to figure out why nothing would compile or run since I expected the wiki, of all places, to be up-to-date X_X.
we can modify the tutorials to re-create our own game engines and install high poly models from blender as well for example we could re code the obj loader and the events list and create real looking trees with textures to match them
Nice Tutorials. Realy easy too understand. How do you learned all these things? Are there any resources you can recommend?
Tr4pStyLe Thanks! I just learned everything from loads of different online tutorials and game dev sites and forums, so there's not really one specific resource that I can recommend which would teach you everything.
Thank you for writing a tutorial on opengl 3.0+ in java. Documentation on the new stuff is hard to find.
Great to know this started! Thanks. :)
Why not use Netbeans or any other IDE, does it make a difference when following the series?
Thanks for the tutorials as well as the awesome videos of your game :D!
First I had a weird red flickering of the game window. Solution was to insert glClear(GL_COLOR_BUFFER_BIT); in the while loop.
Could you explain what does it do?
what does it do? And the method doesn't exist :(
Great video. really easy to understand, you explain things very well
what knowledge of java should I have before watching through these tutorials? Are there any specific areas/tutorials I should look into first, or should I just dive in xD. (I have watched and understood most of the tutorials from ProgrammingKnowledge thus far but want to try my hand at something more advanced). Thanks
I think you should be experienced enough with Java that getting exceptions such as null pointer exceptions and index out of bounds exceptions aren't going to cause you any trouble, and you should easily be able to debug and fix them. There aren't really any specific areas that you especially need to know, but you'll just need a general understanding of Java code because I don't explain any of the Java aspects in the tutorials.
Nice tutorial, I'm almost through them one in 1.5x speed. Now I want to go through the once more and implement my own engine on the way.
Are these first videos still applicable today after 4.5 years? Should I use LWJGL2 or 3 now and are there a lot of differences?
The main differences between LWJGL 2 and 3 are with setting up the display and handling mouse/keyboard inputs. All the OpenGL code (which makes up the vast majority of these videos) is still relevant today.
Hello everyone! Is there this kind of tutorials but in c++ language? Thanks in advance!
EDIT: I forgot to show my appreciation on this tutorials. Great great work!!!
I only have previous experience in game development with game maker which included lighting , inventories & smooth camera movement.I'm going blind into this tutorial and try to figure out on my own what all the codes mean,I will also do lots of research.
So thankful for this
The annotation @4:37 is just method chaining the ContextAttribs object. I don't see why you should apologize since they are both the same.
Great tutorial! Can you make a series for LWJGL 3?
i knew nothing about java, but after watching this i realized C# and java are very similar! so if you C# and not java well try this anyway.
You know that C# is based on the same language as Java is based on, thats why they are so similiar
Finally you uploaded the video, but can't you do at least 2 videos a week?? it will gonna take too long, i would like to know about the game loops more, your's looks pretty simple, i use a more complex approach (using c++) do you have any good suggestion or code that explain the logic behind game loops? (when to update the scene and display...etc) and i really would appreciate you if you focus and explain more in detail the following topics :
1. draw multiple objects for a scene.
2. mesh loading including animations.
3. terrain generation.
thanks in advance
The game loop will get more complex in future tutorials, and I'll explain it further :) And I would absolutely love to upload 2 tutorials a week but I just don't have enough time! Each tutorial takes like a full day to plan, code, film, record, and edit together. And at the same time I want to be working full time on my game and also producing weekly dev logs. Unfortunately there are simply not enough hours in the day for me to get out 2 tutorials a week :(
Check arcsynthesis.org/gltut/
Also, I will be covering all those topics that you mentioned :) You can check the tutorial schedule in the description of this video to see when :)
mathe star although it is one of the best written tutorials out there, still it lacks some titles that you need the most for game development, (object loader) thanks for your suggestion.
***** good work with the schedule, but i really wished that you included COLLADA parser instead of OBJ file formats, although it depends on your time you will to spend on these tutorials, i believe COLLADA will help people more in the long run.
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Display cannot be resolved
at game/engineTester.MainGameLoop.main(MainGameLoop.java:22)
My line 22: while (!Display.isCloseRequested()) {
Great tutorial, Great Idea to make a series about it will definitely help lots of guys but one ep per week? can't u make like 2 per week?
are you going to use VBOs or VAs, and good job on the vid (; .
PorkTek Going to be explaining VBOs and VAOs in the next video :)
***** I could hardly keep up :(
Thanks so much for this series!!
Actualy, just a question becaus I am thinking about working with networking in java. Which library did you juse in Socuwan to do the Server and Client stuff or did you do it with the java inbuilt functions?
I just used stuff from the Java standard library.
So I am interested in this series but I would like your opinion ThinMatrix. I prefer C++ so that will be my choice of languages. (nothing against Java) Are there any specific libraries other than Windowing and OpenGL that will be more difficult to do this in C++? I will be using GLFW and GLEW for windowing and OpenGL. As for general java libraries I imagine it wouldn't be too much to find equivalent C++ standard libs.
+MrGameengineer It should all be pretty similar for C++, and I know quite a few people have followed this tutorial series using C++. It shouldn't be any trickier than using Java.
+ThinMatrix Sounds good, thanks!
+ThinMatrix I have another quick question that might benefit other C++ users. Not having watched every single video in this series yet, do you create a library of sorts for the "gameEngine" and separate, unique games will use that library? Or in this series is the code base "gameEngine" all one monolithic code project? The reason I ask is to know up front if I should create the gameEngine as a static lib.