Category: Tutorial

Somewhat teaching

  • 2024 Unreal Engine 5 tryout

    2024 Unreal Engine 5 tryout

    ⏱️Overview

    I’ve spend over 1 month in total, exploring the Unreal Engine 5.3 on Linux and gathered some opinions about it. I’ll say upfront: I don’t really like it and this version is not even fully working on Linux. And no: I will not make or port Stunt Rally to it, I know for sure now. This isn’t a strict tutorial, but my gathered experience, many complaints, with some useful links.

    📂Gallery🏞️

    Short gallery with showcase here.
    Long gallery with many more things shown and including visible bugs.

    ✍️Motivation

    Well I have been using Ogre rendering engine since about 2007. Over a year ago moved to OgreNext, which is even less popular. I can simply say there is just one person (the developer) who is able to, and does usually answer my questions, or fixes issues.

    Naturally at some point I wanted to get at least a basic knowledge of other engines. Since they’re so highly popular and have big forums and communities. And get my own opinion, also regarding what’s best for Stunt Rally (rendering only since we already have simulation and even own track editor).

    I made 3 initial choices due to highest popularity: Unreal, Unity, Godot.
    I did already check them in 2022, and wrote a little in my Rendering “tutorial”. But ultimately for me, Unity died a sudden death due to their freaking license changes (which shocked lots of developers and made them move). I did check out Godot and so far its best demo for terrain and nature, and it didn’t seem too great at performing there. Which seems also a popular opinion that it doesn’t handle big 3D scenes that well.

    So, the goal was not really to move SR to any of them. It was to assess if that’d be even reasonable, and logically prove that it’s not (even only for rendering purpose). Last and quite important reason was to learn “the other side”, new effects and technologies, and know what would be possible to achieve in SR too (someday).

    📜Earlier try

    I did try UE on my old PC. Back then in 2020, UE5 had to be built from sources on Linux. Took me like 50 GB of space to download. And few tries to finish, as there was no info (and I had a small SSD). Then few hours to even build. Lastly at start it took 30 min to compile over 5000 freaking shaders. So ugh, yeah, clearly my PC was too old for UE5. I did try later after I bought a new PC. It does still need 5 min for shaders now. And that’s needed when major options are changed.
    Still, my impression is that most people would need to buy a new PC to use UE5, unless they already got a new gaming PC. It is really demanding on hardware.

    🔍Observations, Issues

    Of course, these are specific to me, using it on Linux. Also to what I was testing: for Stunt Rally try, so in 3D, mainly for driving cars, on gravel and for stunts.
    Also I didn’t spend years using UE just maybe over 1 month total. I could be wrong, or assumed something using my anti-commercial logic, or just didn’t care to investigate longer.

    I list here all my issues I had using UE5.

    • UE is a big commercial hub, feels like a shop. Not for true FOSS projects. Lots of assets, meant to be used for Unreal projects only. Nothing is CC Licensed. They also have own binary file format for everything, only .ini readable for options. I did import e.g. trees from .fbx (which can be exported from Blender) but that needed more work, making materials later.
    • Aimed at Windows and making big profits. Obviously if someone paid for Windows, they’re more likely to pay for its software. Linux is the least popular so least supported.
    • Not meant to be used on Linux only. Nothing can be downloaded, as this needs the freaking Launcher application which has only msi installer. Even their demos don’t support Linux, e.g. this and that. Thus IMO they don’t fully support Linux, just wanted to add it to platforms list, as only the engine works but not the rest of their ecosystem. The Quixel Bridge is also not working at all. I don’t care about that integration, to add assets directly to project content. I’m a fan of simple download buttons or repositories. But big companies progress by buying other companies and so “improving”, which is also a way to be more monopolistic.
    • Editor GUI. IMO it’s utter garbage and a mess. I wouldn’t enjoy using it daily. There is a “magical” way to scale whole GUI. But no real options to choose font sizes, icons, themes or other visual stuff. Seriously, in such a big editor, used by so many people every day? Sounds like a joke to me. I can’t take seriously any* programs which don’t allow user to (at least) change their theme and font size. *even small, but except my own. I have made my own themes for every software I used for longer.
    • Tons of properties, written in same tiny, plain text, no idea which important, no icons for settings or e.g. even colors or bigger fonts for more important/significant ones. No way to bookmark properties or settings to know which I want to remember easily. Should I like write them on paper or something like in middle ages, or remember all that? Some have tooltips (white) with decent text, some very little. At least the worst stuff is bottom in properties usually. And the (rhi) statistics texts are even smaller and less readable. I made my own Fps and statistics bar in SR and it has few detail modes now, medium size font, and even coloring from value, if it’s red that’s bad.
    • Editing terrain. Seriously cumbersome. If you ever seen or used Stunt Rally Track Editor, it should be pretty clear what I mean. Sure, I wrote it myself so it has what I find best already. I mean using just mouse wheel to adjust brush size and force. Also having keys that increase those. Then plenty of terrain brushes to choose from. All brushes using floats and computed for needed size. I could go on. We made over 200 tracks just using those tools. Seems like UE doesn’t care much about such tools. There are some other software programs (big and commercial too) that will make a terrain which you can import instead of editing. BTW I saw no way to import raw float heightmaps which we use since years for best quality.
    • Gizmo. Well it may be my personal hatred for that thing. But how am I supposed to drag that one axis if it’s covered by another. Probably need to focus, rotate around or use ctrl, meh. We don’t have a gizmo in SR editor, yes it may not be obvious how you’ll move etc, but you’ll always be able to do it, directly from anywhere.
    • Physics. I’ve seen some opinions on internet that it got worse in UE5 (has Chaos), from UE4 (had PhysX) if I got it right. So far I had plenty of sudden car jumps because of what looked to be normal wheel force from contact, getting weirdly high. Also had some sudden object jumps, flying far very quickly. All not looking good or real, seems like an unstability. I did increase substeps and decrease interval to get better simulation at high speeds, and I did surprisingly fix that wheels wobbling suspension. I could drive even over 600 km/h in big glass pipe loop and 450 in smaller one. That’s probably the only thing better than in SR with Bullet physics, but I’m still using old version and didn’t try new in years.
    • As of UE 5.3 which I tried, I was not able to turn on Nanite at all, and neither HW ray tracing. And those are UE’s biggest, prominent features. I used Debian 12 and AMD GPU with Vulkan. Saw some post that 5.4 could fix it, maybe.
    • Lumen software reflections. Man, those look laughable. I guess most would use HW ray tracing now or in few years. But I’d rather have my own cubemap rendered and used for other parts too. Instead of looking at Screen Space Reflections (a recent disease) or those blobs (done by Lumen software reflections) when screen space didn’t cover. Plus I’ve never seen car underside reflected properly here. Lastly I tried adding reflection captures and thoses didn’t work. Could be my fault, whatever.
    • Many effects are iterative, updated partly over time, and so they work best when not moving. E.g. volumetric fog lit from car lights, is moving inside car when driving. Reflections also have some noise, changing pixels. Global Illumination with Lumen, also does fluctuate and spread unevenly over time. Sure, it’s new technology and best if it didn’t melt GPUs doing impossible today. But it feels to me like these are just targeted for those indoor furniture designs and static shots, not games.
    • Many things even vehicle parameters need that Compile pressed after changing, then running to test. Really not convenient. The default vehicle simulation is completely nonsense. I guess it could be good for basic arcade games. That’s to be expected. Can’t touch dedicated C++ code for vehicle simulation like VDrift or even RoR with deformation. I found an older UE4 vehicle simulation, whole made with blueprints. Is good to learn from, didn’t feel great to drive though, but I’ve spend not much time with it.
    • Lots of thins are still done from console with typing commands. I guess no need to add them to that pile of unrecognizable settings list yet, probably translated though. But on the up side, there are plenty of options to customize for sure.
    • Crashes. Last but not least. IDK if it’s just because I use Linux, or Vulkan, or AMD, or their drivers. Doesn’t matter, either way I had many UE crashes. Luckily I didn’t loose much, seemed to be at end mostly. Still, not a good sign, not for stable software, not for daily use. Also seems to me like UE is favoring NVidia GPUs or maybe they have better hardware ray tracing, IDK and don’t have time to investigate. Ah and trying to start profilegpu did reset my PC instead.
    • Whenever you change key options it will be building over 5000 shaders again, which takes for me 5 min. And Package project at first takes like 30 min, but later it does much faster even less than 1 min. There are slow downs of like 5-15 sec whenever you save a material etc, there are structures in UE that need to be rebuild and this a slow delay when editing.

    🎛️Blueprints

    I’m kind of in the middle with this topic. Both good and bad.

    Quite a lot of stuff can be done using Blueprints. There are games made just using them.
    But then you’ll be dependent on them, which means no full control over what’s happening, and just doing what others tell you to do their (commercial) way. There is no avoiding blueprints, even with C++ code.
    Another thing is that the list with blocks in blueprints is again huge. Here even a video with main ones. So usually you’ll have to type more to find a block. Even if + or * etc is enough to get simple operations, that’s still just ridiculous for me as a programmer to put a block and connect those lines to it, instead just typing + in code.
    But yes, they’re easier to understand for non programmers. Still, I felt like I didn’t know how to do anything at all, when I was starting with blueprints. So it’s not like those were easier to start, just less to set up (no external IDE, compiler).
    Lastly big, complex games would require a lot of code, which in blueprints means few times more clicking connecting, picking blocks, to me it feels like slow playing with toys instead of developing. And then area is huge, also hard to find stuff, lots of moving around and zooming. Sure there are comments, same as in code. But much more code can fit in text editor. And it doesn’t go both vertical and horizontal (when done right). Doesn’t need zooming. I find code easier to navigate (definitions, references) too. All can be done faster by keyboard.

    There is a cool webiste with lots of blueprints here.
    One good part for blueprints (similar to scripts) is their safety, since they show errors, won’t break, etc. While code can crash, corrupt memory, loop infinitely etc. And could take more time to build and test too.

    ☑️ Good parts

    At least at start, because I seem to end them with a view that’s not good.

    • A lot of stuff working already. But as the saying goes: if something is good for everything it’s also good for nothing (i.e. not great for anything particular). Also if you wanted a change in their sources then it’s a huge amount of it to even grasp (like 50 GB total). And more games using UE will mean more will look the same due to its technology.
    • Plenty of (free) Plugins. Even fancy things like Niagara (3D smoke and fluids simulation, rather not for my/current hardware). But Water is still Experimental (yet essential), and I had some bugs with it (underwater fog was bad at times, even white flashes, then after publish it was at random level above sometimes). Very many plugins are also in Beta and version 0.1. Seems like it’s still too early. IDK maybe UE5 is still too young. I’m obviously only considering free plugins.
    • Useful modelling tools included. E.g. video. Can quickly edit and draft a scene with basic models, already inside UE. For me not needed, as we already have our assets, and tracks made.
    • Many possibilites to generate and place stuff (meshes, vegetation etc) with PCG. Still, those are rather new UE features. Which I’d expect much earlier. E.g. someone using UE4 didn’t have them, years ago. And frankly, in Stunt Rally we had automatic vegetation placing and road generation with LODs since the beginning in 2010.
    • Can move camera with W,S,A,D and Q,E, that’s cool, even bookmark places. But I didn’t find a way to change the speed by keys, and sliders don’t allow any values just predefined, IDK.
    • Plenty of debugging view modes and visualizations. Well the rendering engine is very complicated and “heavy” (high HW requirements) so these will be needed to optimize, probably even if you don’t want to. A very good (but older UE4) video series pipeline bottlenecks, passes.
    • Seems like Visual Studio is again default for C++ but at least VS Code is supported. So my setup with clang and VSCodium won’t work. And OgreNext supports clang officially. UE C++ is also in its own style. Quite old, not even similar to new C++ versions. All variables used and methods use big letters. Video here. Yes it’s a matter of preference (or getting used to) but yeah I dislike this too.
    • Many resources to learn from. Still those are commercials for Unreal and their addons etc but if you filter this out and ignore, then there can be plenty of useful, or universal information to learn in general.
    • UE is definitely huge and complex. With high popularity and big community it’s easy to find solutions to problems. But that doesn’t mean less problems. Actually I found many topics on forum which didn’t solve anything and seemed like unnecessary distraction, like from people not knowing English not only UE. Surely it was easy to find out why I got gray models after Packaging, but why on Earth weren’t shared wrap samplers the default, causing this issue. I think there is a lot of detail to be known to get UE working for any project.

    ⏳Summary

    Well definitely you can learn a lot, not only from using UE in practice, but also from that big number of videos either in their playlist, or lots of other videos from creators around UE. There is also a decent amount of documentation. This can help when starting or using UE, but also for getting information on various subjects around rendering or games etc (just at a smaller fraction).

    So it was a cool experience, completely opposite to mine. I mean using an advanced rendering only engine, built from C++ sources. Not just installed, and already with most needed tools. There is a gigantic gap or difference between those. And not only in software size and thus difficulty, but also in the community. It’s a complete opposite too. In UE (or Unity, Godot etc) you can simply even put your question in youtube and find a video (or few) with answer. When I was searching for UE vehicle tutorials there were even few playlists with that.

    Still, it’s not reasonable to change rendering or game engine far in production. Only possible at start. And SR is and already was far in production, having my own coded features, even when those engines weren’t available, that popular or so feature full. So clearly just because of that I won’t really be able to change engine. And neither would I have patience to spend 2 years or so, right after I’ve spend over 1 year to move “just” from Ogre to OgreNext.

    UE is big, and very commercial, so Windows, NVidia, Visual Studio are default, if not only option here for all things to work. So definitely not for me as a Linux only developer. I think they also use some telemetry, I’m not sure, but I saw urls, sent to their website from UE, as warnings in log, when I didn’t have internet.

    Lastly there are plenty open source engines, e.g. listed here, or new list here, also tools here, and a big collection of engine related links here with lots of libraries and sources.

  • 2004-22 My PC with WC 💧

    2004-22 My PC with WC 💧

    ⏱️Overview

    I described here my PC and its water cooling (WC).
    It also features my own fan controller, which motivated me to finally create this page.
    Obviously, I’m using my own firmware in heavily modded keyboard with my PC.

    📷Gallery

    Final version pictures here.

    💧Water cooling history and observations

    History intro

    I got my first PC in 1992, as seen in my very first post here. I had many more since then. I’ve put my full PC history in last chapter, at bottom.

    Until 2004 I had no big issues with PCs and their noise. Those had 2 medium fans (about 9cm), one on CPU other in PSU. Surely those weren’t quiet (just cheap) and were mounted firmly so their vibrations were even amplified.

    Before WC

    In 2004 I bought a new Pentium 4 and decided that I had enough of that noise, “a PC should not be heard” I said. So I first started buying “quiet” fans:

    • Well the small 9cm: Zalman CNPS7000A-Cu wasn’t that great, was full copper (whatever, too heavy), and with so little space between fins it was great at gathering a lot of dust, but it had a nice knob regulator.
    • Years later I found a good one: Scythe Grand Kama Cross 2 for next CPU. It’s big but not very heavy, and has a 14cm fan which actually makes it way quieter. It’s still used in my mother’s PC.

    Well that was rather a waste of money. Not very expensive, but not very quiet either. Yes until now, I’ve spent much more for WC in total, but it was used in 3 PCs already. I’d even say it was more universal than those “quiet” PC fans dedicated to some socket or one GPU type only.

    WC Kit

    I bought a WC (not to confuse with ?) kit from a local company Cpc/Hydrox. Needless to say they changed company name like 3 times, didn’t last long etc. But sometimes their parts still appear on auctions. I even sold my surplus once this way.
    To put it short, their cooler was crap, their WC PSU plain garbage (cheapest and also had a loud fan), water pump is just a cheapo for aquarium.
    So a kit was really a bad way. But water blocks were cheap and really good.

    My PC evolved the most since 2004, when I bought that Pentium 4 and started water cooling it. My current PC still has most of the WC parts from that time (water blocks, 6mm (~1/4″) tubes, water reservoir and pump).

    My choice for that kit and 6mm was its low price. Seriously, whenever I tried looking at other water blocks after (thinking I could maybe improve mine), all were 10 or 12mm (~1/2″) diameter and literally 3x more expensive.

    PC WC Modding Rant

    Back then, once a while, I was looking at pics of modded water cooled PCs, with “style” and plenty of lights too. How do I put it, just IMO OFC, let’s just say that’s the most illogical (retarded) thing to do with a PC. It’s the same approach as in modding cars. It’s a huge profiting business, a hype and really nothing more IMHO. Apart from water cooling, which is the most logical way of cooling, but for PCs it is way overpriced. Modded PCs are the culmination of commercial stupidity, visible from a distance and eye catching (i.e. self promotion).

    For me it was a matter of how loud my PC still is, best measured in acoustic dB. Just like I said: “a PC should not be heard”, I also add: “and should not emit any light” or otherwise be visible even.
    Of course, since my PC is on floor under own desk, I do have some white lights to make it visible when needed.

    And it also mattered a lot more for me to have other modifications. as described in next chapter.

    Radiator

    I changed the radiator from kit, to a decent (got it used) copper for one 12cm fan. It was too small as it turned out. Water was heating up, fan didn’t manage to cool it when CPU was at maximum. At some point I had two such one fan coolers. I think it still wasn’t enough, definitely not for CPU and GPU, and too much tubing trouble.
    So at that point I bought a 3 fan radiator Black ICE GT Stealth 360 and I’m still using it today. It isn’t very deep and it’s easy to vacuum clean the dust from it. I do this like once in 6 months.

    After moving my PC to WC (water cooling, right), I surely hated every CPU stock fan, especially those loud, stupid, cheapest Intel vibrating fans. I once even just cut off that fan of radiator and mounted a quiet Noctua 9cm fan above it, this worked well and was way quieter.

    Fans

    At some point I searched for quietest fans. After I think 4 tries I settled for Noctua. It actually varies from model to model. And the downside is their ugly, distinct color, which I didn’t spray black, I don’t want to risk damage.

    For the radiator I bought 3 Noiseblocker fans (to be cheaper than Noctua and black already). They also have those rubbers good for mounting on radiator. I’d say they’re okay at low RPM, but not when higher, I can hear some motor noise.

    HDD

    Naturally after having CPU and GPU water cooled and quiet, the next thing is PSU and HDD.

    HDD is easier. I used to wrap it in cloth, but this makes them too hot. So now I have one in some foam, covered by some old noise reduction foam, with the back being open to air.

    PSU

    I did try 2 noiseless fanless PSUs in 2004 or 5:

    • Yesico FL-550ATX, a heavy tank (big parts) that was always hot, but quiet
    • and Seasonic X-460FL, a light empty, too expensive, low power PSU, that wasn’t 0dB quiet, it had some high frequency hiss noise.

    After Pentium 4 for better GPUs, I needed more power but there were no such fanless PSUs. I made a very stupid thing and tried using both fanless PSUs in 1 PC. Just connected their grounds and I killed Yesico this way?‍☠️.

    Finally, some time later I found an awesome PSU: Antec CP-850. I even bought a 2nd one for my other PC, a year after.
    It is bigger then most though. Inside, it wasn’t freaking all cramped to still fit the old retarded dimensions from very first PC ATX PSUs. It is just stupid: airflow is chaotic, no space left, all big hot inductors are nearby big capacitors (which don’t like heat) etc.

    Bigger PSU is spacious inside and its design with components in lines is good for airflow, thus the 12cm fan is rotating very slow. BTW I eventually replaced it to a quieter one. There is a big surplus of power 850W, I’m probably using 130W to 300W. So it won’t heat up and suffer from it and/or make noise.

    Case

    Yes the Antec PSU is bigger and won’t fit most PC cases, at the time there were only 3 available for it, but that was just a stupid commercial for their products.
    PC cases are likely my last concern and I buy them as rarely as possible.
    I used this PSU outside of my PC case from 2008 for 15 years now. My other PC has it on top.
    Eventually I moved to even smaller PC case and I placed it inside, thus making it look like it does now, sticking out.

    🛠️Modifications

    Apart from water cooling things, I have many utility mods for (or in) my PC:

    • external relay 220V to power water pump, and DAC (earlier audio amplifier) when PC is on
    • for years I had just a simple analog knobs for PC fans, now I have my own fan controller
    • also my own firmware in heavily modded keyboard
    • external power switch
    • and HDD LED (actually not used, too distracting)
    • external 12V connector, to power my mini drill
    • 2 USB switch
      I use it to switch my keyboard and mouse between my PC and a laptop. Works like a charm, I can’t imagine not having this now.
      I did it on a universal PCB with relays, since I had them available, but they do use 2,5W when on. There are 2 USB input ports and 4 output USB cables: one pair to PC and other to laptop. There are 6 relays, for 5V, D+, D-, and GND is common.
    • external switch for monitor input, near keyboard
      This was a bit tricky. I had to disassemble my decent LCD monitor, get to the switch, solder some wires, and add a long 2m cable with external switch. It is extremely useful, I don’t have to lean to press and wait like that too.

    📜My full PC history

    Well this chapter is very optional, since it has quite nostalgic value for me, but otherwise it’s just mostly (ancient) history. Yeah, it’s almost 30 years since my first PC.

    Legend for the below table:

    ? – I’m not sure about exact amount or date
    💀 – Dead, it broke by itself. Obviously very undesired.
    🔨 – I killed it, so my fault. By bad overclocking @, or by accident otherwise.
    ♻️ – Sold it, eventually.
    🗑️ – It became electronic garbage.
    ☑️ – Still using it.

    YearCPU, MBCPU Freq. @OCRAMHDD, SSDGPUMonitorAudio, PSU
    1992PC XT8 MHz640 kB20 MB 💀14″ CRT EGAPC Speaker
    1994386, 486?33 MHz1?, 4 MB?260 MB 💀14″ CRT VGA 💀
    1996Pentium 1120 MHz 🔨@32 MB?1 GB 💀💀borrow Voodoo1?
    1999AMD K6-2300 @366 MHz32? 64? MB4 GB?borrow Voodoo3?
    2001Duron
    K7VTA3 📷
    1.0 GHz256 MBGF2 MX40017″ CRT
    Samsung 753dfx ♻️
    2004Pentium 4
    MSI 865PE Neo2
    3.0 GHz ♻️2 GB?40, 80 GB? 🔨Ati 960019″ CRT Samsung ♻️SB 128 PCI? 💀
    Yesico FL-550ATX PSU🔨
    2005Ati X800 💀21″ CRT Dell 🗑️
    2008Quad Q6600
    P5E Deluxe
    2x 2.4 @3.0 GHz4 GB? DDR3 1066 🔨@320 GBGTX 8800 512MB 💀24″ LCD TN Iiyama ♻️SB X-Fi PCIe Xtreme 💀
    Antec CP-850 PSU ☑️☑️
    20111TB? 💀GTX 560 Ti 1GB💀♻️
    2012i7 2600K
    P8Z68-V GEN3
    4x 3.4 @4.4 GHz ☑️8 GB DDR3 1333?2TB
    201424″ LCD IPS
    Eizo EV2436W ☑️
    202016 GB DDR3 21331TBRX 570 4GB ☑️DAC AIYIMA A5 PRO ☑️
    2023Ryzen 5 7600X
    B650M DS3H
    6x 4.7 GHz ☑️32 GB DDR5 60001TB M.2 Gen4 NVMeRX 6600XT 8GB ☑️

    ⌛Conclusions

    As a kid I didn’t have new PCs too often, they were also getting faster and obsolete quite often. Then after a brief period of having newer hardware (mostly GPUs) somewhat often, while most of them died too early I think I realized it’s not good to buy (they’re soon to be garbage anyway).

    Later I realized that since years CPUs don’t really get much better, yet they do cost same or more. Thus my CPU and MB is still from 2012 (happy 10 years man).
    I did have them overclocked for few years, but now I even don’t. It gets 30% faster, but uses 30% more power. So I’d rather have 100W (not 130W) at idle, when I just listen to music or watch something. I don’t need that extra 30% like I did when I was building C++ often, for Stunt Rally.

    After all PCs are just tools (and not just gaming like consoles) but for learning, creating and entertainment too. So naturally buying a PC is an investment, that has to be done rationally.

    Some time later I decided it will be better to buy (instead of new PC) a new ergonomic chair (for PC) and a bed. Those are similar priced but much better for health.

    ➡️End

    Well in Sep 2023 I bought a new PC, even with case, only PSU still same. Added it to history table. It feels way faster than my previous, like 3 to 5 times. It seems I’ve skipped a new PC (CPU+MB) somewhere along the last 11 years. I always aimed for new PC to be at least 2 times faster to not waste money and time for updating. It needs some time to update, like a week to choose right components, move OS setup, etc. I cleaned dust in this now old PC and moved to air cooling again, then set it up and gave to my mother. Replacing previous one, which was way too slow, nowadays even movies were not smooth. Yet still almost all PCs of mine drain above 100W at idle. Well it’s good to update and do stuff faster, but of course still a high cost for new technologies.

  • 2019 DoubleCmd Fork 📂

    2019 DoubleCmd Fork 📂

    ⏱️Overview

    This is my modified version (a fork) of Double Commander (DC), a two panel file manager. I first forked it in 2017 and in 2019 I finally moved to using it daily instead of Total Commander. I will describe few aspects here.

    ℹ️How to start with DC

    Here is a short paragraph upfront, for those who didn’t use a commander or are new to DC and want to start using it (or give it a try). I recommend the main website (for download and support) and the documentation (help) about how to use its functions.

    Double Commander

    DC is cross platform, so it runs on Windows and GNU/Linux. It is inspired by TC. There are of course many other file managers, (some even in text mode like MC), but I think DC is perfect for me and I highly recommend it.

    The best features of DC though (for me), are being Open Source (FOSS, this gives Freedom) and still developed. What it means (especially for me) is that I can learn how it works and can change it myself. Or even add new features, including those that only I will use. And I can contribute to the project.

    📜My History

    I started using a file manager as a kid, already on my first PC which had DOS. It was Norton Commander (NC, in text mode). I quickly got to using it daily, as my main program to do all file and directory operations. I didn’t even know how to do them using DOS commands for a while. Well I barely started learning English and wasn’t able to read any documentation too (it wasn’t needed BTW).

    When I was moving to Windows 98 (around 1999), I naturally wanted a similar program. I didn’t like Windows Explorer at all or even windows in general (I was still sometimes going back to DOS). Fortunately there was a similar program, at the time simply called Windows Commander (WC ?). It was later renamed to Total Commander (TC). Using NC in Windows was possible, but not always, since DOS had short file names and Windows has longer.

    WC was better than NC, my favorite feature probably being that it could color file names by extension. I think it’s when I started adding my colors for file extensions I got to work with.

    Naturally, when I started using Kubuntu and later Debian, I wanted something like TC.

    ⏳Before I started

    I actually reported a couple of bugs that affected me the most and honestly prevented me from using DC. I was also too inexperienced to even try fixing them myself. Lastly those weren’t easy things to fix.

    These were:

    • Very slow File Filters. It took 4 seconds of delay to view 24000 files in a directory with my settings having 123 file filters. Directories over 1000 files were already entered with noticeable delay. And yes, my file extensions list grew and became something that I enjoy since years. Surely not something that I would throw away and just not use it.
    • Freeze on entering unreachable network paths. It happened often at work (where I had to use DC not TC) and also for more people. Application froze for nearly a minute. So quite an inconvenience to kill the process every time someone accidentally tries an unreachable path or a tab with it.
    • Compare by Contents not Implemented from Search result and archives. A simpler bug for a useful feature.

    After a few months the first issue was fixed. So I started making my own program to deal with my file extensions list for both DC and TC. I had a lot of them 96 in 2017 and 239 in 2019, this is just the count of unique colors (file filters), though I split some for readability (e.g. for Stunt Rally track sceneries).

    The program has its own page and is called Crystal Color Center. I’m sharing it with my list included. It allows an managing the list on an even higher level, with features like: groups, search, quicker editing (with R,G,B sliders) and of course import / export for both DC and TC. Thanks to it, moving my list from TC to DC was easy and any changes to it is fast and conveniently done in my program.

    The second bug was fixed after a year (still, I can’t complain since I didn’t do it earlier). But earlier it became not that needed anymore for me.

    After that it was probably the time, when I realized I should fix the rest of my issues with DC. I mean just missing things from TC that I got so used to. It also turned to a nice learning experience and woken up old memories from Pascal.

    ✍️How I started

    Well the start is the hardest part of any software (program or game) or even any project in general. To start, the page Building from source is crucial. And I believe it’s probably the most important page for any FOSS project. Of course beside a good documentation for users. Fortunately the instruction is not long or difficult.

    Sources are surely different, because DC is written in FreePascal. Lucky for me, I knew Pascal since DOS and later Delphi in Windows. So I had some start and the rest is nicely explained on internet and in language documentation and wiki. But basically I prefer to just search on internet for particular problem. It doesn’t matter where I land (doc, wiki, forum, stackoverflow, etc.) to read the solution or hints.

    At first I was building just from command line. After installing packages for Lazarus IDE (a bit more trouble) I could develop in it. Naturally I created my own color theme for Lazarus IDE as a result. And I also saw that weird build “Internal error 200611031″ plenty of times (well count – 1 too many).

    FreePascal

    The DC code is quite big and it surely requires time to get a hang of it. Learning FreePascal adds even more time. But it is a very nice (almost funny) language which also reminded me of my earliest years of programming (at college I moved to C++ and later also C#).

    Pascal language doesn’t use so many symbols, making other languages look more like a forest. Pascal code looks more like a book. Not a phone book, a novel. An English book where people write what should happen. Assuming that comments are written in English too, which I recommend always.

    Well let’s have an example, I have cut and pasted few very readable lines here:

    uses
      Forms, Controls, Dialogs, Buttons, Menus, Classes;
    
    procedure LoadSettings;
    function GetOptionsForm: TfrmOptions;
    function GetAName: String; virtual; abstract;
    destructor Destroy; override;
    
    const
      allowed : set of char = [ '-', '.', '_', '~' ];
    
    var
      I: Char;
    begin
      for I := #0 to #255 do
      begin
        case I of
          '_', 'a'..'z', 'A'..'Z', '0'..'9': Identifiers[I] := True;
        else
    
    implementation
    
    if not Assigned(Operation) then Exit;
    Operation.Execute;
    
    with Operation as TMultiArchiveCopyInOperation do
      begin
      if cbEncrypt.Checked then
        repeat
          ..
        until sPassword = sPasswordTmp;
    
    finally
      Free;

    ⚖️Pascal vs C++, quick rants

    Well I can’t say I’m finally free yet ?, but surely many things from Pascal are great and make it very nice to read. E.g. that uses statement at start, compared to #include each in own line in C++. Or the with do statement that shortens a whole block below.

    C++ is a horribly unreadable at start. And just to mention, some terrible mistakes made by just one symbol, like if (i = 0), instead of ==, that compiles fine. But I did like { } brackets for blocks, instead of begin and end, how many times did I spell them wrong.

    I also remember my favorite thing from Turbo Pascal: F9 key to build project, if there is an error it jumps to it in code. Far too many times in Visual Studio I pressed: F1 to show error list, Enter to go to error and Shift-Esc to close that bloody thing. I can’t even ? (and those are my own shortcuts, just Esc won’t work).

    It is much better with C# where it compiles in background and underlines bad expressions in code already.

    One great thing in Lazarus IDE is that it makes tabs for each search you do. Why on earth can’t VS do it??

    I could go on. But the point is, it was really nice (for a change) to code in a completely different language. I think I’d put Pascal after C++ and before C#. Okay then, that’s it from off topic.


    📊My version

    Now we finally arrive at the main and most interesting part (at least for me).

    After I was able to use Lazarus IDE and felt good with Pascal (again), I wrote new features and customized DC to my liking. I also made source patches for some features on DC BugTracker.

    📂Sources

    Full list of my changes (in commits) can be browsed here (or locally after cloning with Git).

    Here is what I changed and why:

    • Undo Close Tab
      I simply can’t imagine having dynamic tabs anywhere without this. We’ll see if it gets into final DC release, and when.
    • Multi Rename tool
      More compact look and new functions listed here. Probably the biggest update.
      I use this tool a lot at home, e.g. dealing with thousands of screenshots, deleting later half or one third of them, re-enumerating them with this tool and doing it again.
    • Status bar
      New look, visible on screenshot above.
      I really like to have a different status bar (text and color) for when anything is selected.
      I once had selected files, not visible at cursor, forgot them, wanted to delete a file at cursor and deleted them all.
    • Size colors
      Next, why shouldn’t I have different colors for different sizes (K, M, G etc)?
      Sure for some it’d be too much color. But I’m using the same idea in my audio player (cAmp), coloring track times and I find it informative.
    • Gradient for cursor (blue) and selection (orange).
      Also visible on screenshot above. I think it’s nice, more futuristic.
    • Follow links to destination.
      With Ctrl – (Left,Right or Up), quite a useful thing.
      I have few dirs with just such links (.lnk files) and use them as my starting point e.g. when developing one of my projects.
      And BTW a quick feature to use Ctrl-Shift-S on cursor to make a link to it, without asking.
    • Find Files results, Color by file types.
      Another useful extension. Seems natural for me, to have any list of files use coloring by file type (extensions) especially when I have so many in my list.
    • Some smaller things.
      Not very important, but definitely nice to have and a cool exercise to find it in code.

    Another thing of mine is file and directory rating. I use it constantly since years too. This is visible on screenshot above as symbols ` ^ ~ + after name. It makes it easy to spot more interesting files/dirs and makes them change color (usually intensity). It is also an internal feature of my player to apply the symbols to filenames.

    ⚙️Contributing (in general)

    There are a few different change types to software, that anyone can report, contribute, or have on own fork.

    • Bug or issue reports.
      This is relatively easy to do as user. And is surely a good thing to receive as a developer. With more features in project and more systems where it can run, it is difficult to catch bugs. I didn’t like those reports as a Stunt Rally developer, but without them it would be a more buggy game.
      But still, there is probably nothing worse than a post “help, it doesn’t work”, without any (not to mention all) data required like version, OS, steps, etc. In that case it’s better not to post.
      There is a general guide for “how to report a bug” and some project have specific ones.
    • Bug fixes.
      Like those above, but better. They requires programming skills though. It’s when you fix a bug yourself and submit it (to developers).
      In Git that would be a pull request (from your fork, name is surely misleading). It is less trouble to merge and test, also more convenient to discuss (on website Codeberg, GitLab, Github, Bitbucket, etc.). But sometimes a patch is enough.
    • Ideas.
      Well that’s just the worst IMO. Everyone has them, just having is not much worth. Discussing them could mean wasted time on development. And developers have usually their own ideas and vision of project. Having more doesn’t help. But, I guess, it could be some help for starting projects, with not set vision yet.
    • New features, implemented.
      That is way better than just having ideas. Being able to turn them into reality. One can submit those to developers. But there is a catch. Not all will be attractive to put into project. Having too many features makes a project more difficult to test and more bugs are possible. And could make it more cluttered in GUI or Options (wasn’t an issue in my projects).
    • Custom own features.
      This is why I have so many forks. I do have plenty of ideas, I implemented them and I’m pretty sure nobody (from the developers) would care or want to add them (reasons above).
      Additionally, since I have a lot of preferences, it is natural to keep them in my own forks. This way I can keep up to date with upstream (main) project versions and have my stuff too. Priority for me is to keep my stuff.
      But merging upstream versions is needed too (once a while) even if it takes time. If not done, it would at some point accumulate too much, making upstream update too time consuming. Sometimes in that case, it could be possible to apply (merge) own changes (only if not too many) to a fresh upstream version.

    ⏳Conclusions

    My move to DC was surely long and took many steps. But I’m glad to use FOSS, not just as an alternative to commercial, but to prove that it’s simply the only logical way for me. It was obvious already earlier, when I created my own audio player (I use it everyday).

    If you’d ask me why I didn’t yet move to GNU/Linux (from that Windows crap) it is because of all those steps needed. DC was one of them. Rewriting my audio player for GNU/Linux is next. There are few other programs I customized and got used to (Video player, Image browser, etc.) but those two (DC and my cAmp) are crucial.

    I think I also showed some aspects of FOSS and the great things it brings. In particular, opportunities to: learn, express creativity and adjust to own needs.

  • 2017 Crystal Keys

    2017 Crystal Keys

    ⏱️Overview

    This is the last version of my program for showing pressed keys. It now also shows keyboard layouts.

    📜History

    The oldest version of it was useful already in 2005, when I was first tinkering with my first keyboards, later named CK1 and CK2. Program showed a list with the Virtual Key and Scan Code values of pressed (held) keys (and their names). It was useful for adding my extra keys on regular keyboards. First by finding which matrix combinations (shorting row and column) give key presses besides the present keyboard keys. Next for finding their codes and using them for binding in e.g. my audio player.

    ❌Why Qt and QML failed

    I previously did the same program using Qt and QML for GUI. Just to get a bit familiar with it and get my own opinion. The repository with it is here. I finally abandoned it after realizing that I would need extra 55 MB in over 100 extra files just to start the program anywhere else. That’s insane ?, surely for such a tiny program. Maybe a huge editing tool or other big application could benefit from Qt (and QML) and hide that size in its own resources. But definitely none of my own programs. Even my Track Editor, but for slightly different reason: to not add Qt as extra dependency for building, when we already have MyGui.

    ⌨️Layouts

    Now my keyboards CK3 and CK4 have different layouts. Hence drawing keyboard layout is a nice feature and visual addition to the list of pressed keys.

    There already is a website where you can edit keyboard layouts, for many other keyboards including ergonomic ones, link here. So I decided to save time and not create my own and just used the output from it. It saves layouts in JSON format. Thus I needed a library for C++ that parses .json files. I decided to go with JSMN which is small and fast(est), at just doing what I needed and not much more.

    🪟Program

    The program is simple and it was easy to code, right after getting familiar with SFML and ImGui. Which I already used in my previous program Color Center.

    Graphics and Gui turned out to be good, even if simply one colored and rectangular. The look wasn’t important here anyway, rather to code and use it fast. I made it basically in 2 days. But of course using parsing code and basic application with Gui from the other 2 programs and pressed keys detection from my older program.

    Additionally it features a very fast scaling of the layout through slider and can also fit window to it. And a combobox to change layout for other keyboards.

    📂Sources

    Located here. Including Windows Releases.
    Should also work fine on GNU/Linux, after building from sources.

    📖Tutorials

    The first 3 versions of the program were aimed to be educational and can serve as basic tutorials for simple applications like this one.

    Namely cross-platform C++ programs using SFML, built with CMake. With possible interface using ImGui and settings saved in XML with TinyXML2.

    See archives in Releases, or use Git to get tags 0.1, 0.3 and 0.5.

    Other resources for learning are in SFML tutorials.

  • 2015-22 Websites 🌎

    2015-22 Websites 🌎

    ⏱️Overview

    Here I gather my experiences with developing websites.
    Both this one, using WordPress and for Stunt Rally using CMS Made Simple. Both are PHP based and allow customization with CSS, HTML and PHP code.
    They are hosted on TuxFamily. For which I am very thankful.

    Stunt Rally website

    📜History

    It was released in May 2015. So 5 years later after my first game release in Apr 2010. Way to long probably. We had forum earlier, since Nov 2012, a bit late too.

    The website was started and put together by alket and finished by me. There were like 2 attempts earlier too.

    The deciding factor was finding TuxFamily (hosting without cost for CC and FOSS projects).
    Since I wanted to have a website, but didn’t want to pay for anything (neither hosting nor domain).

    Once we had a place, it was a matter of someone with experience creating the website. I had none yet, and at the time I was still very busy (developing, improving art, tracks) and didn’t want yet another distraction from that. But once I saw alket having put it together, I decided to style it and finish everything. It was also a nice learning experience.

    📊Features

    We used CMS Made Simple because it allows for more customization using templates and global content blocks.
    I wanted to have our tracks and vehicle browsers, which I once wrote using just HTML and JS. Nice small functional code, displaying images from github and statistics from XML files.
    But it is not FOSS, so I can’t recommend it and I will change to something else.

    We use DokuWiki for documentation. It is nice, not too big (like MediaWiki) and stores pages in text files not database. Editing pages is also good from what I remember.

    We also had a gallery nanoGallery3, it’s broken now. Since I’ve put a lot of screenshots (about 120 each release) and also same amount of development screenshots (total 1.8 GB, about 4200) on Picasa (Google Photos now), I wanted just a plugin that would display it. Worked well for few years.

    I also wanted a nice issue management for ToDo (sadly just my tasks at the time, I was again developing alone).
    It wasn’t probably that needed after all, but we installed Mantis BT (I used it before) and I customized it to my liking. Seems that it still can’t sort by priority on at start view, which I’d like.


    My website

    📜History

    Was released in Aug 2016 (if I remember), so more than 1 year later.
    After some experience with CMSMS for Stunt Rally I thought of making my own website and gathering my other projects on it.

    Someone recommended WordPress for it and I like it (is also the most popular).
    Probably my favorites features in it are that:

    • it auto updates itself,
    • allows installing and browsing plugins and themes directly in it,
    • and lastly the vast number of available plugins and themes available.

    ⚙️WordPress plugins

    Naturally it wouldn’t be that great without plugins (just like my Firefox).
    Here is a list of plugins I use now and what for:

    • Advanced Content Pagination
      To split longer posts into pages. Page breaks added manually where I want them.
    • Broken Link Checker
      Nice tool for automatic checking of website links, for wrong urls etc.
    • Child Theme Wizard
      For creating a child theme and letting me apply changes (in CSS and also PHP).
      When original theme gets updated, my changes will stay independently.
    • Classic Editor
      Restores the older post editor.
    • Collapse-O-Matic
      For those blocks you can expand (dynamic show/hide). Adds a shortcode for wrapping content.
    • Favicon Links (old)
      Adds those website icons before all links here.
    • Favicon XT-Manager
      To have my icon for website. Displayed before page’s title on a browser tab.
    • FooGallery (not using yet)
      For creating galleries in posts.
    • Native Emoji (old)
      Used for emoji and to add images for sections almost everywhere. Adds a drop down menu in editor.
    • Nimble Portfolio (old)
      For the gallery in projects, with dynamic filters. I had some issues but now it’s good.
    • TablePress
      For creating, editing tables and adding them in posts.
    • Table of Contents Plus
      To auto create those blocks at start with contents, from headings. Also dynamic, like expand blocks.
    • Theme Switcha
      To allow theme switching.

    👁️Observations

    I am only using free versions and I prefer as always FOSS. I don’t really like that commercial aspect of WordPress where most of stuff is just free beer. Meaning free to check out, see a lot of commercials in it, but available just to make you addicted and pay for better versions.

    There are of course few types of plugins (just like software):

    • Few big ones, very popular and existing for years.
    • Many abandoned, even when they were paid.
    • Good ones, that aren’t popular.
    • Few unpopular, and actually offering less, than the big ones that are open source.
    • And rare but my favorite type, those that are Open Source (e.g. TablePress) or turned into.

    There were (of course) many moments when I found something annoying, wanted more features, or browsed those endless plugins and couldn’t find any good, free one.

    But I’m glad I achieved all what I wanted. E.g. recently allowing users to switch themes.
    Since my default is dark, and some prefer white. I simply view every website in my dark theme, but I’m guessing most users can’t.

    I also installed a style to have dark admin theme. Then customized few colors for syntax and editor. Now I can view my website in original theme and have WordPress also dark. Before editor had white background.

    ⌛Summary

    I’d summarize it so: CMSMS is quite low level, you need to know HTML, a bit PHP and probably for more users with hierarchy. From what I saw, it has to be updated manually.

    WordPress is easier to use, nice to edit, and very popular. and with plugins can even have dynamic elements or most other need features. Huge plus is updates itself.

    There is also Joomla, I just quickly looked at, and it seems to me to be more for a platform of users to collaborate, very social.