#1 Creating a Game Engine in Java and OpenGL - Skydome
Вставка
- Опубліковано 9 вер 2024
- In this part of the Game Engine Tutorial with Java and LWJGL 3 we create and render our first object, the Skydome!
The starting code is available here: github.com/ore...
The finished code is available here: github.com/ore...
Eclipse IDE project setup: • #0 Creating a Game Eng...
This video was getting longer than intended, sorry for that. The next video about the Terrain Quadtree will be hopefully more compact.
Wow! Very precise and clear coding. The way you explain these steps lets me know exactly what kind of line I'm coding and what it is for. This is amazing! I know it's long, but it can be sped up by the viewers if the need it faster. This gives me plenty of time to take in the concepts and their usage. Thanks again for this great video!
I love.. how ... you... go... into... so... much... DETAIL... about... what... we... are... doing... so that.... we... actually... LEARN SOMETHING, its copying down from the board in an English lesson, but its just written in Italian, you can sort of understand it but you don't actually know what's being written
sounds german
I can't wait to see more. Thanks oreon3D!!
Didn't matter for this demo, but I think there was a mistake on line 40 at 6:59. Second parameter should have been a 2 (2, 2 instead of 2, 3) since there's only two texture coordinate floats, yes?
Thank you so much, I got one syntax error that I hope to find soon, but this tutorial was soooo helpful!!
help me
modules.AtmosphereShader ERROR: 0:1: '' : Incorrect GLSL version: 430
WARNING: 0:5: 'GL_ARB_explicit_attrib_location' : extension is not available in current GLSL version
WARNING: 0:5: 'GL_ARB_explicit_attrib_location' : extension is not available in current GLSL version
how to make a unreal engine made-in-home
Awesome tutorials, quality information at a good pace, thank you!
thanks you ;)
Thank you so much it works great! Can't wait to learn from the next episodes :)))
Good engine. I use this in 1 part to program my game. I use this as jar.
What does this mean?
no material in polygon of: Dome
obj loading time : 15ms
modules.AtmosphereShader 0(1) : error C0104: Unknown pre-processor directive #version430
0(3) : error C0000: syntax error, unexpected '(', expecting "::" at token "("
0(5) : error C5060: out can't be used with non-varying worldPosistion
Just recheck your .glsl files.
can someone tell me how to fix this problem? What i did wrong
modules.AtmosphereShader Error: Could not find uniform: m_World
Thanks so much for doing this series.
Hi, I followed your tutorial, but it seems, the dome doesn't work... The program runs just fine, the window is simply black. Any ideas? I read in Nijastan K.s comments, that he had similar issues...
He had issues because there were erros in the C++ model loading. My loader works as intended. You can try assimp loading too, that may helps. I added it to my engine, code is online
I just replaced it with a custom dome.obj (exported from Blender) and it's still not working.
I am getting an info called no material in polygon of: Dome the sky buffer is showing
Great job man! Can't wait to see more!
perferct series from perfect tutor god bless you :)
I get an error that I don't think anyone else had:
modules.AtmoshereShader ERROR: 0:13: 'worldPosition' : undeclared identifier
ERROR: 0:13: 'assign' : cannot convert from '3-component vector of highp float' to 'highp float'
Quick question cause I'm new to this coding in java thing. Are we allowed to sell what we create? Like say I use the openGL thing and create a game with it, does it follow the agreement terms or whatever to sell the game on steam?
opengl is a standardized open library to talk to the GPU. It has nothing to do with your Game per se just for using it. It is like using Java its a standard language to talk to GPUs. So no you don't have to pay anyting to anyone.
Exception in thread "main" java.lang.NullPointerException
at core.utils.ImageLoader.ioResourceToByteBuffer(ImageLoader.java:120)
at core.utils.ImageLoader.loadImageToByteBuffer(ImageLoader.java:79)
at core.kernel.Window.create(Window.java:68)
at core.kernel.CoreEngine.createWindow(CoreEngine.java:41)
at core.Main.main(Main.java:10)
running on mac
probably u did not initialzed something and it returns null(compiler says that something is empty or does not exist)
no material in polygon of: Dome
obj loading time : 18ms
modules.AtmosphereShader Vertex info
-----------
(0) : error C5145: must write to gl_Position
Can anyone help me with the above error? Can't see where I am going wrong!
Hello! I'm liking the series so far but I am also having the black screen issue. Everything runs without error but the screen is simply black.
I saw that other people where having issues with this as well, you commented saying it could be something to do with object loading? Been combing over your video for a while now and just can't see where I've made a mistake.
I solved the issue, for anyone experiencing the same thing it's a problem with the shades not being initialized correctly/models not being projected. I'm still not sure what fixed it 100%, I rewrote much of my AtmosphereRenderer and a few other classes, comparing them to the tutorial download link that's in the description. The shader uniform values are named something different in the files than what he names them in the video, and there are some minor structure changes in Renderer and Skydome classes.
All and all, I've got no clue why it works not and didn't before /shrug
There must be a mistake then, did you run the finished code I provided? For reasons like that I provided finished code for each episode that you can continue with it. You maybe made a minor mistake which results in a black screen, unfortunately that happens often in this genre...
PLEASE HELP HERE I get the error "No material in polygon: Dome"
this not an error, just an info
OREON ENGINE but the window is black i dont see the skydome
I followed the tutorial but ended up with just a black screen, what do i do?
I cried and laughed so hard reading this.
Same here, I'm so confused.
Hi Ty for All Tutorials . i have a problem i cant see dome. in Console : no material in polygon of: Dome
obj loading time : 18ms
I have this problem too, but nobody seems to have a solution....
same problem here
same here
7:24 just saving my time stamp
I get an error
no material in polygon of: Dome
obj loading time : 53ms
modules.AtmosphereShader Vertex shader failed to compile with the following errors:
ERROR: 0:12: error(#143) Undeclared identifier: gl_position
ERROR: 0:12: error(#160) Cannot convert from: "4-component vector of vec4" to: "float"
ERROR: error(#273) 2 compilation errors. No code generated
you have syntax errors in atmosphere_VS glsl shader file. it should be gl_Position (capital P), second error is syntax error too which I can't determine without looking in your glsl file
I did exactly what was done in the tutorial, but I get the following error:
Exception in thread "main" java.lang.NullPointerException
at core.shaders.Shader.setUniform(Shader.java:168)
at modules.AtmosphereShader.updateUniforms(AtmosphereShader.java:27)
at core.renderer.Renderer.render(Renderer.java:16)
at core.scene.GameObject.render(GameObject.java:31)
at core.kernel.RenderingEngine.render(RenderingEngine.java:38)
at core.kernel.CoreEngine.render(CoreEngine.java:130)
at core.kernel.CoreEngine.run(CoreEngine.java:105)
at core.kernel.CoreEngine.start(CoreEngine.java:59)
at core.kernel.Game.launch(Game.java:12)
at core.Main.main(Main.java:12)
I suspect the HashMap "uniforms" was not initialized in Shader.java...
No, the uniform you want to set was not found within hashmap. The hashmap was ofc initialized when you look into the constructor. I bet here is a typing error in your shader construtor where you call "addUniform" methods
After 5 min of watching it I can already say, good job, keep going man! Do you have some kind of pdf documentation of your engine?
Thank you! Unfortunately not :( No time to create a pdf-doc
I found the patched version of you OreonEngine. It works, however I see some scenes, that reminds me of mountains with black strokes. Does it occure, because of the VboPatch?
which patched version do you mean?
In your fragment shader (from 22:00), can you please provide more information on what are those "2800" and "-0.00022", "-0.00025", "-0.00019" values and why they were chosen?
Thanks for the really interesting tutorial by the way.
sure, they are the slopes of the linear decreasing function. I choose them by playing around what looks good. But overall you can say the linear function starting at the highest point of the skydome (2800) and are loosing its colors when the height decreases. the parameter of the function is the height in worldspace
I get the error:
modules.AtmosphereShader Validation Failed: No Vertex array object bound
I've looked at the final code and cannot find a fix in there either.
Not sure what I'm missing.
I edited the MeshVBO.class to remove the GL30.glBindVertexArray(0) this seemed to correct my issue.
How to make intellisense pop all the time like it does for you?
CTRL + Space ;)
thank you 😉
Very interesting! I couldn't get though the entire video though. The pacing is too slow for me. Difficult problem to solve in this genre :/
Gutes Video! Mach weiter so 👍
Great work and nice to see its going on now. Love ya! Do you come from germany?
Thank you, yes right, I know my german accent is horrible :D
Where in Germany? I live in Australia but my girlfriend is from Berlin and I'm there all the time, amazing place.
IDE is eclipse or netbeans?
Eclipse
Excellent video .. now I realize that my code structure is not so bad :)
When will the next videos come out?
I think somewhere between the next 7 days ;)
A beautiful Skydome intergrated on my own engine :)
can you run this on a mac??
It's Java, so yes.
C++ or Java
when I tried to download lwjgl it says it contains a virus
Ignore it I think, it's prob cause it's a .jar
you don't really explain anything :/
What if I want a 2D or a 4D game ? Or a non euclidian one ? You don't explain anything about what you're writting D:
his voice sounds like a german xD
8:42
3:18
Are you german? :D
yes! :D
Nice!!!
Du hast mein Abo ;)
Learn to optimize GLSL.
/facepalm
Ahaha Your engine looks like Unity clone