Category: Gallery🖼️

Has a pictures or screenshots gallery.

  • 2021 RC Drift car 🚗

    2021 RC Drift car 🚗

    ⏱️Overview

    At end of 2021 I bought a WLtoys K969 RC drift car. I will describe here all the modifications I made to it. Also with few review remarks about it, less important comments and rants are italic.

    ▶️Video

    Video here. Drifting in empty office on carpet and kitchen floor (best of montage).
    Camera was just from old phone: LG K10 2017
    Car camera: Ion Snapcam LE, like mentioned below
    Software used to for video eiditing: Kdenlive on Debian GNU/Linux with KDE
    Picture gallery at end of page.

    📜History

    I guess I should write this chapter here, since being almost 40 requires (an attempt for) an explanation🙂.
    Well, as a child I only had a few (probably Russian) cars from 80s, Two did have a cable from controller, and the one that was radio controlled had only 1 button to go backward, which also made it turn. Yeah I also can’t even.
    As a teenager, at some point I got an RC car. It had rear wheel drive and used 27MHz. I think I drove it only 2 times. It was fast and meant to drive outside. It had rubber tires so it stuck to asphalt and would rather flip over instead of sliding. It seemed kind of hopeless (compared to today RC toys) and felt like something is missing.

    ✍️Motivation

    In the mean time I got interested in WRC and 4WD on gravel, played a couple of such games too. And finally made my own Stunt Rally. There was a time when I was a lot interested in tires and car simulation.

    Recently, once a while I was watching various videos about RC toys. Technology moved forwards a lot in them too.
    This way, I found out about RC drift cars of 1:28 scale, and after days of watching videos and researching what would be cheap, but still good for drifting at home (or office) I found this WLtoys K969 and saw how it drifts at home.
    I think I watched later other 1:28 cars (like Mini-Z, Mini-Q etc.), and realized that even thought they are much more expensive they aren’t much better. At least for me as a first car, I don’t intend to drive RC professionally or on tracks. There are also cars and people who prefer RWD only drifting (front wheels move freely), but I was never a fan of that.

    So I think this RC is a nice, real life example, even if in smaller scale. It surely reacts and changes direction much faster than real cars. But is certainly less complicated, has no: LSDiffs, torque curve, gearbox, central differential, etc. In this RC all wheels rotate the same, electric motors don’t even need gearbox, suspension has only stiff springs, and there is no flexibility in tires, since those are from hard plastic here.

    🛠️Modifications

    So the things that I changed and added first to last are as follows:

    • Moved the pin from servo‘s steering arm higher for more steering angle range.
      There is a video here where it was easy..
      But, a huge but here, as it turned out (for me) the upper hole for this screw is wider and I couldn’t just simply use the same screw from lower hole.
      Thus I had to go creative to achieve this. Since I soldered a lot, I came out with a solution of putting few wires together for right diameter, then soldering one end to a tiny PCB part (with 1 hole), and just bending 2 wires out of the other end. It still holds well. Visible on my last picture.
      I guess this isn’t that important but is very good to have. Without this, steering angle is lower, making wider turns, but you still can make tight turns by drifting with quickly spinning wheels to oversteer (lose grip on car rear).
    • Made throttle range adjustable. How to video here. BTW I recommend that channel, it has many good videos including for this RC car.
      This is actually the most important one. Without this it will be difficult to not spin out wheels all the time. For small rooms, throttle range needs to be even lower. Of course they made the car to be cheapest, and even didn’t add the most important adjustment to it, I didn’t need those side buttons, so why not having this instead. Meh, always have to make things usable myself.
    • Added more weight on front.
      I cut out a universal PCB (my favorite kind) and made a place to solder down wires holding extra weights, they fit well. I used 4 in total, 2 on each side. One weights 4.5g, so this is 18g added on front wheels. This made center of gravity to shift (like 6mm or so) towards front and made the car oversteer even more, it drives better. There were some videos on doing that, just gluing 10g weight.
      Isn’t crucial though, still can drift without this. My front PCB is also used for lights and wires.
    • Added front and rear car lights.
      They are good for better orientation of how the car is rotating and what’s its direction. I mean it is actually easier (for me) to tell this by seeing those lights on floor, especially if car is far.
      The only way of doing this is making holes in chassis and hot gluing LEDs to it.
      I’ve spent too much time with lights, first making them in car. This way anytime I hit something harder they would change angle, go loose or break off.
      I also made a second mistake and made holes bigger to have LEDs with cases. It turned out the cases were too big and so long that made wheels hit them, if chassis is low. I will cut them to minimum and glue again. Good thing about that hot glue is that I can actually melt it with soldering iron again when I change my mind.
    • Made the RF sender battery use a 18650 LiPo.
      I don’t get why they didn’t already (was probably cheaper). When full, 4 AAs give 6V, LiPo is 4.2V, but RF sender still works. I thought it would be more difficult, but it was really easy. Just throw out 4AAs compartment and place the 18650 or any other LiPo here. Doesn’t seem to use much power, I didn’t charge it for a month or more. I only don’t know if it maybe decreases range? But with all being digital it may not be affected.
    • Added bottom lights.
      I had some old LEDs lying around, now 2 are on rear before wheels and 2 on front before wheels. Their location with chassis holes makes this cool blue X on floor now.
      I had only two 3mm LEDs so I also used 2 SMD LEDs, which I soldered out from those LiPo chargers (who needs them, red when charging is enough, and were so bright that I couldn’t even?).
      Then I added two 5mm LEDs (too big, SMD are better) green on left side, yellow-orange on right, located right after and above wheels. This turned out to be useful to know even better how the car is rotated from distance. So later I added same (close) colors to front, behind wheels.
      I soldered all on small cuts of universal PCBs.
    • Changed to a bigger car battery.
      The included 400mAh battery allowing 30 min runtime is laughable. Yeah I can’t imagine drones with 15 or less minutes at all.
      It was cheap and light, which is why they made it, right. After all, the freaking top speed has to be highest, like it was important at all. It drifts at much lower speed already.
      My new battery is 1200mAh and allows 1h 30 min drive time (so 3x more).
      It was made from two LiPo 603450 batteries, each size: 50x34x6mm. Glued with tape, fits nicely in same place, is just much higher and it weighs 45g. Secured it with some cardboard and mouse pad fragments on sides and wire (with thick insulation).
      I just had to remove their protection, because with it, it would stop for few seconds when pressing throttle too rapidly (very annoying).
    • With new battery I’ve also done new electrics in car. namely:
      1. 4 pin socket for battery, normally plugged in.
      2. ON-OFF switch. I used a 6 pin Tactile Power Micro Switch (self lock on) 7*7mm to switch + from both LiPo batteries.
      3. 4 pin socket for charger, plugged in when charging.
      4. 4 micro switches for lights (on-off, one small package). I added 47Ω resistors at end of each. I call this a fuse box, their purpose is prevent battery short circuit if by accident some wires connect.
      5. 5 pin socket (3 used now) to connect chassis lights.
      6. 2 trimmer potentiometers 1kΩ, for dimming car lights and bottom lights.
      7. All this required access, so I made a “door” in half of car’s front windshield.
      8. In total, the boards with bottom LEDs and all electrics weight 27g. Seems too much, but whatever?‍♂️.
        Each LED has a 330Ω resistor before. LED calc can be used if needed.
    • Charger
      Made using 2 popular modules: TP4056 / TC4056A Lithium Battery Charger and Protection Module.
      Just added 4 goldpin connector for car socket and that standard 4 pin PC connector for 5V.
      It does charge the battery in about 1h 30min. I’m not sure if it’s too fast or okay. The 4056 chips are heating a bit too much (at start), so I’m using a small copper radiator on them.
      Besides of removing blue LEDs from chargers (mentioned earlier) I also reduced the red LEDs brightness, resistors are now 20kΩ (way more). I hate this approach of adding LEDs, even for “turned on” indication and making all LEDs as bright as it can be. I guess if they could they’d made them visible from space or neighboring countries, that would be the best commercial?.
    • Radiator for main motor.
      Having more time to drive showed that it heats a lot, especially in smaller rooms.
      So I used thermal glue and glued some small aluminum radiators (1 cut to match motor length) bottom to motor and side to car bottom, which is aluminum, so good for cooling too.
      I’m guessing an even better way could be using copper tape around motor and gluing that to car bottom? Not sure. Either way some cooling is needed and would be better to have it done already.
    • Added some rubbers (cuts from mouse pad) below chassis mounting points (I saw something similar in a video).
      And later some foam around the car, better late than never. This is to soften hard hits, those happen a lot at start when first learning to drive, especially without reduced throttle.
      Additionally, at home I do jumps sometimes, banked and U turns (up to like 80 degrees, on a bent sheet of metal I had in cellar) and flip overs can happen this way etc.
    • At some point while reversing I almost broke one differential end (those, like all parts are plastic). I only noticed when one wheel wasn’t driven. But I managed to put it together with a wire soldered around it, so it doesn’t fall apart completely and works, a bit uneven though.
      Parts are freaking expensive, probably few times more than their worth. I hate this approach. If someone bought all parts separately it would cost like 2 or 3 times more than the car itself. Plus the waiting for shipment takes time.
    • After some bigger hit, I broke the thing that holds chassis on front. It is filled with holes and plastic, so no wonder.
      I made something stronger (and heavier like all I did) from a metal part, M2 and M3 screws. Is more difficult to use but should last longer, if I don’t break the plastic part that it’s mounted to.
    • Added a mount for camera on roof.
      Camera is Ion Snapcam LE, it weights 28g, with its own battery. It even lasted longer than car drive. I didn’t yet make it lighter by using car’s battery. Not sure if I will.
      Unfortunately, videos are horribly shaking when driving, because of uneven wheels.
    • In total the car with camera weights now 288g. So it is a lot more (was 160g at start) and the front suspension won’t allow more. Without camera and extra weights it is about 240g.
      I think it still drives well despite the extra weight. But surely when lighter it was quicker and more responsive (less mass and inertia).
    • Now I’m waiting for new wheels, with aluminum rims.
      The default wheels on this cars are cheap, all-plastic and uneven. Even like 1mm difference in height when rotating. This makes the car shake a bit. Surprisingly it doesn’t affect driving somehow, and it wasn’t easy to spot. Only slow time videos showed it and those from car camera, which are rather unusable.
    • Maybe for future (not sure if I’ll try/do any of these):
      I was thinking of making the controller use IR distance detection for throttle (instead of potentiometer which I already once cleaned since dust made it go chaotic). Using a MCU (Teensy 3.2 which I have lying around doing nothing) with LCD, buttons and rotary encoder for a GUI that allows adjusting all ranges and offsets without potentiometers.
      I also had an idea about having a light MCU in car to use RF (e.g. NRF24L01 2.4GHz modules) to send some measurements to controller MCU, like: battery voltage (for remaining drive time), motor temperature, car acceleration, rotation and direction (from those popular new accelerometer chips), and making all car lights toggleable and dimmable (with PWM) from controller.
      Lastly very doubtful, but maybe if I used PC mouse optics and chip I could get real velocity and position on some surface.

    ⌛Conclusions / Review

    I personally can’t imagine having fun with an outdoor, fast / touring car, with rubber tires. Neither with a smaller car that doesn’t have 4WD and drift. And those big RC cars that can slide on gravel (and jump up few meters) are quite big, very expensive (I seriously would buy a new PC instead) and require a big area or a track. And outdoor and indoor tracks aren’t close, are likely paid per hour and have other people. Plus parts for more expensive cars are of course more expensive.

    To summarize, I would recommend the WLtoys K969 car, especially as first RC car for indoor use, with more fun because of drifting. But with a few remarks.

    I don’t really recommend driving this car without modification 2 (throttle range adjust). I did it at start and it was chaotic. Some say modification 1 (more steering) is also crucial.

    Another thing that many say, is that the 2 smallest gears wear out rather fast. Those that drive each differential, both from plastic again. Why on earth aren’t all gears from metal.

    Well as I mentioned few times already, nearly all parts are from plastic, which can be a problem. Surely is for small gears. Later if you drive on uneven surfaces or jump, etc. then mountings for suspension will wear out or break (since closest to floor and from plastic).
    Still (and maybe that’s why) there are many metal upgrade parts and kits, but I don’t recommend any, at all. I have seen too many negative comments from people who say that those don’t even fit together, are bigger, leave less clearance etc. So they just look cool, and that’s it.

    The rest of my modifications were optional and just an easy hobby, that lets me spend some fun time, but not with my PC as usual.

    📷Gallery

  • 2020-22 K.C.4 Controller ⌨️

    2020-22 K.C.4 Controller ⌨️

    ⏱️Overview

    This is my newest keyboard controller software (based on my previous one) used in my keyboard CK9 (upgraded CK6), running on Teensy 4.0 with a 2.8″ color LCD display (320×240, ILI9341 chip). It allows editing everything like key mappings, layers, sequences/macros in real time on its display (was already in previous one).

    ▶️Videos

    Here are videos of keyboard CK9, showing most of K.C.4 on its display:

    • View – Short video of keyboard and closeup at display.
    • Demos – Showing all demos (in auto mode): Plasma, 3D Polyhedrons with diagonals, Wave, Fire (meh), 2D waving CK Logo with shadow, and old Rain.
    • Features – A detailed look at features, no voice or commentary though. Editing mappings, sequences, testing etc.

    Link to my channel with all keyboard videos so far here.

    📂Sources

    My firmware sources are here.
    It’s called K.C.4 (“Kacey”) simply from Keyboard Controller and 4 from Teensy version.

    The readme with all key features is visible on github. Here is more practical description.
    At end of page I wrote a comparison from my previous version (for Teensy 3.2) and quickly with other controllers / keyboards.

    📊Features

    The current code features are (and were mostly present in my previous K.C. version):

    • Display with menu, where you can edit everything possible.
    • Mapping (key binding).
      So which USB code will the physical key send to PC when pressed. There is a pick list with all common keys (and internal functions, sequences, etc) to choose from when binding. It has group colors and group filter for easier orientation.
    • Keyboard layout drawn on display.
      Shown when editing mappings (for currently chosen layer). Has a cursor to move around between keys. It’s also possible to jump to a key by pressing it.
    • Layers.
      If you hold a key, whole keyboard layout changes giving you other keys. Kind of like the Fn keys on laptop but much more useful and customizable. A common feature of custom controllers.
      Locking layers is also possible, either by lock/unlock key, tapping layer key fast or holding it for longer. Of course can be disabled and delay parameters are changeable.
    • Mouse keys.
      Keys that will move mouse, press mouse buttons or scroll mouse wheel. Also featuring acceleration with parameters for it and speed in GUI.
    • Sequences aka Macros.
      Basically any key combinations (for key shortcuts) and any sequences of key presses (for e.g. passwords). I am showing sequence previews where possible too, so when editing Mappings (for a sequence key), when picking a key from list or Testing pressed keys (if a key runs a sequence). I am also showing in sequences View, all mapped keys that run selected sequence.
    • Sequence commands are just a further extension.
      • They are special commands (beside sequence keys), that e.g. wait for few seconds (0.1s resolution), or change how slow the sequence will run (1ms resolution, useful e.g. for putty).
      • Others allow putting comments (for sequence purpose), and hiding sequence from preview (e.g. for passwords).
      • There is also a command to run other sequence(s) from this one. Also a repeat command that will do sequence (keys) continuously, until interrupted. This is e.g. useful e.g. if you want to watch a video faster, skipping parts with arrow keys after a short delay or take screenshots while watching etc. Normal keys can be used when a sequence runs too.
      • All mouse actions are available as commands too. So for example you can press a key (for a sequence) that will press button or move mouse etc. I have this way a mouse gesture done.
    • Internal functions.
      Keys to e.g. dim brightness, toggle GUI, toggle LED light, quit sequence, lock/unlock layer, change default layer etc. This a direct way, faster than adjusting parameters in GUI.
    • Testing and Setup pages.
      Useful when developing and to check if everything is working properly. Scan setup is advanced and adjust which strobe delay, scan frequency, debounce time I need. Matrix page shows the 18×8 keyboard matrix, with my anti-ghosting code working and any issues from too low strobe delay.
      It now also features X marks on keys that are available in matrix but not present on layout, this makes locating new extra keys very easy.
    • Demos and Game.
      Were already present in previous version and even on the first tiny display I used (128×64 mono). Since I have a display, and a powerful MCU, they show their drawing possibilities.
      They got extended to new resolution with few added extras. Best shown on videos, links below.
    • Clock.
      With date (uses internal RTC, needs 3V battery).
      Also showing Temperature, read from attached DS18B20 1-wire sensor (optional).
    • Statistics.
      Clock also displays (on its extended pages) keyboard use statistics:
      • Uptime.
        Time since power on or plugged in USB.
      • Late hour background.
        Will start slowly showing top of display orange at 22:00 and every 0:30 min going more visible, being yellow after 0:00 (midnight). This is to notify and motivate me to go to sleep when I sit too long at night.
      • Active time.
        I.e. how long I use keyboard without a break (at least 5 min, can be adjusted). Changes color from value.
        This is helpful to know if I’m doing something too long on PC. After all, it is recommended to take 5 min breaks every hour, it is healthy for spine and hands.
      • Inactive time.
        The opposite. Useful to know how long was I away from PC (keyboard). Also changes color when over 1 hour. Meaning I probably should have turned it off, to save power.
      • Press/min.
        Typing frequency, so how much key presses are done every minute. A colored value on left, going e.g. red at 120, yellow starting at 50.
        Also a second value below with total average since power on, with slowly changed value. So it is useful and directly corresponds to how tired will hands be. It’d be great to keep this value below 50, but sadly writing any text (e.g. chat, email etc.) or playing a game makes it go even above 150.
    • Graphs.
      As a part of clock, they show history of using keyboard (key presses/minute in the past hours). Second one is for temperature history. There are 320 points on display width and parameters for how often a value is added to graph.

    ⌨️Keyboard CK9

    I upgraded my 2018 keyboard CK6 with this bigger display and K.C.4 and it became CK9. I also added tiny extra keys, lots of them. Above Numpad, 2 rows of 8 or in other words 4 groups of 4. Surely will come handy for e.g. internal functions or could be extra F13-F24 keys for OS.
    The keyboard has visible tear on few keys already, well I use it since 2016 (was CK3 first). Nothing yet, compared to the 14 year old one (CK7/4/2).

    ✍️Motivation

    My previous version of KC and keyboards with it were quite useful and the 1.8″ color display was good too. The keyboard drawn on screen was minimal. Keys with one letter/digit/symbol had a 5×7 font, but 2 letters needed a tiny 3×5 font. It worked, but didn’t look great.
    So the new display is bigger 2.8″ and has about 2x resolution (320×240 vs 160×128).

    The main reason for this upgrade though was the new Teensy 4.0 with a MCU that runs at 600MHz. It seems to be the fastest one available (on a board with USB, ready to use). And is even way faster than all previous. I already didn’t like Arduino in 2014 when I got interested in MCUs (again), seemed like a stone age relic compared to Teensy 3, but today I can say they probably have computational power of a rock, when compared.

    The result is constant 45 frames per second almost always. This is what 600MHz MCU with SPI set at 60MHz for this display does, while using DMA for transfers and double buffered drawing (one buffer is being sent by DMA to display, while MCU draws new frame in second buffer, at the same time).

    ⚖️Comparisons

    Of course, there were many projects of using a big display with slow MCU even. A MCU not having enough RAM for screen buffer. But this means very low refresh rate (low Fps) and flickering (blinking when redrawn).

    There are few open source keyboard controllers, I think none of them even have a display, and some still use ATmega 8bit MCUs. Their requirements for program and RAM (memories of a MCU) are minimal, way lower than mine. And the price will be lower too. But the main flaw coming from it, is having to compile on PC and upload to MCU after any change. This is a big nope for me.

    📢Rants

    So for me, this is now the present (not the future anymore). And well honestly, whenever I see a custom keyboard picture I’m just asking: “where’s the display?”. In addition, seeing Cherry MX or any switches turns me away immediately.

    Because there is one more very important thing that is the light press modification. All my keyboards since 2005 have it and it’s just the default for me. Sadly all commercial keyboards are garbage in this matter and people continue to produce keyboards that have a tactile feel, 4mm travel and around 50 gram force to press. Well for me this is the middle ages era. This can cause injuries (Carpal Tunnel Syndrome). And I guess it feels awful for those having pain from using such keyboards.

    For my modding process (of reducing rubber dome keys press force and travel) pictures are in this gallery and I made a video of it recently (it is CK5).

    ✅Summary table

    For reference, here is a table with current status of all my keyboards, since start until present day:

    NameAssembly yearOriginal keyboardKeys actuation
    [gram force]
    Notes
    CK3 > CK6 > CK92016 > 2018 > 2020A4 Tech KX-10023 gCheaper, bit wobbly, but more keys
    CK2 > CK4 > CK72005 > 2016 > 2018Logitech Ultra X Flat33 gStiff foil, old, extra keys
    CK5, CK5b2015, 2020A4 Tech KV-300H9-18 gThe lightest foil
    CK12004Logitech Ultra X Flat25 gFirst, old, had extra keys,
    now only for testing, 1 row dead 💀

    📷Gallery

  • 1997-2022 Kitchen HiFi 📻

    1997-2022 Kitchen HiFi 📻

    ⏱️Overview

    This will be a somewhat unusual project post. I normally don’t show off stuff that didn’t need much creative work, but in this case it has a very long history (since 1997). It has gone through many modifications and it is still used every day, now in our kitchen for playing music.

    📜History

    It all started as a Panasonic RX-FT530 Dual Cassette Player. My mom bought it for me in 1997 (its production date inside has 1995), before I started technical high school. It was also around the date when I started learning electronics in practice and later in theory (from 20 years ago) at school.

    Since then it has gone many changes and had lots of features, many of them aren’t present now:

    • Blue LED for radio stereo indicator. Obviously, the first thing to do.
    • A switch for super fast cassette rewinding (Do feel free to spool through). Tape looked after a bit uneven inside, but very useful.
    • Green LED lights under both cassette decks (in middle) to see where the tape is at (how much on left and right barrel). Also extremely useful.
    • I removed the closing decks, and was just having cassettes clearly visible while using.
    • A small LED for the marker on frequency ruler for analog radio. I think it broke at some point leaving me without a ruler. I guess due to putting it apart and together again, fast and too many times, while not caring much where I place its parts.
    • Not sure when, I splashed it with (white, silver and gold) oil paint?, from PCB markers I had back then (obviously too many).
    • A digital clock, at some point on right side. Wasn’t very accurate so it didn’t last long there. Left a switch and 4 places after its buttons in back though.
    • More input sockets, output audio socket to other amplifier, switch for it etc.
      I remember at some point of experimenting with other amplifier I accidentally put like -30V into HiFi, killing its power AMP chip. Which I then replaced, was a good challenge. While still being a teenager I obviously needed this HiFi.
    • Since these became not needed later, all holes got covered with black tape (at least 10 already, in total).
    • At some point I added a 5V regulator 7805 and USB sockets so I could power other devices from HiFi, e.g. a clock
      (Instead of ridiculous AA batteries. One can use a 3V regulator or a resistor (e.g. 200Ω) with 3V zener diode).
    • It has spent a few years, abandoned in cellar. Gathering dust and wishing for a better future.
    • Many years later, I ended my history with cassettes (recorded them on PC into FLAC and OGG, and threw out after).
      In 2020 the cassette decks (with all that mechanical nonsense and engine) flew out to electronic garbage bin too. It was just the amp and radio then.
    • I wanted to have a digital radio, that stayed at given frequency. And BTW a MP3 / USB player, why not.
      So I ended buying a cheap, local, 2nd HiFi (anyway with Chinese components) which just featured both. It had crappy sound due to small speakers (no bass at all), we used if for short, but naturally I wanted to merge its insides into my old speakers from Panasonic.

    🔍Details

    The final “HiFi” currently features a digital radio, USB or SD card player (from that 2nd cheap “HiFi” product) and analog input.
    Its radio forgets frequency after power off though, so power is always on. It was too in Panasonic, IDK why, using about 0.5 to 1W constantly, power amp is likely always on.

    I scrapped that stupid Class D amp (MIX3018) from 2nd HiFi, I prefer that AB, although it has too much power. Then located its audio outputs and connected to old LA4108 power amp (low quality, too much power), but with better quality anyway.
    Later I also added a double potentiometer (which I even had available) for volume on front, since the original was making noise when turning.

    I will eventually just use op-amps to speakers someday, and will throw out the big old PCB too, from which just 20% is now used. Then it will be just speakers and case from the oldest HiFi.

    There are now 3 extra buttons on top (power on/off (hold) / input, next and previous) to control 2nd HiFi. Light press switches, 0.5N force, my favorite. I put rubber cover on top, to protect form any liquids💧, this is kitchen after all🫖💦.

    For a while I had a cheap tiny Bluetooth receiver in analog input, powered from USB, but I dropped it, too much noise and once a while it did reconnect etc. Audio cable is more reliable, even cheaper.

    I still use its regulated 5V outside but in different connector (PC like), to power an outside thermometer (was from a PC case) and a digital LCD clock.

    Lastly I added a small white LED lamp, that’s always on, and helps moving around the kitchen at night, before reaching main light switch.

    ⌛Conclusions

    So: why didn’t I just buy a new HiFi that already has all those features, instead of continuing with this old junk?
    Several reasons:

    • Firstly, there is no such thing as a product that has all features / properties that I need, with proper control and interface (knobs, convenient buttons, menu, etc). This can only be achieved by continuing to develop it myself according to my current needs.
      I now see all electronics products just as ingredients for further modification. Ideally I would create one from start, but that’d be too much time and effort spent, just for our kitchen.
    • Secondly, I am an anti-consumer, I usually hate buying. It needs a lot of time for research, to find a product that is closest to: not a hoax/hype, reliable, functional, fair-priced, still cheap, durable (will work for long), allows repairs, looks okay, black, etc. (all at once; add needed, strike out not needed ?). On top of that I don’t like spending money (I like saving it) to support companies, which constantly produce (soon-to-be) garbage.
    • Lastly, it is a fun and easy hobby that grants better more customized products for daily use.

    📷Gallery

    It has pictures from 2020 and up, showing old look and the newest merge of 2 HiFis. Needless to say, their cases weren’t compatible at all, so there is a lot of black tape around.

  • 2017-21 Build Console C#

    2017-21 Build Console C#

    ⏱️Overview

    BuildConsole (BC) is the program I created and developed at work*, using C# (syntax here), in WinForms.
    Specifically to visualize output from build process. It surely is my biggest and most useful C# project so far.
    Unfortunately I can not open source its code because of that*. But I can share my experience from this process.

    ⚙️How it works

    At its core, BuildConsole replaces the Windows cmd.exe command prompt (terminal) and will run any command too.

    It does so, by creating a process and redirecting its output, error and input streams.
    For the core part, it was quite useful to browse ConsoleControl code and many stackoverflow answers as usual.

    The main needed part of creating process is located here with redirecting (all 3 RedirectStandard*).
    It is also using BackgroundWorker classes (e.g. outputWorker) that run on own threads and read those redirected streams, to show output immediately when it comes.

    Textbox

    I used the richTextbox control (included in WinForms) since the beginning. It turned out to be garbage for this purpose.
    It makes few easy operations really too difficult:

    • Centering view to a line not even possible.
    • Adding a text line, is slowing down the more lines it already has.
    • View always jumped a little (jittered) when adding lines.
    • Having a user selection while adding text was a PITA, got it almost working.
    • Had to be unfocused before browsing text above.
      Otherwise new added lines would jump to end (even if turned off).
    • Finding text needed a lot of code. Mark all was painfully slow.

    So I recently found and adapted BC to use the FastColoredTextBox control instead. Which is on the other side of spectrum. It is so feature packed (almost like a real IDE) that I probably only use 10% of it.
    Still, it is way faster at drawing text, has all needed features and even some extras already (like bookmarks). It needs using only fixed width fonts though (I used variable before). But it is understandable that e.g. selecting text (block mode too) was much easier to implement because of that.

    ✍️Motivation and rants

    Well everybody in company was using just cmd.exe to build (nearly all) projects, with a custom .bat file. I can’t post how it looked like exactly, but I can surely tell that at some point, it looked like a black and white TV noise. It happened when building with VxWorks started, using GCC (which is awesome). But here, it was outputting full build command, for each file, with all include paths too (like 8 lines of junk). In other words, it seemed like somebody was shoving a black and white sand at my face. Well I couldn’t even ?.

    About 6 months after I started working there, I was building a project very often, to test an upmerge of some stupidly outdated branch. This required to look for build errors in that white text sandbox. It is when I realized I seriously can’t look at this trash and I simply can make a program, that filters out and colors this junk (firstly errors).

    So after asking and getting approval, I started implementing it. Then after about 2 weeks I had a first working release. It was pretty basic, but already way more useful. It still had a couple of bugs, which I fixed later.

    Screenshot

    Now I can’t provide a real work example (also because of that*), so I’m including an artificial example on the screenshot (above). Output is similar to real and more general.
    The good part is that it has like 1 to 3 lines of each common message. Normally there are many similar lines on one screen, but only few unique. This way screenshot shows the whole process on one screen with already most of line types included.

    📊Features

    Here is a list of all program features from current version. Starting from basic, first implemented and ending with additional extras, added much later (not essential, but useful). I am describing them in place.

    🔨Basic

    • Changing font on Settings tab.
      Zooming already present, with Ctrl-Wheel or Ctrl-Num+
    • Unlimited buffer scrollback.
      cmd.exe has very small default value, and even doesn’t allow more than 9999 lines, in settings.
    • Settings in a XML file, saved in user folder.
      I’d say a standard thing. Holds both user set options and all line rules (find text, color, skip and more).
    • Combo boxes for user paths and commands.
      With buttons on left to add, delete, set as default.
    • Filtering (skipping) useless lines.
      There is a lot of rubbish, e.g. coming from MSBuild (also visible in Visual Studio), like:
      “Compiling…”, “Generating code…”, something up to date, lines with just “Microsoft Visual Studio” (a greeting commercial) and more.
      With a simple xml option to skip a line, the final output becomes cleaner and to the point.
      There is a textbox with last line present (just below console) that shows those skipped ones too.
    • Coloring lines
      By regular expression (RegEx), more info on its syntax here.
      • Later replaced (and extended) by simple find (String.Contains).
      • Advanced RegExes
        Use groups and replace (change) the incoming line (to make it cleaner and shorter).
        Still doing a simple string check first, to make the whole process faster.

    ⚙️Utility

    • Progress list. On right, it has just key build steps.
      Copied from output with time since start. It shows only 0:00 here because this test was fast.
    • Double click on a line in progress list jumps to it in console.
      This was pretty easy with FastColoredTextBox and it also centers (impossible and awful in richTextbox).
    • Find.
      Searching for text in console, with:
      find next, previous, mark all and clear marks.
    • Program icon turning green when idle, yellow when running, red when build has errors.
    • Saving current console output to a text file.
      Loading saved files into console, to view them later, in same colors.
    • Log file, optional.
      Auto incremented for more program instances.
      There are checkboxes for disabling line skip in log file or in console.
    • Tooltips with info text for nearly all controls.
    • Icons for most controls, also in menu.
    • Help menu with full documentation in about 10 chapters.
      Also Changelog and nice About dialog.
    • Opening VS solution and VxWorks with workspace
      By button (all with hotkeys), you could open the project in path quickly.
      There sometimes were more in one path, so new settings were added in xml.

    🛠️Advanced

    • Auto loading settings.xml file when it changed.
      Open by button on Settings tab, and on save in editor, program already loads it.
      Useful with many instances, all will do it. Also if one saves settings, other will load it too.
    • Queue.
      Ability to run a command in a number of paths sequentially. Done in settings.xml.
      Main thing here is that if a build fails in path the queue will quit, leaving the failing project path in combo.
    • Actions.
      Ability to start or kill a process, at command start, end or fail (build error).

    💡Observations

    So first, just as a warning, this is my point of view.

    There is a number of things I realized here, some I still don’t get and can only suspect.

    It is certain that I made an extremely useful tool. What bothers me here, is that nobody did it, in like 10 years. Well, I guess I’m the one guy who could create it so far and that is rare.

    Next, which is even more odd, some people still don’t use it. I can only suspect a few factors here, they:

    • Don’t know of it.
      It is obvious for me that even the best software (FOSS, well made and useful) will go unnoticed without promotion (or commercials) and spreading information about it. That’s why I am always announcing each new release in local emails and some also further.
    • Are too lazy to try.
      Sure all programs have a learning curve, but this one is easy and well documented.
      Sadly that can happen, even worse if it takes years. I guess I can’t really expect ability to change especially from people who work for too long in one place.
    • Are so addicted to old methods, that they can touch the future. Actually the present, for nearly 2 years. That’s for me even worse than laziness.

    ⏳Conclusions

    Whatever the case, it doesn’t matter that much.
    A software engineer has to deal with users. Sometimes even those who “didn’t even try turning it off and on again”.
    Also, developers need to balance listening to already users (wanting something) versus shouting at not yet users (to gain new ones).

    Lastly, I’m glad I could develop this tool, because otherwise I would hate building even more (now it is nice to look at, just old and inefficient). Also I’m glad if anyone found it useful (beside me).

    📷Gallery

    Screenshots starting with latest version from 2021 and its features, then with older until first from 2017.

  • 2018-19 K.C. Controller ⌨️

    2018-19 K.C. Controller ⌨️

    ⏱️Overview

    This is my own keyboard controller software used in my keyboards CK6 and CK7 (upgraded CK3 and CK4), running on Teensy 3.2 (or 3.1) with a color LCD display (160×128, ST7735 chip).
    It allows editing all: key mappings, layers, sequences/macros in real time on its display.
    It is continued in newer version with Teensy 4 and bigger display.

    📂Sources

    My firmware sources are here.
    I called it K.C. (aka “Kacey”) simply from Keyboard Controller. A catchy cool name for software is a thing, isn’t it.

    The readme with all key features is visible there too. Here will be a more practical description.

    ✍️Motivation

    My previous keyboards CK3 and CK4 were quite useful.
    But there were few flaws that I wanted to improve. They had a very tiny display, sure it did the job, but wasn’t convenient to look at for longer. Since I based my code on existing kiibohd controller software, there were few problems. Any change in key bindings had to be done on PC, needed to build binary and upload it to MCU. That’s a long way to e.g. check if it’d be better if I swapped some keys. Not to mention doing it at work. Lastly, there were few bugs which I couldn’t spend more time trying to fix.

    So, it’d be better indeed to start writing my own code. And that’s what I did. Right now I can’t find a reason not to use my controller code. Sure, it was easier back then to get started, knowing there is an open source keyboard controller and it runs on Teensy 3.1, this is how I got into it. My code surely doesn’t have stuff present in kiibohd like NKRO support, keyboard LEDs animations and other fancy things I will likely never need. But it now does have features I wanted and it wasn’t that difficult to code them.

    📊Features

    So the code features are:

    • Display with menu, where you can edit everything possible (that I needed so far).
    • Key bindings (mappings), i.e. what USB codes will the physical key send to PC when pressed. There is a pick list with all common keys (and internal functions) to choose from when binding. It has group colors and group filter for easier orientation.
    • Keyboard layout drawn on display. Shown when editing mappings. Has a cursor to move around between keys, can also jump to key by pressing it.
    • Layers. If you hold a key, whole keyboard layout changes giving you other keys. Kind of like the Fn keys on laptop but much more useful and customizable. Surely a common feature in custom controllers (like tmk or kiibohd).
    • Sequences aka Macros. Basically any key combinations (for key shortcuts) and any sequences of key presses (for e.g. passwords). Not typing passwords myself, when my keyboard could do it, was my first reason when starting with keyboard controllers back then. Sadly even in kiibohd you couldn’t change them without rebuild and upload. This then was possible in my fork of kiibohd. To be convenient, I am showing (short) sequence preview where possible. So when editing Mapping (for a sequence key), when picking a key from list or Testing pressed keys (if a key runs a sequence). I am also showing in sequences view any mapped keys that run selected sequence.
    • Sequence commands are an even further extension. If you have an editor on display (basically a simpler editbox) one could put special commands (beside sequence keys), that e.g. wait for few seconds, or change how slow the sequence will run (useful for putty). Newest ones allow putting comments, useful if you have lots of sequences and want to rather see what it’s for, not what it will press. And hiding sequence from preview, useful if you don’t want to show important passwords on GUI.
    • Mouse keys, i.e. keys that will move mouse, press mouse buttons or scroll mouse wheel. Also featuring acceleration and even parameters for it and speed in GUI.
    • I now even have mouse commands with all mouse actions possible to add in sequences. Some stupid programs don’t allow everything using keyboard and specifically want you to click with mouse. But hey, now even this could be done automagically by my keyboard.
    • Testing and Setup pages. Those are quite useful when developing and in normal use to check if everything is working properly as intended. Scan setup is nice e.g. to check which strobe delay, scan frequency, debounce time I need. Matrix page shows the 18×8 keyboard matrix, with my anti-ghosting code working and any issues from too low strobe delay.
    • Demos and Game. Were already present in my fork of kiibohd. Now extended with new presets to color display. Best shown on videos, links below.
    • Clock with date (internal RTC, needs 3V battery) optionally also showing Temperature, read from attached DS18B20 1-wire sensor.
    • Internal functions, e.g. to dim brightness or toggle GUI, by keys on other layer.

    ⌨️Keyboards CK6 and CK7

    I then upgraded my 2016 keyboards CK3 and CK4 with bigger, color display (160×128 LCD, ST7735) and K.C. They now became CK6 and CK7. Apart from the new displays and my software, the keyboards are the same.

    The CK7 is the oldest one, comes from CK4, which in fact was done from CK2 (2006) and is now 12 years old… Still doing fine. Well this proves then, that cutting and gluing rubber domes is nothing that would decrease the lifespan of a keyboard. Even recently folded keyboard foil since CK4 works okay.

    ▶️Videos

    There are a few videos of my keyboard CK7, showing most of K.C. on its display:
    (no talk and very poor quality).

    • View – Short video of keyboard and closeup at display.
    • Plasma – Quick and colorful show of presets of plasma fullscreen effect. It runs at 10-30 frames per second. Note that I overclocked Teensy 3.2 here at 120 MHz, HW SPI runs at 30MHz. My other keyboard CK6 has Teensy 3.1 at 144MHz, SPI at 24MHz, it gives about 1.5 Fps more here.
    • Demos – Showing rest of demos: 3D Polyhedrons with diagonals, Wave, Fire (not real) and the older ones: 2D waving CK Logo, Space, Balls, Fountain, Fonts.
    • Game – falling blocks (Sixtis), or my version of it. It has 11 game presets, generated blocks, possibly diagonal, with many parameters for custom games.
    • Features – A detailed look at features, no sound or descriptions though. Editing mappings, sequences, testing etc.

    Link to my channel with electronics videos here, mostly from my keyboards.

    ☑️Summary

    For reference, here is a table with current status of all my keyboards, since start until present day:

    NameAssembly yearOriginal keyboardKeys actuation
    [gram force]
    Notes
    CK3 > CK6 > CK92016 > 2018 > 2020A4 Tech KX-10023 gCheaper, bit wobbly, but more keys
    CK2 > CK4 > CK72005 > 2016 > 2018Logitech Ultra X Flat33 gStiff foil, old, extra keys
    CK5, CK5b2015, 2020A4 Tech KV-300H9-18 gThe lightest foil
    CK12004Logitech Ultra X Flat25 gFirst, old, had extra keys,
    now only for testing, 1 row dead 💀

    📷Gallery

  • 2016 Keyboards CK3,4 ⌨️

    2016 Keyboards CK3,4 ⌨️

    ⏱️Overview

    The newer two of my heavily modified keyboards. This time having Teensy 3.1 (or 3.2) as microcontroller with a tiny 1″ monochrome OLED display. Firmware was based on Kiibohd, it was a fork with my extensions. I added display support (with a library), menu for editing e.g. macros/sequences, few demos and a game.
    I did improve them further in my newer firmware, with bigger display.

    🛠️Modifications

    Light press

    Rubber domes reduction for minimized pressing (actuation) force and distance. Simply more pleasant and comfortable. Also healthier, since the risk of keyboard injuries decreases. I do it always for all my keyboards. Process with info shown here and in gallery below at end.

    ⌨️Additional keys

    For CK4 there are also few small extra keys. Which were present already in my earliest keyboards CK1 and CK2. Those are glued on top and are made from lightest 0,5N switches available. The row above numpad is used for my audio player control. Rest is custom. This part is optional and I didn’t do it for CK3. The disadvantage is the difference in pressing those switches and much lighter normal keyboard keys. They are smaller so you can fit more, but are less convenient to press. Lastly, regular keys can be used to switch layers instead.

    ⚙️Microcontroller (MCU)

    The second step was replacing the keyboard controller board, with my own. The hardware is composed of Teensy 3.1 (or 3.2) with a tiny 1 inch OLED display (SSD1306, monochrome, 128×64) and a bunch of wires to connect to the original keyboard’s matrix.

    The reason for this was to take advantage of already made open source Kiibohd controller allowing any imaginable keys assigned and layers. Also possible are macros, key combinations and even mouse buttons and movement simulation. But changing any of this required rebuilding controller software and uploading to controller, through already present USB.

    It was a bit simpler to start at the time, instead of writing my own later.

    📊Features

    After getting it to work, I implemented my own menu where you can edit sequences, stored in memory (remembered after power off). The sequences are very useful for not typing passwords or simply binding some useful macro combinations or commands dynamically. Which needed a display and menu for entering.

    Once I’ve done the useful stuff, I got carried away and implemented several demos on display and even a falling blocks game.
    I also wrote about it in this forum post.

    📂Sources

    The code is in my fork here with some more detail.

    ✅Summary

    For reference, here is a table with current status of all my keyboards, since start until present day:

    NameAssembly yearOriginal keyboardKeys actuation
    [gram force]
    Notes
    CK3 > CK6 > CK92016 > 2018 > 2020A4 Tech KX-10023 gCheaper, bit wobbly, but more keys
    CK2 > CK4 > CK72005 > 2016 > 2018Logitech Ultra X Flat33 gStiff foil, old, extra keys
    CK5, CK5b2015, 2020A4 Tech KV-300H9-18 gThe lightest foil
    CK12004Logitech Ultra X Flat25 gFirst, old, had extra keys,
    now only for testing, 1 row dead 💀

    ▶️Videos

    CK3 demos, CK4 demos – showing all demos on display, it is only 128×64 resolution

    Plasma – uses dithering, since display is mono, 1 color only

    Game – blocks falling, shortly played on each preset

    Features – menu with all configuration possible back then and options, also keyboard view

    Keyboard View CK4 – shows view at CK4 keyboard

    📷Galleries

    Pictures from my keyboards are as follows (newest first) of final result and assembly for CK4 and CK3:

    CK4 final (18 Apr 2016)

    CK4 assembly (Apr 2016)

    CK3 final (11 Apr 2016)

    CK3 assembly (Apr 2016)

    CK3 rubbers cut and glued (Apr 2016)

  • 2010-15 Stunt Rally 🏁

    2010-15 Stunt Rally 🏁

    ⏱️Overview

    Stunt Rally is the game I started in Dec 2009, having first release in Apr 2010 and last (2.6) in Sep 2015. It was my biggest project by far, I developed it for 5 years almost continuously.

    Update: I started developing again after about 5 years break, and continued with new version 2.7 and moved to newer Ogre-Next in upcoming Stunt Rally 3.

    The game works on GNU/Linux and Windows. It features its own Track Editor. Simulation for cars comes from VDrift and rendering using OGRE 3D engine, more info here.

    I’m proud of what it became, but most importantly from the people I met, who contributed to this project, especially developers and track creators. The experiences gained and things learned with this project are significant. And it was a lot of fun.

    🔍Detail

    I created the 📖SR presentation book, it has 196 pages with lots of screenshots and explanations of the whole project (until version 2.6).

    You can read and see more on Stunt Rally website.

    There are few gameplay Videos and a huge Gallery (about 2000 screenshots) with a fun development gallery of same size. You can find complete documentation and even Track and Vehicle browsers.

    So, the game’s documentation will tell you everything about the game, track editor and tools.
    But it won’t tell you the history behind it. While the presentation book covers whole project (both the game and editor) in general, this post tells how it all started.

    That’s why I made this page. It’s also my dearest project and I get very sentimental every time I play it or even look at screens or videos. So I think it deserves it, and could be informative.

    📜History

    Around Dec 2009 I started looking for open source racing games, from which I could use the simulation code. My previous projects from 2008 and 2007 already showed me the limits of using only physics engine’s included car demo’s code for games. So PhysX and Newton Dynamics respectively. Bullet had its own car/vehicle demo too, so I knew it could only be fit for a basic arcade game.

    I was aiming at a simulation and wanted the most complicated code. After all I was playing Richard Burns Rally already for a long time (on keyboard), liked WRC (on gravel and from 2004-6 mostly) and actually despised any other car simulation games for being too simple (maybe RBR fans of that time know what I mean).

    Open source racing games

    There were actually just 3 games: some old code from Racer, TORCS (now SpeedDreams) and VDrift. I played them somewhat, then compiled all and tested. After that and decided that VDrift is the best, simulation code was quite sophisticated.

    The projects I didn’t consider were: SuperTuxCart (too basic, and for kids) and RigsOfRods (not a racing game, just a sophisticated vehicle simulation, but also using OGRE).

    VDrift was also still actively developed at the time. And I liked their move to also use bullet. That was simply needed to have any collision with environment.

    I edited the .car file a lot to find if it is possible to use VDrfit for gravel rally, later posting the results. It was good and fun, I played VDrift somewhat with my setups (gravel, wet, ice) since the original game was quite unplayable for me.

    Compiling VDrift and adding OGRE

    The beginning part was the most difficult. I was at the time just Windows programmer (but really liked GNU/Linux thanks to this project). So compiling a Linux project on Windows in Visual Studio wasn’t easy. When I finally managed to do it (IIRC after 2-3 weeks), I started tinkering with it, removing code I don’t want, etc. Still using the OpenGL renderer.

    Then on side, I started a simple OGRE app with just few models on scene. Later connected both. Getting the VDrift meshes to show right was a bit work (different x,y,z axes, 3D models). But without it, I wouldn’t see anything, so it was crucial.

    Once all worked I made the first release pack in April 2010. Was Windows only and most likely it wouldn’t even start without proper MSVC framework installed and such.

    It had only 1 car, VDrift tracks and no GUI. I compared the performance and started a topic on VDrift forum. It was terribly bad because of their tracks having thousands of meshes. So using OGRE for VDrift would be a bad idea. But that wasn’t my point. I knew OGRE already and in my previous attempt had a big terrain with good look and performance. I knew what I wanted in my own game and how to do it now.

    What happened next was fast (given only my free time) and needed a lot of coding and testing. But it was easier than the previous part. You can check the screenshots of funny situations from versions 0.1 to 0.5 in the first development gallery.

    Terrain

    I quickly added tire trails and particles, since they were already in OGRE and it was easy. Trails were never in VDrift and particles weren’t great. At the time VDrift moved to using bullet and that was perfect, since it was needed for any car collisions with environment. Then I added the Terrain component and tweaked code to have proper fitted heightmap triangles in bullet world too.

    Next I added PagedGeometry (I knew it already) to have some jungle vegetation, that came with Ogitor (same project we had textures from, for a very long time).

    Later I also added MyGUI. The options looked quite similar to my previous project, but this GUI system was much better and there were already more tabs.

    Also included 2 more cars. Then made the 0.2 release pack in Jun 2010, and started the topic on OGRE forum.

    Road

    Since there was no road plugin for OGRE, I started coding my own. Based on a Catmull-Rom spline, which is probably the easiest to edit and most intuitive, it just interpolates between points.

    Terrain already had its own LOD (level of detail) system. Road surely needed one too, to not quickly produce extreme counts of triangles visible. I thought of just 4 LOD levels for each road segment (auto generated in code), and a simple distance to camera check to pick one accordingly, showing less triangles further. Picture here. It wasn’t the easiest code to write, but I’m glad that I did it. It became the base for road and was extended few times later. Nothing else would fit so perfectly as own written system.

    📖Presentation

    I focused on creating the SR presentation book, which covers not just our history but the whole project with all of its aspects and implementation.
    The presentation has 196 pages with lots of screenshots and explanations.

    ⏩Fast Forward

    • 📜History of added features in each release in Old changelog.
    • 📈Statistics. Showing releases and data increases.

    What came next is summarized below in short points, in more detail than on presentation.

    Key steps of project:

    1. As described on previous pages the start was in Dec 2009 when I found VDrift and experimented with its car settings.
    2. I created the project on Google Code in 2010 to hold releases.
    3. My first release was in Apr 2010.
    4. Then came first issues.
    5. The game ran only on Windows at start. I suspected it would be rather easy to port to GNU/Linux (since both VDrift and OGRE did work).
    6. I was doing screenshot galleries on each release and game video every few. In a year I made nearly 10 releases (“Release quickly, release often”). I didn’t have a repo.
    7. After a year in Mar 2011 two guys (scrawl and Tapio) have joined and did quickly port game to Linux. Also added CMake build system.
    8. Also in Mar 2011 I created repository. Initially was Mercurial, because Google Code didn’t have Git. But then we quickly moved to GitHub (in Apr 2011 or so).
    9. At the same time we started using IRC on freenode to quickly communicate,
    10. Translations was surely one good thing done by new guys at start.
    11. In version 1.0 (Jan 2011) my track editor was ready and fully functional. I made a series of tutorials on how to use it. I was developing it further too (only I did that).
    12. Game was featured on freegamer blog, first with version 1.0. It did boost game’s popularity. Every time a post appeared after too.
    13. Since version 1.2, we started uploading the Releases to Source Forge. Google Code and its 100 then 200 MB limit were a problem. At that point it only was for homepage and issues (that view was very nice and customizable though).
    14. At some point the game was also added on playdeb, and on lgdb. I think those were (or are) the biggest Linux gaming sites and they helped with game’s popularity too.
    15. Scrawl did many things in the game. A lot of related to input (for controllers), post process effects, shaders, split screen, water in 1.5, etc.
    16. In version 1.5 we finally finalized multiplayer, done by Tapio. I was doing the Gui part. It took him a year to finish it, but I was glad anyway, since I could do other things at the time. I posted on Vdrift forum. I think, VDrift project was developing more slowly then.
    17. Scrawl did a wonderful task of creating a material generator once, and then even a second version called shiny (as a separate library for OGRE). And this thing made us reach a great look with nicely coded shaders (generated for both DirectX and OpenGL) at a higher level. I loved using it.
    18. Scrawl and Tapio were mainly active for about a year. Then I was developing alone again.
    19. We started a forum for the project, somewhat later in version 1.8, Nov 2012.
    20. Forum was great on freegamer, since there were many users already.
      It attracted the greatest people, artists creating tracks (and even sceneries) for the game using my track editor that I was also developed with the game. The best being: rubberduck who also made many buildings and objects, and Wuzzy.
    21. I guess I should also mention Calinou. He was always on IRC and had an opinion whenever I asked. This is already a useful skill. A couple of his many tracks went into the game.
    22. At some point I found out the greatest Nobiax CC0 textures and replaced all tracks terrain look, also implementing own blendmap with noise (for mixing them). There were a few such revamps of all tracks (big artistic task, bit tedious), for shaders, waters, skies. Terrain was the biggest.
    23. Project’s website was done very late in 2015, more info about it here.

    ⚖️Contributors

    There were few other people e.g. a guy who let me use his IRC bouncer. Tapio was later doing translation syncs, until I someday finally learned that. He was also hosting multiplayer game list server on his PC for years. Scrawl did later a VM setup and was making GNU/Linux binary packages on each version release. There were also few people translating the game to other languages than English (9, 5 of them fully).
    Finally, I can not forget to mention all those artist sharing their CC-BY 3D models on blendswap, also textures, vegetation, objects, and even 0 A.D. buildings. I was gathering all authors and website urls in txt files in our data/ directory each time I added something (later visible in Credits page in game).
    Naturally all the open source libraries used (including OGRE and VDrift) have to be mentioned here too, since without them the game would be completely different.

    All that was great and helpful. I want to thank all who contributed to this project.

    ➡️Break

    I was constantly developing Stunt Rally for 4.5 years. I was thinking of finishing the development a couple of times.

    I first ended developing in Nov 2014. But I returned after about 9 months for 3 more, rewriting sound system, replay files, adding pace notes and more.

    I announced development end on 19 Sep 2015. It was version 2.6, the 26th since start.

    Lastly, I have to add, it wasn’t just the 5 years it took to create all this. I took many years before that, of me learning from my projects, and having more experience every year doing so.

    Update: It wasn’t the end, but a few years break. I resumed the project 6 years later as Stunt Rally 3 since 2022.

  • 2010-15 SR Track Editor 🏗️

    2010-15 SR Track Editor 🏗️

    ⏱️Overview

    SR Track Editor is the program that comes with Stunt Rally and was used to create and edit all of its tracks. It first featured in version 0.6 (6th release in Nov 2010) and in version 1.0 (10th release, in Jan 2011) it was already fully functional (could edit all track features, at that time).

    I will describe here its features, from the latest version. It surely evolved with the project and changed its look in time. Unlike the Stunt Rally page, which shows the whole history, here I’m describing the present (it is free and open). And I focus on features, visible on GUI.

    🔍Detail

    Since the program is rich in features this page will be long. But also explanatory, for unique tracks and game features. I also reference any tracks that show off a particular feature with links to our online track browser.

    Editor is 100% designed and coded by me. There were many contributions to the game, but none to editor. I customized it to be a fast tool for editing, as I was also the main user of it. There were few awesome people using it too and creating tracks for the game.

    There is a series of ▶video tutorials for using it (from older versions though) and a Wiki page. If using editor, keep in mind that many places (GUI controls) have hints, so mousing over them can show a tooltip, possibly with useful information. Editor itself has help pages, listing key and mouse actions for each mode. Having seen all this, it should be easy to use it.

    📊Features

    One main aspect of editor is that it doesn’t feature an Undo/Redo, for me this feature was never needed and too time consuming to implement. We use quick Save F4 and Reload F5. One can also make backups manually of the directory. It is recommended to save often and on mistake just reloading.

    Track tab

    Track tab is the first I’ll explain. It takes some time to understand all what is visible here. Knowing it will help picking your base track to edit. Or finding an interesting track to drive.

    First, on left we have the list of tracks (172 total in version 2.6).

    In the middle there is an image with view of the track. Usually camera is high to show most of it.

    Below a short description. It is sometimes crucial to read it on difficult tracks, as it may contain useful warnings and hints. It’s writable in editor.

    Right bottom image is the minimap (view from top). It has useful info too. Background shows terrain shape. Flat road is black line, bumpy or banked road gets more gray. Bridges are cyan, pipes yellow. Half pipes will be green (0.5 mix between cyan and yellow). And lastly On-Pipe driven sections are orange.

    The track list (on left) has 2 extra columns: difficulty and rating (*). You can sort on them to easier find the tracks you want to drive. This is the default short view. The detailed view has many columns and can be toggled using the buttons above it [  |  ] and [ ||| ]. Some useful columns are N: (track index, sorting to get oldest to newest order), Scenery (we have 34) and ver (game version when track first appeared).

    Next button [  Y  ] toggles an additional, complicated filter window. It has sliders for min and max values for all columns and checkboxes to toggle their visibility (possible in both views).

    Since the tracks count is very high, we have a find box (bottom left, Ctrl-F), where you can type name or phrase to search.

    Use track load button or press Enter to load it. Arrow keys move in list (with Ctrl by 5).

    Duplicate button will make new track which is a copy of loaded one. There is no New button since it’s easier and faster to start from an existing track with similar scenery.

    Track icons (extra)

    Just above minimap we have a row of icons with small values indicating various things on track (they disappear when zero). Those are as follows: fluids (water or mud areas), bumps, jumps, loops, pipes, banked bridges, frenzy (curly road), obstacles and objects (dynamic). Of course hints for them will show under mouse. The higher the value of each, the more will be there on track and thus it will become difficult.

    Above this row on left we have track difficulty (most important) value: 1 (green, easy) to 6 (red, extreme). Next is rating (star icon), it is my personal quality assessment of the track. The third icon (red vertical line) is general (coarse) length.

    All those show in columns in detailed view and the list can be sorted by one. This allows searching for tracks with e.g. most loops or fluids etc.

    They all are set manually (be me) for official tracks and stored in tracks.ini file. User tracks have none.

    Track stats

    The next group of road stats is above icons and those are automatically computed by the road system. They are: length (in km), area (just side length of the always square map), average width, height difference (between highest and lowest road point). Below in middle center, with icons are: bridges percentage (cyan), pipe % (yellow) and on pipe % (red) on right. Above on right are road banking angle values (average and maximum).

    So that was a lot, and this is only the first tab. But it’s also present in game, and nearly the same.

    Sun

    Sun tab has all the options for sky, light and weather (and fog on next sub-tab). If in editor, you can read hints from tooltips for more info.

    Sky can be rotated to better fit track. Sun direction has rotation too (yaw), and pitch sliders. For example small pitch will make long tree shadows.

    These angles will be set when picking sky from list (if checkbox for it is set there).

    Pressing sky name button will show pick list with all available skies. Tab key is the shortcut for this (on other tabs too).

    Weather has 2 possible slots. Each can have one of many different particle types: rain, snow, fine, heavy, storm etc.

    Their intensity (emit rate) is set with sliders.

    Since it’s usually not needed to see weather emitting while editing track, it is toggleable here (or with key I).

    There can only be 1 light source in game. It is directional and is called sun.

    For this light, we have 3 parameters: Ambient, Diffuse and Specular. Ambient is the constant background color. Diffuse depends on surface angle (sun direction versus surface normal). And Specular is similar but has also power, it is the shininess.

    All colors here have: Hue, Saturation and Value (Brightness), which are obvious. But additionally, Value can go above 1, lightening more, used e.g. on deserts (Dunes etc). And there is a new Negative value, very rarely used. It can act as a negative light, decreasing brightness, e.g. a blackening sun on BlueHell.

    Fog

    It is a cheap effect, already present in earliest games. But quite good and present on most tracks.

    Fog itself is linear and has 2 sliders: start and end. Until start distance there is no fog at all. And above end distance, there is full opacity fog.

    Fog can have 2 colors. If not needed those can be the same. Useful for example on a sunset sky where one color is orange near sun and other can be gray on the opposite side.

    Height fog is an additional type (with own color) added to there regular fog. It depends on height, so gets denser when lower. Start and end parameters are here too (to allow own values for distance). Height and smooth values determine where it will be and how fast will it be dense (opaque).

    Fog colors (beside the Hue, Saturation, Value and Negative) can all also have Alpha (transparency). When below 1, fog never reaches full opaque in end, allowing some visibility.

    Higher than 1 for Value results in glowing fog, seen as light. Present e.g. on tracks: Pipeline, Crematoria, GreenStar and more.

    Last thing for fog, it can deal damage (over time) to vehicle. Happens inside lava, acid, radioactive pool etc. E.g. on Craters, Radioactive and AcidLakes.

    Video tutorial here (from version 2.1).

    Road

    Road is made using a Catmull-Rom, 3D spline. It can go in any direction. The system building geometry for it (segments, with LOD) was also coded completely by me. Started in the earliest versions and developed further to support bridges, columns, pipes etc.

    Let’s start with the simplest features.

    Points

    Road consists of points. Each point has several parameter values. Point is associated with road segment. As can be seen on picture, the blue spheres are road points. Selected point is violet. It also has a bigger red sphere beside it, which is used to show rotation for banked bridges.

    Points are inserted inside the glowing segment. The simplest road point parameter is width. Road width gets smoothed between points.

    Checkpoints

    A point can have a checkpoint sphere radius set. For road on terrain it’s recommended to be wider than road e.g. 1.6, but this will vary in places, bridges and pipes naturally have 1.

    Checkpoints are set manually for each track and used for many things: driving progress percentage, direction arrow (where to drive), also a beam (in place there), and most importantly to show Wrong Checkpoint, if driver misses it, while being too off road. They are explained in this video.

    Bridges

    Those were points On Terrain. Now if you toggle this snap off (Home), it will allow moving point vertically and automatically produce bridges, with side and bottom walls and columns.

    Materials

    Next easy topic for start is road materials. There can be only 4 (for performance) and they are set in Road tab. There is also a pick list to choose from all.

    Materials are changed with keys per road point, and this will blend (transition) in and out the material from close segments.

    Also on Road tab, we can change wall material, and column geometry (radius, sides). Columns are added automatically, always in half of segment. They can be toggled off. But manual placing isn’t possible. Adding more road points, evenly can fix it. There is only 1 wall and column material per whole road (also performance).

    Now let’s get back to the point.

    Banked

    Having a point in middle air lets you rotate it. Changing roll angle will make banked road. This allows side turns and skewed loops like shown here (Refinery).

    Pitch is never set, it is automatic. Yaw also, but it can be adjusted. It decreases width, but is sometimes needed, e.g. when creating loops (upside down road part).

    Tracks with a lot of banked roads are e.g. Web, Spider.

    Loops

    Loops require 8 points or more to be good and smooth. And as we can see, having full control of each point gives freedom to create any types and original shapes of loops. Since they have walls, it’s hard to fall off of them, except when upside down and driving too slow, or for difficult, skewed ones.

    Tracks with many loops are Loops, LoopBasic, Scorpio, Refinery, BlueHell, Crematoria.

    Selection

    At this point, it is worth saying that: (many) road segments (with points) can be selected.

    Besides that one point (or none) can be picked.

    The selection can be:

    • Moved (all at once)
    • Rotated (yaw, around picked or center), or Roll (used rarely)
    • Scaled (to center or picked)
    • Copied and then
    • Pasted (even on different track), or Pasted reversed
    • Mirrored (reverses order of points)
    • Changed, i.e. some parameter value change, for all at once

    And lastly picked points parameters can be copied, so when inserting, new one(s) will get same values. Makes it easy to e.g. continue a bridge in air at some height or split segment (add an extra point inside) etc.

    Pacenotes

    This track Factory, shows pacenotes in editor.

    The system making them is (almost) fully automatic. This code was also challenging to write. But it proved my idea, we had already so many tracks and auto generated pacenotes for all turns were the way to go (saved an imaginable amount of tedious work if it had to be manual, also for any future edits). It is not perfect, as it sometimes does 2 turns where it could be just 1 but otherwise is great.

    There are a few exceptions. Loop types (regular, side, barrel, 2 in 1, etc) have to be set on point manually as extra parameter. There was already one to mark a loop for game camera change. Next, jumps for their text with speed are using recorded track’s ghost, which means without it there is no info and also means that values will be exact only for ES car. All others will be scaled and may not match if aerodynamics is different. And lastly some roads have invisible parts that only tweak something and we don’t want any pacenotes there, another parameter to mark them not real was added.

    Pipes

    Introduced early and quite fun. Actually easy to drive in, since they direction the car in turns when driving fast. But will play tricks otherwise with beginners.

    Also sometimes steering is needed in turns, or to counter act car inertia. And driving too fast will damage car bottom due to high acceleration acting too much on suspension (just like in loops).

    Pipes require more triangles to be smooth and have own advanced parameters for geometry in Road tab. The most difficult part here though was making the transitions. They can start from bridge or terrain road, and both have a huge difference of width vertices compared to pipe. This value has to inc/decrease smoothly and make triangles/faces accordingly. Picture here.

    Tracks with many Pipes are e.g. Infinity, PipeCoil, Pipeline, Ocean, Obstacles, Winding, PipeCurl, Pipes.

    Half-Pipes

    A pipe itself is just a value of parameter pipe for road point set to 1. This allows many other possibilities and having around 0.5 had the name of half-pipes. And few own tracks: Snake, HalfPipes, Knotted, MagicFog.

    They are also one of coolest things in the game. Are more difficult than pipes, since you can fall out of them.

    Of course pipe is a factor for each point and it can have any value from 0 to 1. E.g. 0.1 will be nearly flat bridge (with no borders) and 0.9 will give a not yet fully closed pipe.

    Since pipes were very easy, at some point obstacles were introduced inside them. More on that later in Objects section.

    On Pipe

    Introduced later in game. Pipes are difficult to drive on them (and easy inside). This happens because you can fall out easily. Being on center is crucial for straight road, but in turns finding the right place can be tricky and fun. This screen is from Industrial, a heavy and long track that has most of it driven on pipe. There is also DangerRoad which has full on-pipe drive and thus is very difficult.

    On pipe loops were probably the most difficult stunt element. It’s very difficult not to fall off and tricky to stay center until end of it.

    Jumps

    Were also quite early. But a bit more problematic for the simulation. Car suspension has to be stiff to land well and usually the tolerance of speed is narrow (i.e. too little won’t jump across and too much will land badly and roll over).

    At first they weren’t open. At some time a new hidden material (-1) was introduced and they started to look well. Shown here is one of first tracks with them. Also, notice the  spheres on ground between jumps. This was the first way and isn’t the best. Having those single points higher than jumps is better since, the auto pitch (of road) will make jump ends go straight into sky, and not turn lower like here.

    Fortunately it is easy to select both jump end points and move them up. Or select all jump segments and then: move, rotate, scale or copy them.

    This track Platforms (left) has many jumps. Version 2.6 has introduced Pacenotes system to the game. And added an extra text showing required / minimal vehicle speed to jump across. An original idea and track using it was PipeJumps (right).

    Other tracks with many jumps are: CrossJumps, TopTwist, Scorpio, Mars, JumpCrazy, HighJumps, Abyss.

    Terrain – Layers

    Terrain is using OGRE terrain component with additions from shiny material generator. Due to limits of shader texture units and using 1 pass, it can have maximum 4 layers.

    Each layer is a set of 2 textures, 1 having diffuse+specular and 1 with normal+height data. In practice an example for 4 layers would be: grass (or sand), other grass or mud, rocks, snowy rocks. The more are used the worse performance, but 3 or 4 look best. We have 6 layer tabs and enable checkboxes just for convenience.

    We have a huge number of textures (109) mainly 1k size, CC0 licensed, pack and info here. This gives a great base for the variety of our sceneries.

    There is a pick list with all available. It also fills scale. It is a very important parameter. We don’t want to much texture repeat and on the other hand we can’t have them stretched too much (or just have unrealistic size).

    Another important aspect is where the layer will appear. We can customize this by telling terrain angles range, and also height range. For example: sand at 0m level and below, grass otherwise, but not higher than 50m and additionally mountains if terrain angle is higher than e.g. 22 degrees. Layer painting is not implemented and not really needed. It would be sometimes useful though to have some manual feature. But otherwise this system saves artists time to decorate terrain.

    Noise

    Also each layer can additionally have noise, that can blend into next+1, next+2, or previous -1 layers. Each has own slider, giving 3 factors total. This allows e.g. the first (sand) layer having spots of second and third in other places, making it more unique and less repeating. Also the last (mountains) layer can have spots from previous. Example shown here on picture, from track HighPeaks.

    Blendmap

    Blendmap is the texture that will have information of how to finally blend layers on terrain. There is a helpful visualization for it (Test F9), shown on picture. When done well, it should show Red, Green, Blue colors, mostly separated (and White when 4 layers). Even if this track is flat and small and dense with grasses, it has 3 mixing terrain layers.

    Advanced

    There are some extra parameters for terrain, rarely changed. The sliders are shown in next chapter heightmap below.

    Terrain can emit light i.e. have emissive layer. This has a checkbox to turn on, and a slider for scale. It will disable normal specular light though, instead using it for emissive map.

    An example here is lava e.g. on Crematoria, Craters. Without it the look would be too dull and unrealistic. And others examples on Radioactive, Magic, Wild.

    Next, normals scale and specular power change terrain lighting as whole.

    Terrain heightmap

    On terrain tab we got parameters that setup the heightmap. It will always be square grid. But larger maps need more area. Heightmap size can only be power of two. It also decreases performance when high and additionally makes track bigger on disk. So 2048 should never be used. And if track isn’t big, 512 should be good.

    Once set it shouldn’t be changed. But there is a button on Tools tab, to half the value, as a last resort to make track have more Fps (better performance).

    Triangle size is a real number and it can be scaled freely. But recommended is the size of 1-2 meters, since if too big it doesn’t feel real when driving. The resulting size in meters (side length) is computed and shown here too.

    Terrain brushes

    Having good looking terrain means putting some time to paint it. It is like a canvas for an artist. Best to paint in each place and also using different brushes. It’s also good practice to decorate terrain more, after road is final.

    We have 4 types of brushes: Deform, Smooth, Filter and Height set. All brushes have common factors like radius (size) and intensity (strength).

    Deform can make terrain lower or higher, by factors from brush. The simplest are of course just a solid sinus circle, most effective in center and not at all on borders. Smooth brush will tend to flatten terrain in place, it was made first, and sometimes needed. Better and new is the Filter brush. Filter brush can fix all your problems (except real life ones). It smooths terrain without loosing shape, it is a filter that reduces high frequencies (noise) on terrain. Also has a parameter for kernel radius. Height brush sets a height value in place. The value can be adjusted with mouse. It can create flat place

    There are several terrain brush presets, shown here on screens. The first row is just the basic circle tools with different type, radius and intensity. The rest is various deform with noise presets. And last 2 rows have fancy regular shapes. Below each image there is a number with radius. Also hints show a name, but image is mostly sufficient.

    Terrain – Generator

    Terrain generator is a great start for tracks. Especially those big, scenic, nature tracks. It isn’t enough to just use it, manual painting gives unique feel and character.

    It is a functionality that generates noise, the size of whole terrain. Preview of it is shown in left bottom corner. It has many parameters available on sliders. Like with every slider, clicking RMB on it will reset value. The resulting noise can be moved around with offset and scaled to real heights. Clicking buttons can either Add that to the terrain, Subtract or Multiply it with. Thus multiple uses are possible. It can also ignore road, so be used even after road was placed on terrain, but need adjusting bridge ends then.

    The generator inspired creating Spikeland track and JungleCanyons.

    Tools

    Align Terrain to Road is a very useful tool. It is shown in a video here. It has own test track that demonstrates the result. The tool needs a road with selected segments. Road needs to be in air (bridge, otherwise nothing is needed). Upon using it will adjust terrain heights so it ends to be where bridge road was. Then road can go On Terrain instead of bridge, preserving shape. It also has 3 sliders for smoothing terrain a bit to the road on borders for small distance.

    Other tools available here are from top, the ability to copy various things from other track to current. On Track tab there is a button set as copy source, so once another track is picked and button clicked, we can use buttons on Tools tab to copy stuff from it. E.g. Vegetation, Sun and weather, Terrain layers, Road parameters etc.

    There are Delete buttons here too. Since there is no new track, just duplicate, you may want to delete various things like Road, Fluids, Objects for your new track.

    Lastly on this tab, we have scaling ability. One can scale whole track by factor from slider (and editbox) or scale just the terrain height. This is useful, since when driven after editing, track may feel too big, stretched out and it’s an easy fix by scaling it below 1.0. Contrary if it feels to big, above 1.0 can fix it. For compensation, terrain height can also be scaled.

    Game setup

    Game setup tab is quite new and unique. It actually has settings for the game, on this track.

    So gravity, which is different on Mars and other planets.

    New in version 2.6 of the game we have reverb sound effect on track for ambience feel. There are presets here in combobox to pick from.

    Wind is present on track Sandstorm also lesser on Twister and here is its strength.

    Damage multiplier is less than 1.0 on very difficult and long stunt tracks. Otherwise it wouldn’t be possible or too difficult to drive them until end.

    Grasses

    Grass is done with PagedGeometry plugin for OGRE. It also shows the same old approach and enforces things that wouldn’t be done today. Namely the page size. Which is a constant value used for optimizing view and reducing drawn batches.

    Main page with properties has the slider for global grass density, it’s the first thing to adjust.

    Also present here are grass sway (from wind) parameters. They were rarely changed, and added late. Smooth parameter makes the transition from road to grass more natural and less sudden. It blurs the grass density map.

    Next tab has more options.

    Here you can actually pick grasses, and see the texture on right, to check its look.

    Then adjust its vertical and horizontal size ranges (x,y min and max).

    Each grass also has its own density.

    There is a color map, picked from combo to slightly adjust final color.

    Grasses can be picked from another long colored list, that helps finding particular types. Picking can also auto set parameters for faster change.

    After change either press V twice to disable and enable vegetation showing or press Update (F8).

    Grass channels

    Grass channels are optional. But useful for different grass setups, e.g. regular forest grass and other one appearing in snowy mountain parts.

    In more detail you pick a channel for each grass. A channel has common parameters for terrain like its height and angle ranges. And other parameters for noise and road distance.

    Vegetation

    Vegetation here means: trees, rocks, ferns, mushrooms etc. Basically everything natural that repeats a lot and is automatically placed on track, basing on terrain.

    It uses the PagedGeometry component (unfortunately not Instancing) and comes from an old era, when meshes were batched on CPU into larger pages, to reduce batch count of single meshes. At distance meshes are displayed as flat billboards called impostors, prerendered at few angles and cached on disk for later.

    The key parameter in properties is density, which is global for whole track’s vegetation.

    The same page size as for grass is also here, just with different values. Also distance which is basically the same as page and impostors distance, at which trees will be flat billboards.

    Usually tweaked for each track to optimize batches draw versus triangle count. Higher size pages will create lag and make more triangles, while lower would visually switch more and create more batches.

    On next tab, individual Models are picked and and their properties adjusted.

    Main are density and size range.

    Next useful are road distance (could be e.g. higher for trees and lower for ferns).

    And the same terrain properties: height and angle ranges, where this model can appear on track.

    Lastly fluid depth allows excluding models from water, mud etc. It can allow few meters submerge.

    It is recommended to use 4 to 6 models. It depends on count, but generally more models will mean lower Fps, more lag, etc.

    As for grasses, to see the change change either press V twice or press Update (F8).

    As before for grasses, you can also  see the long pick list here for finding models. They are colored with scenery color (same as tracks) and can also auto set few parameters when picked.

    Provided here is the 3D view of rotating model. And the numbers above it are real size after scaling, min and max values. This way you can get an idea of size and compare it to e.g. real life size of a tree.

    After the density slider is the actual count of occurrences for this model on track.

    Fluids

    By fluids I mean water (mostly), mud (few types) and other special ones like acid, lava, ice.

    Here you can see the water, depth map, which is made by editor, making deeper water appear more dark and also transition smoothly to terrain.

    Fluids are just rectangular areas moved and sized by mouse. While editing depth map is disabled.

    You can also change their depth. This could allow more than one at different heights on track. I think this wasn’t used though.

    Mud has 3 basic types: slippery (light), medium and hard (dense, dark), giving different friction when submerged. Next 3 types have a modulation for direction to not be so linear.

    The most intensive fluid/mud tracks are: MudMad, MudBath, MudFlats, Swamp, Muddy, Temple.

    Solid fluids (introduced recently) are rigid and can be driven on, e.g. hard lava, ice.

    Damage can happen from lava (and acid).

    Present on tracks: LavaPools, IcyRiver.

    Objects

    Objects were featured a bit later in game and are a quite essential part of every editor.

    Static object allow placing a mesh like rock, cave, building, obstacle, statue, balloon, etc.

    They can be moved, rotated and scaled freely. There is also multi select option (similarly to road points). Allowing faster manipulation for many at once.

    Dynamic objects are the ones you can hit in game and will move or fly away. They cannot be scaled, but otherwise are placed and edited the same way.

    They have a special simulation mode in editor. It is meant to be turned on, so they can settle on the ground. Then turned off and track can be saved. This is to save the game from doing that on each track loaded. Thus game creates them all in asleep (not moving) mode.

    Shown here on screen are the lists with object types. Dynamic ones are in blue on left. Rest is static. Single ones are in white list. Rocks and caves have special, orange column. And lastly buildings in yellow. Since there are many of them, they have another short list with categories, that upon picking will fill the buildings list.

    Obstacles were introduced later by contributors and are a great way to make driving in pipes more difficult and also have some surprising sections on tracks too. Possibly for decorating too. They don’t move with road so are meant to be placed rather as last. Changing road would then require moving them accordingly.

    Warnings

    Last feature of editor is showing some warnings for things done bad or just not optimal for performance. By default checked on track save. A video shows the various things checked. Wiki page lists all.

    Those are very simple checks for performance and some tracks (that reach the graphics limits of old OGRE) can have warnings.

    Also road system, checkpoints and car start warnings are here.

    Settings

    Editor has also a tab with settings, where you can adjust e.g. minimap, camera speed and intertia, road points size, startup options, etc. Also jumping camera to track start, or predefined views.

    It also features a basic but functional material tweaker, on Settings – Tweak tab. When picked material in combobox, it will show editboxes and slider and allow adjusting its parameters in real-time. Very useful for creating new materials, fluids and tweaking colors.

  • 2006 Terrain, Water, forks 🌅

    2006 Terrain, Water, forks 🌅

    ⏱️Overview

    This is a collection of programs written in C++ and using Direct3D9. Only the first one left (with green terrain) was mostly mine. It was also a project on college, for subject: 3D Graphics (I think). I did way above requirements as nobody even knew shaders.

    📜History

    The first small terrain had a shader for blending (mixing) terrain textures together smoothly. Already found somewhere on internet. This I knew is needed for good looking terrain for start.

    After achieving just a small terrain and a cloth looking, pseudo water I started searching on internet for open source examples (it was likely the first time for me). I managed to build all of them and customize the demo applications. I didn’t put anything together as a game yet (I was missing physics).

    The water in middle was great but very demanding for CPU, which was computing the animated noise and its normals. This is done nowadays on GPU only. Still, it had the best look IMO for years.

    White terrain with water on left, had a great animated noise but was always flat. Originally it also featured reflection and refraction. This always flat water, was still good and we had a similar one in our game years later.

    On right there is a terrain with level of detail (LOD) Geomorphing (also described here) if I remember it was CPU generated though, but had 5 levels. That was a great and complicated implementation. Terrain nowadays can also be done completely on GPU and faster.

    The car screenshot was someone’s 3D model, with a 2D driving code I found. I made it 3D, but only on flat ground.

    ➡️Conclusions

    Then I started thinking and realized, I don’t want to write all 3D equations, surely not a physics system. This is when I got interested in available physics engines.
    Today I would definitely recommend bullet for collision detection and simulation.

    Next, I had the same thought for rendering. Writing everything using calls to Direct3D was tedious and not very practical.
    By using a 3D engine, all becomes much easier and one can achieve much more with it. But I knew a guy at college, who liked the first approach, read books for it, and wrote his own engine.
    Later I found OGRE 3D and started learning it.

    📷Gallery

  • 2006 Shader effects 💫

    2006 Shader effects 💫

    ⏱️Overview

    This is a result of me learning bump shaders with also implemented reflection and refraction (just from cube skybox).
    There wasn’t really a goal here, just to learn and show what could be achieved with my GPU (ATI Radeon 9800 I think) at the time.

    🔍Implementation

    My code was using WinAPI for window creation and messages. Then Direct3D9 calls for rendering and HLSL 2.0 for vertex and pixel shaders. Also D3DX for anything else like 3D matrix and vector operations, compiling shaders, and loading 3D models (meshes) from X files. Lastly a sprite font, for screen texts (with parameters to adjust by keys) using my bitmap fonts.

    To get mouse and keyboard events I was using DirectInput. I made a camera system to move around the scene, rotate and zoom. There was also 1 point light here.
    I wrote a Timer (based on precise QueryPerformanceCounter) for checking intervals and computing current frame rate (Fps).

    I think I made most of the basic models. I would use Blender for this now. The skull model and all textures were gathered from other demos and games.

    ⏳Conclusions

    Professional made textures made the demos look quite good, already with simple 3D objects.
    But those were just demos. In a bad looking, low level written code.

    I continued using just C++ and Direct3D9 for a while in next project’s forks with terrain and water. And after that moved to using OGRE 3D engine.
    All that was too tied to DirectX and would need major rewrites every time I wanted to use new DirectX interface. Another good reason for using an engine, it can have different rendering systems also OpenGL based.

    Still, this experience was good learning for future, as I was developing shaders in Stunt Rally too, years later.

    📷Gallery