Hello!
I'm Gustavo Pezzi 🇧🇷. I am a university lecturer in London & the founder of , where I teach low-level
#CS
&
#Math
.
At , everything is taught from first principles. Zero ego; zero gimmicks.
Come take a course with us!
🧉😉
If you're programming a game where a boat moves through water, you might be tempted (as I would) to change the V-shape angle of the waves behind the boat based on how fast the boat was moving!
What if I told you that that V-shaped angle is always 19.47°, regardless of how fast
Millitext is a font where glyphs are one-pixel wide.
It's an exploitation of how subpixels (individual R/G/B lights of a display) are triggered by certain colors. For example, magenta pixels trigger subpixels R and B, while G is left dark between them.
🔗
I remember reading about determinants in high school. The name was scary and not much context was given. 😦
For a long time, a determinant was just a value I had to blindly compute using a formula.
Here's what I would like to know about determinants when I first started... 🧵
When I was a kid, I wrote a small keylogger.
It was called expIorer.exe (with an uppercase "i") and I ran it in the school's computer lab.
I've done many great things in my life, but very few come close to the thrill of seeing my classmate's password stored in a raw textfile.
Ceiling is being raised. Cursor's copilot helped us write "superhuman code" for a critical feature. We can read this code, but VERY few engineers out there could write it from scratch.
I had a friend that worked in the support team and was famous for being too friendly with the customers. He was also very unprofessional so it was just a matter of time before something went wrong.
Once, the system admin of an important customer called and asked him for a system
1. Open Github
2. Search for "raycasting"
3. Download the code
4. Build the project and see it running
5. Continue your day not knowing anything about how a raycasting engine works
The NEW COURSE is finally out!!! 🕹️🙀
This is my love letter to the OG PlayStation!!!
We'll cover the PS1 Hardware, MIPS assembler, C & PsyQ SDK, 3D graphics, fixed-point math, PS1 quirks, RISC pipeline, and much (!) more...
Enroll: 🔗
See you inside!
Lately, I've been studying the early days of 3D polygons on home consoles for a new course.
We often think 3D on the
#PS1
or
#Saturn
, but there was a bracket of time where special chips were added to both
#SNES
&
#Genesis
to help them render fast polygons.
Here's a review...🧵
Did you guy know that Linux is so Developer-Oriented that it has a special folder called /dev/ where you are suppose to develop all your projects? It's true, check it on your Distro!
Hardware & OS are extremely more complex now and programmers sit too far from the machine. Plus, there's an overwhelming number of conflicting learning resources.
What we call "software development" today is mostly just glueing pre-baked scripts around & editing config files.
Students often ask me for suggestions of books that I believe every programmer should read.
For many years, my answer has been consistently:
• Nature of Code
• Computer Systems: a Programmer's Perspective
Which book is in your "must read" for every programmer?
Did you ever stop to think how lucky you are to find joy in programming? Or how privileged we are to be intrinsically motivated to study things just for fun?
Some people are so handicapped by utilitarianism that I'm sure the only reason they eat food is to keep from dying. 😔
I’ve said it a few times already, but worth repeating myself.
Programming is a tool; a means to achieving an end goal.
Not the end goal in and of itself.
In 3D game programming, something called "Projection" comes into play.
The most common type of projection is called Perspective Projection, where objects that are close to us appear big, and objects that are far away from us appear small.
Let's review how this works... 🧵
Found this on
@OpenProcessing
today.
🔗
Since random(0,x) always returns a number in the range [0,x) that is less than x. If we start x with 1, the next iteration will shrink the output and we end up with pixels that are always closer to the unit length.
I am *this close* 🤏 of rage-unplugging all my computers from the internet to go hide in my cabin in the woods with all my retro hardware and my jazz albums.
Satya Nadella says Windows PCs will have a photographic memory feature called Recall that will remember and understand everything you do on your computer by taking constant screenshots
Unpopular opinion,
In the 90s we had lots of different and quirky operating systems; not simply different GUIs but different philosophies on how to operate.
Inferno, Plan9, QNX, BeOS, Menuet, AmigaOS, SunOS, NeXTSTEP, OS/2, RISC OS, etc.
...now everything is just Linux. 🙄
I have been working as a programmer since the Mesozoic Era and I am ashamed to confess I did not know about this technique. Now I know why all the submenus I've created in the past behaved weirdly.
Unless you're writing a simple script to move a couple of your own files around from one folder to another, 0.4 seconds for a system core task is an eternity!
@claudierla
Um amigo meu e os sócios dele compraram um prédio na planta. A ideia era colocar a empresa depois de 2 anos de construção. A construtora faliu, não concluiu a obra, e só ele perdeu uns ~800k.
I had someone asking the other day if I was not "worried that an attacker could exploit the potential unsafe C code."
My dude, this is a PS1 game! The only 'attacker' I'm worried about is someone literally breaking into the front door and stealing the console. 😐
By the way, this is really not one of those "My friend did something" stories. I would definitely say if it was me.
I also remember he spent the entire night recreating the original AUTOEXEC.BAT content by hand! 😂
Lessons were learned.
10 JavaScript/TypeScript features I avoid:
let
var
const
if
else
switch
for
while
true
false
They’re not always a problem. But, they’re overused, and can often be replaced by better alternatives.
LDA
LDX
LDY
BNE
BMI
BPL
JMP
STA
STY
STX
ADC
SBC
CMP
CPY
CPX
AND
ORA
JSR
RTS
Our school is giving away a copy of K&R's The C Programming Language.
To enter the draw, simply add a reply to this tweet with your favorite 32-bit number.
Make C great again!
linkedin is truly remarkable. every single post in my feed there is like a cringe-bomb precision-engineered to make one recoil in disgust. i don’t think i have ever seen anything normal or human there. there are 4chan boards that look sane in comparison.
Historically,
#C
was not always the default language for writing operating systems.
There is a rich tradition of operating systems written in
#Pascal
, with the probably best-known example being classical Mac OS (not to be confused with macOS, that is written in Objective C). Up
I've been listening to
@3blue1brown
's podcast lately, and there's one common factor in every answer to the "what made you choose math" question.
It goes something like this:
"There was this teacher..."
It's fun to see the things that we learn in our courses being used in real games.
#Gouraud
shading was used in many popular games, including lots of
#Nintendo4
and
#PS1
titles, but I only really learned about it many years after.
Here is how Gouraud shading works… 🧵
We mostly speak about polygon-based graphics in our 3D rendering course, but we must remember that there were different graphics techniques used by some early 3D engines.
One example is Andrew Spencer's game
#Ecstatica
, which rendered characters using ellipsoid primitives!
The
#NES
Programming course is out!!!
I'm super happy with this one! The
#Nintendinho
was my first
#console
ever, so I put a lot of love into this course.
Let's learn
#NES
6502
#programming
together. ♥️
No ego, no gimmicks.
LINK:
See you inside!😉
The state in Brazil where I grew up is now under water. Everything I knew, the friends I had, the houses I lived, the animals I loved, even the waterfall I hiked by... gone.
Everything you know & work hard for can crumble down in a matter of seconds.
It's been a tough week. 😔
Lord Kelvin described this pattern based on his observations and a rough interpretation of the physics involved. But nowadays we are studying other elements that come into play and can cause small differences based on the object's speed.
Physicists have used satellite images and
Everyone can smell this type of behavior. If you think otherwise you are just playing yourself.
You don't do networking by going to conferences, looking at people's badges, and trying to mingle with high-profile names expecting them to add you to their list of trustees. That's
Grad Students: Networking is critical for success in academia. But the real question is WHO to network with. I’ve known grad students who will spend time at conferences drinking beers in the bars with grad students from unranked programs. Is that 1/
Here's a super quick trick that can help you generate a random-looking grid maze for your raycasting project:
1.) First, generate the map borders (walls around the entire perimeter):
⬛️⬛️⬛️⬛️⬛️⬛️⬛️⬛️⬛️
⬛️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬛️
⬛️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬛️
⬛️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬛️
⬛️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬛️
Most projects that we code at
@pikuma
are an excuse to review some cool math.
The raycasting course is probably the most beginner-friendly of them when it comes to reviewing the basics of trigonometry. It's also a great introduction to some fundamental ideas of 3D graphics.
A complete immersion into the world of NES programming!
🔗
We'll learn 6502 assembler together & explore the sparks that make computers tick.
The NES rudimentary hardware is a perfect sandbox for us to learn important low-level programming topics. 😉
I always find it funny how most people telling beginners "don't learn C, just start with C++" or "C is unsafe, just use Rust" are the ones who know C well enough and use that knowledge daily to escape the quicksand when things turn south in a modern language.
In this course, you'll learn how a 3D software renderer works by coding a complete 3D rasterizer from scratch in C.
• math review
• wireframe
• flat-shaded polygons
• texture mapping
• loading OBJ files
• camera
• clipping
• etc.
Enroll now: 🔗
Back in 1995,
@idSoftware
decided to get a
#Cray
Supercomputer to develop
#Quake
.
They wanted all devs working inside *one* powerful machine.
Cray accepted to sell id a 6400 for half-price ($500k), given that they added a Cray computer to one of the levels of the game... 🧵
I'm moving stuff around and I forget how heavy books are! I have a lot of books and what you see here is probably just ⅓ of them.
"So, Gustavo... if you like to read so much, why don't you write a book instead of recording lectures?"
Look, I'm sure it would be a lot easier to
I am adding cheat sheets to all the courses that are based on assembler. That means MIPS for the
#PlayStation
and 6502 for both
#NES
&
#Atari2600
.
The ISA I'm including is simplified, but it's enough to help with the exercises.
Fingers crossed that one day we can add the 68000
Lots of people saying either that this works because malloc uses 16, 32, 64 etc. memory blocks, or because malloc allocates an amount of memory blocks that is equal or greater than the requested amount...
Where is your God now?
A nice one-liner that shows how useful a bitwise & can be. Enabling a night mode effect an be done by simply masking the original color to only filter the green channel.
color &= 0xFF00FF00;
"After 25+ years in the VFX industry on big Hollywood & Bollywood projects, I cannot begin to express how amazing it is to render my own spinning cube. I stare bewildered and in awe of my simple creation. Thank you!" ❤️