I'm continuing and finishing the thread with my own engine. It's for a game in the Free Basic programming language, using various libraries to suit my needs. This includes MP3 audio, PNG graphics, and True Type fonts with Russian language support. This time, everything worked! I managed to get past the cycle of problems. And everything works! Hurray! I'm so happy!
The thing is, Free Basic doesn't have a number of built-in features. Like working with PNG files, it can't read MP3 files, and so on. But you can always find a third-party library. So, this is my first attempt at setting this up. And it worked.
FreePng, for working with PNG files. This is a 32-bit color depth. Transparent backgrounds are enabled only through the ALPHA drawing mode. And not TRANS. I spent a lot of time fiddling with this. I needed to enable the ALPHA mode.
I learned how to scale images. The pixel magnification is exactly what I needed. No anti-aliasing. Basically, we're writing our own zoom function. And we're connecting it to image creation. Basically, we're scaling all the pixels, turning them into larger squares. Drawing point-by-point. We're actually transferring the image point-by-point.
I used the FBSound library for sound. And everything worked right away. I learned how to play sound. Everything was fine with the music file, too. But there was a small issue with stream playback. There was a sharp sound at startup. I fixed that, too. I switched from stream mode to just file playback. Everything worked. And there are sounds. Like character movement or character sounds. And a musical theme. Sound was the easiest part.
For TrueType text, I used the FreeType library. Fonts were a bit tricky. Especially in Russian. I just needed to save the program text file itself in UTF8 with BOM encoding. I spent a long time trying to figure out why it wasn't working. That was my last resort. Could the encoding of the source file really have an effect? I spent a lot of time debugging, so to speak. I started from what I saw on the screen, line by line, looking for the problem.
Now I need to organize all this into BI - BAS blocks. So that all the functions I work with are there. For example, FTText. That's where I work with text. Library functions and what I've wrapped in my functions. And a few other little things. Like where to put the library files. The compiler doesn't always see them. And then I can start making my own games. With these technologies I've already mastered.
I spent a lot of time setting up all these libraries. But in the end, everything worked. Now I have sprite images in PNG format, 32-bit color. With a background cutoff. And I can scale them pixel by pixel. It's the perfect solution! I'm even pleased with myself. I can play an MP3 file as a theme song.
And I can also create sounds for all events in the game itself. Gunshot sounds and explosions, for example. And the theme song plays. The volume can be adjusted.
And also, separately, these are fonts. TrueType format. They're great fonts. They have different languages. English, that's clear. Russian is there. And I can display all of this. In different sizes. Different colors. Set a background for the text. There were some problems with that, but I managed it.
And all of this will now help me in creating the game!
Although I still have a few questions. About the library, how to connect it, some tweaks. But you can leave it as is if you need to. Where do I find the files for the library?
Dima Link is making retro videogames, apps, a little of music, write stories, and some retro more.
GVim – it looks like Windows 3.11 and it is a advanced text editor
GVim – it is very interesting program. Code editor, text. With interface of style – retro under windows 3.11. And, something like, a program for a cool programmers! For those one, who is ready to jump into a rabbit`s hole!
Fist time, I give a try to use this program in 2023. But! But, once again - here it goes different – but words! Complicated! Hard to understand! Unknown! I want it, but I cannot to do this! Interesting, but too complicated! Give a try – something to understand, to learn. And, it not works for me, I failed. And, I take a decision to left it at the level of the idea. So, it was a year 2023 experience.
And, with this background, what a surprise I have. When in 2024, I find a programming language Free Basic. And they give you a compiler. Compile by yourself. And. write with code editor – the one you want. So. this is a serious attitude. And, I decide – I have, already, give a try with GVim. I want this try again! And, with easy way, I roll into this theme. As a hedgehog I roll. At the most easy level. Write code. Commands, some easy of them. And everything is ok, it works for me! Yes, I need to read and learn, to dig a theme. But, everything works! And it is not looks hard for me! Level of difficulty was normal, very ok level! It was a very positive step!
To write a code from something like a text and compile by your own hands - it is so cool! And it is so cool to use such programs like GVim. There is also EMacs. But, I know nothing about it, except that such program exists. It is, also, as a code editor. Also, for a programmers. Also, it is a serious theme. And even, there are something like a conversations. At the level – what to select – GVim or Emacs.
GVim – it is very advanced editor for text or code. Very advanced. For me, it is something with the ideas of frontier as a Norton Commander for MS Dos. Or Volkov Commander for MS Dos. I am serious. So, it is a most simple way to understand about, that it is a very advanced soft. For a true programmers. And this is a thing of intelligence and habit to use such tools. So. from the first time, I guess, you cannot to start to use it easy. You will fail. In the end, I am for myself, use it at the simple level. Most minimum. File open, to go some place. Copy and paste strings. To compile! Fascinating! This GVim works with command line. So, straight from the GVim you can to compile! Or go to catalog with the help of MS Dos command. Class! It is, looks like, a program with unlimited capabilities.
Maybe, because of this kind of programs. Programmers looks like in a movies, as a super-humans. So, everything is flashing at the screen, then yes it is. So, it jumps a picture here. Programmer writes a command there. This makes a call for something else. So, everything is so bright! Lots of colorful text at the screen. Beautiful pictures. Lots of code fragments.
By sides. By center – picture. And, this kind of way – it is shown as programmer. And, this is co cool and positive! I, even, think, it is true and it is like this! When, you have a knowledge and head works well! At this level – you still need to reach it! And all of these miracles and different colors – they are in your head! World is starting to bloom! So, with this I can to agree!
One more interesting thing, there is a Vim code editor. And, I use GVim. So, this is, also, a standalone theme. And, I start, of course, with first impression. It is, of course, a visual side. It, looks, someway, close to some retro. GVim interface makes a surprise on me. It is so black and white. White background. As, it looks for me. Some little pictures at the top. Points of menus. As Windows 3.1 or windows 3.11, it is first things, that came into my head! And I like it! Beautiful interface! This visual side, it is, also, a valuable!
And next, even, more – lots of capabilities for a syntax. Syntax support. Even, Free Basic, I can find there! Wow! But, you need to search it for yourself and select settings for yourself. Once again, before this, I write in Visual Studio – and, something, I never think about compile, about syntax, light some keywords method. Everything is works automatic there for me. And, also, a dig – it is very hard and complicated! And, I am as Alice from Wonderland. I touch the mystery. So, these example of feelings from using GVim. For this points, I like a program! I. just. still waits to meet in this program – a rabbit! Kind and funny one!
iron (hardware) and programs. From time to time i restore computers, retro computers. Try retro soft. Check some programs. And write about all of these.
Dima Link is making retro videogames, apps, a little of music, write stories, and some retro more.