2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
May 20-June 4: Conquer the 2D physics engine.
June 4th-June 13th: Master "3D Mathematical Foundations".
June 13th - June 20th: Complete the "3D Graphics Tutorial".
June 21st - June 22nd: Complete the "Raycasting Game Tutorial".
June 23-July 1: Master "Master Tips for Windows Game Programming".
July 2nd - July 6th: Conquer "Atari 2600 Assembly Game Development".
July 7-July 11: Master "x86/x64 Assembly Language".
Next goal: "3D Game Programming Master Skills"
This is another expedition to the "alien" planet. I rode 60 kilometers yesterday. This was not an ordinary 60 kilometers. The last 20 kilometers were all mountain roads. I was exhausted when I came back. I was not in a very good mental state today. I can say that I "gritted my teeth" to finish the tutorial.
However, I found that I liked this feeling. It was not as strange as the Atari 2600 assembly language.
Learning assembly language is like playing a top-notch game. You really can't make any mistakes. I took more notes than I did in a whole semester. Even though there were only a few sentences, I wrote dense comments on them. I wish I could study so hard when I was in college.
I took two tutorials this time, one for x86-32 bit and one for x86-64 bit. Both have their strengths and weaknesses. For example, the first tutorial didn't teach how to call functions until the end. The 64-bit basics were well explained, but there was no advanced application at all.
The biggest realization I got from this study is that I used to think that assembly language was something relatively "low-level" and "backward", after all, nowadays languages are all labeled as "high-level languages".
This gives me the impression that if the programming languages I use are guns and cannons, then assembly languages are cold weapons. No matter how I think about it, I feel that it is relatively "backward". I had the same impression when I learned Atari 2600 assembly.
However, after I learned x86 assembly, this impression completely changed. Assembly is simply a "next generation" weapon, it is not a cold weapon, but "high technology", it is a laser sword.
He is just "difficult to use", not "weak". On the contrary, he is ridiculously strong.
In the past, I heard people talk about learning assembly language, and I saw more than once that compilers are very advanced now, but even if you learn assembly language, the code you write will not be as efficient as before. Now I know that this is pure bullshit. From MMX to AVX, this kind of parallel processing capability cannot be written in code no matter what, and no compiler can do it. You must use assembly language to use this powerful function.
And my application is exactly the game engine, which is where batch processing of graphics is most needed.
When I first learned assembly language, I only saw in my book that some places that require performance still need assembly language. That was just the author's simple feeling. I actually didn't expect assembly language to be so powerful.
This is actually due to my current "less is more" thinking. Because I used to think about making games, always thinking about cross-platform, PC, and mobile phones. Now that I make my own engine, the requirements can't be so high, and cross-platform is out of the question, so I focus on making the PC platform well. That's why I have the idea of learning assembly. If I always think about cross-platform, I may not have this idea.
There was a sentence in a lecture by Professor Jin Yinan that left a deep impression on me:
Whenever you do difficult things, you will gain something.
This has almost become one of my life creeds. This time, the power of this sentence has been confirmed again.
Learning assembly language has brought me more benefits than I expected. I can't wait to modify some of my previous codes. For example, I used to have an Alpha blending code, because DirectDraw of DirectX does not support Alpha channels. So I wrote a section of Alpha blending to support semi-transparent objects. This thing is extremely slow. The original 800 frames can be pulled down to 200 frames in an instant. And only the protagonist's aircraft uses this algorithm. If assembly language is used, I believe it can be much higher. Of course, this is just an attempt to improve it. In fact, it mainly depends on hardware. If there is only Blt, my frame rate can reach more than 4,000. This cannot be achieved by changing the algorithm.
However, there are still areas that can be improved. For example, the function of my SpritePack. This is something that cannot be controlled by hardware, and it is all achieved by my algorithm. The efficiency improvement of assembly can provide huge value.
Actually, I wanted to learn Python + machine learning. I don't know what happened during this period, I want to learn everything. I feel that AI will be a very important piece of the puzzle in my game development. I am now using AI to make images and original paintings, and it is very easy to use. I want to learn more about this knowledge.
But I haven't read books during this period. I have been studying tutorials all the time, so I have been sitting all the time, and my waist can't stand it. If I study with a book, I can lie down while reading, so I chose to study "3D Game Programming Master Skills". This relieves the pressure on my waist.
After this period of time, I will see if I can learn Python.
come on!