Font Library Performance Boost

I just discovered something major while working on my next game and reading the SDL wiki. It turns out that if you convert a surface to the same format as what it is going to be copied to, then the blitting will be much faster!

Therefore I used this function:

And then updated the file in the SDL version of my font library, Chaste Tris, and the current game that is in development. Now everything will run much faster which is ultra important especially for Chaste Tris because it writes a lot of text to the screen and every single character is nothing more than a SDL_BlitSurface call.

In other news I have recently created a Patreon account.

It’s dedicated to my programming projects and I hope to share the news of my current game development and how I compile and run things with SDL and the C Programming Language.

Windows SDL environment

Compiling software on Windows is never as easy for me as it is on Linux. However I am experienced enough with the command line to create a helpful script to assist me when building my SDL programs. I took these screenshots of my text file full of my notes so that I can always remember how I did it and help others who are on Windows but want to start making their own software with SDL.

SDL Chaste Font

I translated my font library to use the SDL library this time. This means I could use the same font functions when making an SDL game instead of Raylib. I plan to make a simple SDL only game at some point.

Below are some screenshots of code and a demo.

I do like SDL because I find the code easier to read in some cases. It just doesn’t have all the polygon drawing features that I typically expect such as drawing filled triangles. I am also very ignorant about all the features it has since SDL2. I also read that SDL3 is in development so it is quite possible that the features I want might be in a future version. Until then I will be learning more how to use SDL and make a much simpler game than Chaste Tris or Chaste Puyo were.

I am still deciding what type of game it will be and how I might implement it. I am playing other games to get inspiration.

Tetris Opening: SingleYou

I’m a regular on the Tetris Reddit I see some cool things. Someone mentioned this opener called the SingleYou.

I totally plan to try it out using my own game: Chaste Tris. I have been busy programming lately and am thinking about what future games I will make. I just started learning Lua and I do have the most massive book on C++ as well. I mostly use the C language and my Tetris and Puyo games were made with Raylib and C. But eventually I will get back to playing Tetris because it is my favorite game.

Also, there is a new Tetris movie coming out.

I intend to see it when it comes out!

Chaste Tris Manifesto

I have created and am maintaining 3 separate versions of the same Tetris game. They are as follows:

Original C version with Raylib library

Lua version with Love2dā€‹ frameworkā€‹


The difference between the 3 versions is that they are for different people with different preferences and technological needs. The C version focuses on speed of code and adding extra graphics and music to make it an enjoyable experience. The Lua Love2D version is designed to be simple and quick to boot up and play on any platform that Love2D supports, which are many. The PICO-8 version was made to be able to be played on the web on nearly any device imaginable, including touch screens. These 3 clones of the same game make my game stand out among other Tetris games. Sure there are plenty of others but they are usually done as a small project and then abandoned by the creator and don’t have the features that make Tetris enjoyable, such as the confusing controls and/or the ability to only rotate in one direction.

The official Tetris games published by major game companies are no doubt better than mine, but they have multiple programmers, artists, musicians, and often disappear from the market without warning. I have bought all the modern Tetris games available on Steam including Tetris Effect, and Puyo Puyo Tetris 1 and 2. I love them a lot but that doesn’t mean I trust the Tetris company when it comes to business practices, especially considering the complicated history of Tetris. I like my game because I can improve it as needed and for the first time in my life, I am actually a game programmer.

History of Chaste Tris

I want to explain what led to the concept for the first game and also why I made other versions, what the differences are, and why my game is unique among Tetris clones.

Being a fan of Tetris for almost my entire life, I became very sad when certain Tetris games previously available became unavailable either due to lawsuits and/or license changes.

The first delisting of Gameboy Tetris from the 3DS eshop a year before a friend bought me a 3DS was the first.

Second was the delisting of Tetris Ultimate, which was available on 3DS,Switch,Steam, and other platforms before it was also delisted. I have heard it wasn’t a very good Tetris game but I don’t like to see games disappear. Video game censorship is similar to book banning in my opinion with a few powerful elites deciding not only what information we access but even what recreational activities we are allowed.

A third delisting was Tetris Friends which disappeared due to the fact that Adobe Flash was removed from everyone’s web browser which also made all other flash games including Robot Unicorn Attack(that is a post for another day) impossible to play without people finding ways to keep alive old flash software and emulators to play their favorite flash games. It can be done but only for the people tech savvy enough to do figure it out had access to games that used to be available for everyone.

Because of these events and my love for Tetris above ALL other video games, I had the idea of creating my own. I knew I was not the first person to make a Tetris game but I wanted one that I could guarantee that I could keep forever because it would be me in control as the single programmer.

But at the time I knew so little about making games and I had never succeeded at making ANY video games. But what happened in 2021 changed my life forever. You see I had a roommate at the time who was also a lover of Tetris and still had a Game Boy. We laughed as we played Tetris on the gameboy and yet I noticed that River, my roomate’s transgender chosen name, could not play at higher speeds like I could and I thought about making a Tetris game that did not pressure people to make moves in a hurry.

But since I was not confident in my ability to make games, I decided to try first making a small version of Tetris that only included the I blocks which River called the “Long Boi”. By focusing on that one block and creating the right arrays in C I found that it was not hard to represent the blocks or the grid. I chose Raylib as the library for graphics and input because it is the easiest to use for game programming that I have found. All the hard work was writing my own functions to move, rotate, and check the collisions of the blocks. This took at least 6 months before I got it down just right and I had to fix a lot of bugs as my code grew bigger.

But after I got it working, I decided to also add the other Tetris blocks because my movement and rotation code would work just as well for them. Everything worked so well that I even published the game on Steam to bring it to a wider audience.

My game has gone mostly unnoticed in spite of months of promotion and updates. The same goes for the many books I have published.

But regardless of what happens, I am very happy with the work I have done and I find myself often playing my own game more than official Tetris games because it is relaxing and yet allows me to challenge myself to improve at Tetris as a whole.

And finally, I would like to say that the reason Tetris means to much to me is because it lets me forget my personal struggles and for a moment all the problems I have had disappear and I feel good about myself because I am a person with a mind who is capable of solving at least one problem: The problem of where to fit that next block!