3D Game Programming - Episode 4.5 - How Rendering Works
Key Takeaways
The Cherno explains how rendering works in 3D game programming using Java, demonstrating the process with System.out.println statements and Paint.net.
Full Transcript
what is up guys my name is jonah and welcome to episode 4.5 of 3d java game programming okay um yeah this is sort of like a bonus sort of episode where i um really wanted to sort of focus on one thing it's going to be a really short video and that is the way that this works because um i don't feel that i explained it well and you know i've got messages saying um could you explain it better so um i think that the best way to explain this is to actually demonstrate so um this is sort of what we had and um the way that it renders the way that it draws how does all this code work okay um the best way i think to explain it is to simply add you know system.out.printline into this for loop um in the render class print line and we're just going to print x um plus x plus and i'll explain this in a minute why plus y okay so what what it's doing is it's printing like a string of text says x and it's printing the x variable uh so what you can see is if i go into the console and i run this save it okay let's exit out of this and let's sort of and enlarge this console and take a look at this um and we'll also take a look at paint.net because paint.net is fast becoming my favorite way to explain pixels to people with this little grid thing the grid is awesome okay so we can say that you know at y when y is 108 it's creating all these x values so say that this um say that this pixel is number 108 down yeah for each 108 it's creating the entire range of all these pixels across x and it will stop at 255. well it's technically 256. if we saw if we oh we don't have that but you can see that it starts at 0.1 because that's the way the java works so yeah it's printing 256 because 256 is the amount that we've specified in our screen class so 256 basically fills up this y value because it's render.height so yeah that's that's how it works i hope that this will sort of help you explain um more things and you know when y when the y pixel number is 109 it will render all of the x pixels across so it's effectively rendering um in lines like this you know it'll render this one first then it'll go on to this one then it will render this one and so on and so forth so it's running it's rendering that way across the screen um hopefully those sound effects helps you guys out okay so that's a really quick episode um don't worry episode five where we actually move on to animating stuff animating the pixels and i'll actually actually fix a lot of bugs as well because i've already recorded episode five um that will that will be up today that'll be that that will be up a few hours after this video so don't worry you're still getting a full episode today i just really wanted to put this in okay see you guys later bye you
Original Description
Episode 4: http://www.youtube.com/watch?v=qwodDRVQ7eQ
Quick video, just to explain rendering a bit better. Think of this as a bonus episode; Episode 5 will be uploaded in a few hours. ;)
Welcome to a series of videos where we will create a 3D game (probably a first person shooter) from scratch, using just the included libraries in Java 1.6. If you have any questions or problems, leave a comment or send me a message, or tweet at me.
In this tutorial:
How rendering works
Tell me if you want more!
Twitter: http://twitter.com/#!/thecherno
Livestream: http://www.twitch.tv/thecherno
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from The Cherno · The Cherno · 5 of 60
1
2
3
4
▶
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
3D Game Programming - Episode 1 - Window
The Cherno
3D Game Programming - Episode 2 - Game Loop
The Cherno
3D Game Programming - Episode 3 - Arrays
The Cherno
3D Game Programming - Episode 4 - Drawing Pixels!
The Cherno
3D Game Programming - Episode 4.5 - How Rendering Works
The Cherno
3D Game Programming - Episode 5 - Playing with Pixels!
The Cherno
3D Game Programming - Episode 6 - Performance Boosting
The Cherno
3D Game Programming - Episode 7 - FPS Counter
The Cherno
3D Game Programming - Episode 8 - Alpha Support and More
The Cherno
3D Game Programming - Episode 9 - Beginning 3D
The Cherno
3D Game Programming - Episode 10 - Floors and Animation
The Cherno
3D Game Programming - Episode 11 - Rotation
The Cherno
3D Game Programming - Episode 12 - User Input
The Cherno
3D Game Programming - Episode 13 - Render Distance Limiter!
The Cherno
3D Game Programming - Episode 14 - Basic Mouse Movement
The Cherno
3D Game Programming - Episode 15 - Textures + More!
The Cherno
3D Game Programming - Episode 16 - Walking, Crouching, Sprinting + More
The Cherno
3D Game Programming - Episode 16.5 - Exporting Runnable Jars
The Cherno
3D Game Programming - Episode 17 - Small Adjustments + Birthday!
The Cherno
3D Game Programming - Episode 17.5 - Creating an Applet
The Cherno
3D Game Programming - Episode 18 - The Beginning of Walls
The Cherno
3D Game Programming - Episode 18.1 - A Few More Things
The Cherno
Episode 18.5 - Creating an EXE File in Java
The Cherno
3D Game Programming - Episode 19 - Rendering Walls
The Cherno
3D Game Programming - Episode 20 - Continuing Walls, Fixing Bugs, and Managing Crashes
The Cherno
3D Game Programming - Episode 21 - Texturing Walls, Fixing Clipping, and Fixing the Mouse
The Cherno
3D Game Programming - Episode 22 - Random Level Generator + Properly Fixing Clipping
The Cherno
3D Game Programming - Episode 23 - Graphical User Interface (GUI) Launcher
The Cherno
3D Game Programming - Episode 24 - Making Our Launcher Work
The Cherno
3D Game Programming - Episode 25 - Writing and Reading Files
The Cherno
3D Game Programming - Episode 26 - Custom Resolutions
The Cherno
3D Game Programming - Episode 27 - Decorating the Launcher
The Cherno
3D Game Programming - Episode 28 - Continuing our Custom Launcher!
The Cherno
3D Game Programming - Episode 29 - Launching The Game
The Cherno
3D Game Programming - Episode 30 - Colour Processing In-Depth
The Cherno
3D Game Programming - Episode 31 - Sprites!
The Cherno
3D Game Programming - Episode 32 - Sprite Mapping
The Cherno
3D Game Programming - Episode 33 - High Resolution Rendering
The Cherno
3D Game Programming - Episode 34 - Entities
The Cherno
Genesis - My Game for Ludum Dare 24
The Cherno
Vlog + Ludum Dare Results
The Cherno
Game Programming - Episode 1 - Resolution
The Cherno
Game Programming - Episode 2 - Threads
The Cherno
Game Programming - Episode 3 - Game Loop
The Cherno
Game Programming - Episode 4 - Window
The Cherno
Episode 5 - Buffer Strategy
The Cherno
Game Programming - Episode 6 - Graphics Initialized
The Cherno
Game Programming - Episode 7 - Buffered Image and Rasters
The Cherno
Game Programming - Episode 8 - The Screen Class
The Cherno
Game Programming - Episode 9 - Rendering Pixels
The Cherno
Game Programming - Episode 10 - Clearing the Screen
The Cherno
Game Programming - Episode 11 - "Out of Bounds, Baby!"
The Cherno
Game Programming - Episode 12 - Negative Bounds
The Cherno
Game Programming - Episode 13 - Timer
The Cherno
Game Programming - Episode 14 - FPS Counter
The Cherno
Episode 15 - Tiles
The Cherno
Game Programming - Episode 16 - The Map
The Cherno
The Walls 2 - Minecraft PvP Survival Map
The Cherno
Game Programming - Episode 17 - Key Input
The Cherno
Game Programming - Episode 18 - Controlling The Map
The Cherno
Related AI Lessons
⚡
⚡
⚡
⚡
I Built a Free AI-Powered YouTube SEO Toolkit With Zero Budget. Here’s What Actually Happened.
Medium · Startup
How to Create a Second Version of Yourself Inside Obsidian Using AI (Step-by-Step Guide)
Medium · ChatGPT
How to prepare for Spain civil service TIC exam using AI in 2026
Dev.to · David García
Going Viral! How I Created AI Kissing Videos Step by Step Easily Using AIAI.com
Medium · AI
🎓
Tutor Explanation
DeepCamp AI