3 ms·
I have so many great memories of learning coding by writing little games that used Mode X for the graphics. I was able to get so much experience experimenting
by NathanKP 12y ago
I have so many great memories of learning coding by writing little games that used Mode X for the graphics.
I was able to get so much experience experimenting to optimize my code to draw stuff on screen fast enough to get a decent frame rate, and I learned a lot about pointers, memcopy, peek, and poke, etc. One of my biggest "breakthroughs" was when I realized that drawing sprites by looping through one pixel at a time with an if statement to either draw or not draw depending on whether the pixel was transparent wasn't as fast as preprocessing the sprite using a form of RLE and then copying strips of pixels in one operation with memcopy, essentially skipping over the transparent areas for free. Later I found out that technique had already been around for decades, but 11 year old me was super excited when I figured it out.
- lttlrck 12y agoI 'invented' that RLE trick too! I also had control codes that would create patterns and dithers. Oh the hoops I jumped through to get 50 Hz scrolling on a 486 - good times.