![pikuma](/img/default-banner.jpg)
- 29
- 752 571
pikuma
United Kingdom
Registrace 1. 03. 2019
An education platform teaching the fundamentals of computer science & math. Zero ego. Zero gimmicks.
How to Make PS1 Graphics
This video is a review of how PlayStation graphics work and why the artefacts of the PS1 make games look so unique.
We explain the hardware and software limitations of the PlayStation, going over the reason why PS1 graphics artefacts happens.
The main topics covered by our review are:
- Wobbly textures
- Polygon jitter
- Lack of FPU
- Fixed point representation
- Lack of depth buffer
- Lack of mipmapping
- PlayStation dithering
- T-junction gaps
Links:
PlayStation Programming course: pikuma.com/courses/ps1-programming-mips-assembly-language
Parking Garage Rally Circuit: store.steampowered.com/app/2737300/Parking_Garage_Rally_Circuit/
Chapters: 00:00:00
Intro 00:02:38
Visual artefacts
00:05:36 Hardware specs
00:10:13 Drawing primitives
00:12:07 Drawing on VRAM
00:18:13 Wobbly textures
00:27:46 GTE RTPT
00:31:41 OT & Lack of depth buffer
00:38:14 Polygon jittering
00:42:21 Fixed-point representation
00:50:33 Lack of subpixel rasterization
00:56:07 T-junction gaps
01:01:53 Lack of mipmapping
01:04:49 Conclusion
For comprehensive courses on computer science, programming, and mathematics, visit: www.pikuma.com
Don't forget to subscribe to receive updates and news about new courses and tutorials: czcams.com/channels/8GR0g1deJB_gxWxi_vuxhA.html Enjoy!
We explain the hardware and software limitations of the PlayStation, going over the reason why PS1 graphics artefacts happens.
The main topics covered by our review are:
- Wobbly textures
- Polygon jitter
- Lack of FPU
- Fixed point representation
- Lack of depth buffer
- Lack of mipmapping
- PlayStation dithering
- T-junction gaps
Links:
PlayStation Programming course: pikuma.com/courses/ps1-programming-mips-assembly-language
Parking Garage Rally Circuit: store.steampowered.com/app/2737300/Parking_Garage_Rally_Circuit/
Chapters: 00:00:00
Intro 00:02:38
Visual artefacts
00:05:36 Hardware specs
00:10:13 Drawing primitives
00:12:07 Drawing on VRAM
00:18:13 Wobbly textures
00:27:46 GTE RTPT
00:31:41 OT & Lack of depth buffer
00:38:14 Polygon jittering
00:42:21 Fixed-point representation
00:50:33 Lack of subpixel rasterization
00:56:07 T-junction gaps
01:01:53 Lack of mipmapping
01:04:49 Conclusion
For comprehensive courses on computer science, programming, and mathematics, visit: www.pikuma.com
Don't forget to subscribe to receive updates and news about new courses and tutorials: czcams.com/channels/8GR0g1deJB_gxWxi_vuxhA.html Enjoy!
zhlédnutí: 7 770
Video
A Quick Introduction to C Pointers
zhlédnutí 1,7KPřed měsícem
This video is a beginner-friendly introduction to Pointers using the C programming language. We go over the main types of pointer declarations, as well as a discussion on the "address of" and the "arrow" operators. Links: PlayStation Programming: pikuma.com/courses/ps1-programming-mips-assembly-language Chapters: 00:00 Intro 01:07 What are C Pointers? 02:36 Pointers & Dynamic Memory Allocation ...
Understanding Bit-Shifting Operators
zhlédnutí 1,7KPřed 4 měsíci
This video is an extremely beginner-friendly introduction to how bitshifting works & how bitshifting was useful in older game programming code. We'll start by taking a look at the math behind positional notation, and how bitshifting in code can be used as multiplication and division by 2. We'll also look at some examples of bitshifting in the source code of Wolfenstein 3D (github.com/id-Softwar...
Creating a Game Loop with C & SDL (Tutorial)
zhlédnutí 51KPřed rokem
This video is a beginner-friendly introduction on how to create a game loop using C & SDL. We'll start by discussing how to install SDL on Linux, macOS, and Windows, and we'll then proceed to create a very simple C application that uses SDL to control game objects. We'll briefly discuss how to create an SDL window, render simple objects on the screen, cap our framerate, and achieve framerate-in...
Triangle Rasterization
zhlédnutí 25KPřed rokem
This video is an introduction to how triangle rasterization works. We'll start by discussing a parallel algorithm for polygon rasterization based on an article written by Juan Pineda in 1988. We'll review the basic algorithm and implement a simple version using C & SDL. But more than just a simple rasterizer, we'll cover some other important ideas in this video: - Rasterization rules (top-left ...
Verlet Integration
zhlédnutí 24KPřed rokem
This video explains Verlet integration and some other important numerical methods in the context of game programming. We'll start by learning how numerical integration works. The first numerical integration we'll review is called Euler method, and it's a beginner-friendly way of understanding about simulating movement. Euler integration is the most basic numerical integration technique, and it ...
Voxel Space (Comanche Terrain Rendering)
zhlédnutí 26KPřed rokem
This video explains one of my favorite algorithms ever: The Voxel Space engine. This technique was used to render the terrain in the Comanche: Maximum Overkill game. We'll start with a high-level overview of the technique, and proceed to write a very short implementation using C and a graphics framework called DOS-Like. Source code: github.com/gustavopezzi/voxelspace DOS-Like framework: github....
How C++ Vector Works
zhlédnutí 21KPřed rokem
In this video, we'll take a closer look at C vectors (STL implementation of a dynamic array). We'll learn how C vectors are implemented, and code a very simple custom class with the absolute minimum needed from a dynamic array data structure. std::vector is a sequence container that encapsulates dynamic size arrays in C . The elements are stored contiguously, which means that elements can be ac...
How Retro Video Game Graphics Work
zhlédnutí 15KPřed rokem
This video is a light conversation about how old-school video game graphics work. We discuss how popular arcade machines and other game consoles from the 70s and 80s display graphics on the screen. Special mentions to early Arcade, the Atari 2600, and the Nintendo Entertainment System. Pong Simulation at Circuit Level: www.falstad.com/pong/index.html Atari 2600 Programming with 6502 Assembly: p...
Linear Collision Resolution in 2D Game Physics
zhlédnutí 11KPřed 2 lety
In this video, you will learn a game physics technique to resolve collisions between rigid bodies. We'll learn the linear impulse method, used to resolve collisions by applying linear impulses to the bodies that are colliding. For a full course on 2D Game Physics, visit: courses.pikuma.com/courses/game-physics-engine-programming Chapters: 00:00 Introduction 02:09 The Impulse Method 03:19 Collis...
Tools to make a Game Engine in C++
zhlédnutí 53KPřed 2 lety
This video is a summary of my favorite C libraries and dependencies to create a game engine from scratch. Game development has always been a great helper to get my students motivated to learn more about more advanced computer science topics. Creating a game engine is a great opportunity for us to grow as programmers. Links: Create a 2D Game Engine with C : courses.pikuma.com/courses/2dgameengin...
3D Software Rendering Graphics Pipeline
zhlédnutí 20KPřed 2 lety
This video goes over the stages of the graphics pipeline I like to use in my 3D software rendering projects. One of the first things game programming students read in most graphics books is the famous "Graphics Pipeline." Surprisingly, the term confuses some programmers, especially because most books already present more complex pipelines used by OpenGL, Direct3D, and Vulkan. That's why I decid...
Vector Rotation (Derivation & Geometric Proof)
zhlédnutí 12KPřed 2 lety
Most game programmers know that we can use a matrix to rotate a vector around the origin. They also probably know that a vanilla rotation matrix looks something like this: [ cosθ -sinθ ] [ sinθ cosθ ] But, do you want to understand where these formulas come from? In this video, we'll learn how to derive the formulas for vector rotation in 2D, including the mathematical geometrical proof of how ...
Perspective Projection Matrix (Math for Game Developers)
zhlédnutí 52KPřed 2 lety
In this video you'll learn what a projection matrix is, and how we can use a matrix to represent perspective projection in 3D game programming. You'll understand the derivation of a perspective projection matrix in 3D computer graphics. The matrix I'll derive is as used by left-handed coordinate systems like DirectX (OpenGL uses a right-handed system). In perspective projection, objects that ar...
Matrix Multiplication (A Simple Review)
zhlédnutí 7KPřed 2 lety
This video explains how to perform matrix multiplication. This is a simplicity-first overview of the multiplication algorithm and it's aimed at programmers and game developers. For comprehensive courses on computer science, programming, and mathematics, visit: www.Pikuma.com. Don't forget to subscribe to receive updates and news about new courses and tutorials: czcams.com/channels/8GR0g1deJB_gx...
Collision Detection with SAT (Math for Game Developers)
zhlédnutí 23KPřed 3 lety
Collision Detection with SAT (Math for Game Developers)
Math for Game Developers: Fundamentals of Calculus
zhlédnutí 22KPřed 3 lety
Math for Game Developers: Fundamentals of Calculus
Math for Game Developers: Why do we use 4x4 Matrices in 3D Graphics?
zhlédnutí 70KPřed 3 lety
Math for Game Developers: Why do we use 4x4 Matrices in 3D Graphics?
Introduction to Object-Oriented Programming with Lua
zhlédnutí 19KPřed 3 lety
Introduction to Object-Oriented Programming with Lua
Installing Lua on Windows Terminal & VS Code
zhlédnutí 85KPřed 4 lety
Installing Lua on Windows Terminal & VS Code
How to link SDL 2 with Visual Studio on Windows (2021)
zhlédnutí 45KPřed 4 lety
How to link SDL 2 with Visual Studio on Windows (2021)
GDB Debugging: How to Debug a C/C++ program
zhlédnutí 37KPřed 4 lety
GDB Debugging: How to Debug a C/C program
UNIX vs Linux: Differences & Similarities Explained
zhlédnutí 15KPřed 4 lety
UNIX vs Linux: Differences & Similarities Explained
This is really really helpful, I am going to buy your course as well 😊
How can this transfer to, say, 3 dimensions, instead of 2D, for cases of working with a 3D OpenGL/C++ engine?
drghtfbyxc
You're a good teacher
This thing is perfect for Shaders and Compute shaders
Hallelujah! Lots of fun doing it!
@@guilhermecampos8313 That's the goal. 🙂
damn i have to drop this comment praising how valuable this is. Amazing, truly amazing that you take your time to explain this
feel like theres a filter
Great video! One way of explaining perspective correct texture mapping that was particularly effective for me is as follows: Consider two quads of the same screen-space shape. For a given set of 2D coordinates, you could have either a small object up close, or a very large object far away, mapping to the same exact screen-space position. The close up object will have fine details visible, and the details of the far away object will be harder, or impossible to see, but a 2D rasterizer will have no way to differentiate between these two objects. This is because of depth. Vertexes are affected by depth, the further away they are from the camera, the closer in 2D coordinates they will become, and of course the same must apply to the details of the object (texels). Texels that are further away must be shrunk according to depth.
First, we do not need matrices to calculate Xp and Yp. Matrices will not do much if you do not understand how to manipulate the 3d vertices without them :) Aspect ratio is not needed at all, because you do not change the aspect ratio of displayed objects. In real life cameras eye and lense does not care about aspect ratios - the fov angle is always the same. zfar is not needed at all. People stop complicating easy things.
Looks awesome. Also implemented some stuff of it. But one thing i don't understand is why acceleration is multiplied twice with dt. When i calculate the velocity then it is the velocity between two frames. This is why velocity is divided by dt to get the velocity for one second. But as we are frame dependent we multiply again by dt. So in the end the division and multiplication of dt cancels and we just can add the velocity as it already is the velocity for one frame step. Same goes for acceleration. I would just add (acceleration * dt) to get the acceleration for one frame. But in Verlet it has to be (acceleration * dt * dt). Why?
I figured it out. In Euler we do add "acceleration * dt" to velocity. But then again just "velocity * dt" is again added to the position. So for acceleration it turns out to be "velocity * dt * dt" that is added to position. Btw. thanks for the video, its really great and your content is awesome.
Great lessons, thank you! About your end question: pseudo racing game (Top Gear, Outrun, Chase HQ, etc).
I love u omg. Best lecture abput homogenous coordinates
Amazing video! Thanks for sharing all that detailed knowledge with us! Gracias, Gustavo!
pretty sure aspect ratio is w/h. or am i mistaken?
Hi there. Did I make a mistake? So, for example, if we have a resolution of 800x600, the factor that we are looking for to multiply our x component is 0.75. That is h/w, no?
What about BGFX as a rendering library? Would it be efficient? Nice video btw❤
Dude......... Thank you!!!!
Could someone please go over spacerace diode sprite… I’ve looked everywhere on the net and there is nothing about it… I don’t see how diodes could render an image without memory… it would def be associated with the clock timing on which part of the space ship to draw, correct?
Very cool clip! Maybe one day a clip with PS2?:)
thanks man!
I need to type "list" to show the source code, otherwise it shows the asm
I have a question, verlet only need acceleration to update position. but in most case, we must provide velocity not acceleration, so in this case how can we update position by velocity
Thank you. Very clear explanation.❤
What a beautiful concept
mano não esperava achar um br kkkkkkkkkkkkkk
Hello Gustavo, how are you? Are you Brazilian? I sent you an email
why is main() returning FALSE?
GOod question. So, a C executable might be called by the operating system or other application, and some of these applications or OS would expect a return from your C program. This return is basically an "error code". In our case, since everything ran perfectly and there were no errors, our return error is 0. If there was some issues mid-program, we might also return something else. But in this simple example, return 0 at the end is enough. Some modern versions of the C language also allow programmers to return the constant EXIT_SUCCESS, which is exactly the same as return 0.
Cara voce eh uma lenda pra quem quer/ja trabalha com graphics e eh brasileiro
Man, I really want something like this to exist for the Sega Saturn. I realize that would be a ton of work for probably not much payoff, but there is just _nothing_ online aside from 30yr old documentation and the dug-up SDK library from Sega. It would be so nice to find an _actual_ explanation of how to put all the pieces together, _especially_ as a kind of rival/companion course to the PS1 one.
In terms of 3D graphics, the biggest differences are that Saturn's VDP1 uses forward texture mapping (hence no UV coords, it always tries to draw a whole texture, aside from clipping commands), this causes issues with pixels being filled multiple times, which makes transparency on distorted quads look quite bad. Because of this, sega's engineers added the mesh feature. I am willing to bet this overdraw is part of the reason for Saturn's significantly lower fillrate vs PS1. The lack of perspective correct texturing and z buffering is exactly as on PS1, but polygons seem to jitter a bit less due to higher vertex coordinate resolution. Interestingly, there is a hacky, quasi horizontal mipmapping feature called high speed shrink, which skips drawing every other texel in a texture bitmap. The intent of this is to improve performance, and its doesn't reduce texture aliasing like real mipmapping, but it is very interesting!
I watched the part of your course where you went over that fixed point notation just few days ago. I immediately thought that if we assume the 1.0 being equal to 1 meter, 4096 parts means ~0.24mm fractional precision. No way that was the reason for the jitter. Great in-detail explanation!
@@arachromatics I like that!
you have easily become one of my favorite programming content creators. Super informative, creative, and entertaining. Thank you for what you do.
\{ "version": "2.0.0", "tasks": [ { "label": "Run Lua", "type": "shell", "command": "lua54", "args": [ "${file}" ], "group": { "kind":"build", "isDefault": true } } ] } -- Also work for lua54
An amazing explanation. Congrats bro :)
I have always preferred 2D graphics over 3D but when I think of 3D games I *love* they are all PS1/Saturn era (Dreamcast also). Something about the "papercraft" look of things seems so stylish to me! One question, I see you have quite a few courses on retro consoles. If I have programming experience but know nothing of game development which course would you recommend I start with. Thanks!
That's a good question. There is no order and no pre-requisites, they should all be self-contained. That being said, lots of people like the 3D graphics one and the raycasting one is very beginner-friendly as well.
Love these deep dive videos. Could you perhaps make a series about coding a PS1 game? Also, what languages are needed to learn to become a game dev, etc? 😎🙌
@@sarundayo It's already done. 🙂
That's a great great video Gustavo !! 🎉🎉🎉🎉👌👌 - Learnt so much in just 1h
truly the best sdl explanation i have seen clear and concise thx very much!
T-junctions also cause gaps in modern floating point hardware. It's less noticeable but they're there. The reason we rarely see them is because devs rely much more on 3D tools rather than raw polygon manipulation, and tools have become more advanced so T junctions are not easy to do by accident and they clearly appear as a gap in the mesh.
@@DiThi Absolutely. 👍
Awesome video! If you could do the same for the nintenfo 64 it would be awesome x 2! I always wanted someone who make a n64 programming tutorial, but there is none easily understandable to find.
I rarely subscribe to a channel after watching just one video. That was amazing
I remember that some PS1 games had no warping textures, but I guess they just used some clever trick to fool you they were not warped :)
I believe so. For example, even Wipeout subdivided the textures so much that warping was not that noticeable. It's still there, but less.
How to Make PS2 Graphics or dreamcast? was fun!!
Can you make a video about replicating the textures from Sega's old AM2 games like Virtua Fighter 2?
"I dont vstr how long this vidoe takes this is super fun" <3
Esse cara é diferenciado! Awesome video dude!
Gustavo, thank you for another great video. I have learned so much from all your courses. Thank you for all that you do
aaah, good old PS1 coding memories… the PS1 was definitively the most exciting platform in my game dev career - cheers for bringing those memories back, great video! I hope many, many (aspiring and even already in the job) game coders take your course, since PS1 programming was and is so special and unique - it was one of the last platforms you can really push to extremes by using (sometimes weird) optimization techniques and tricks you do not find elsewhere, and helps to improve your general programming skills big time
Thanks for the really good video! This is a minor complaint, but I wish you had a better camera and green screen - everything else is perfect, though. 🥳
@@davidavidavidavidavi I'll see if I can save some money for a new camera soon. 🙂
@@pikuma you can easily get over the treshold with a seasoned android phone. Don't stress much about it. Do, then do better ;)
I would highly suggest not getting a better camera or green screen. The viewer does not deserve to nitpick and rain on the parade of such quality and rare to find content. They do not realize how lucky they are to have the content at all.
@@xyzabc123-o1l Nah, that's all good. 🙂 I honestly thought that as well once I saw how blurry it looked. I know it's not a deal breaker, but I'm sure it will be worth the investment. 👍
@@pikuma good luck to you with your future work in any case :)