Kayıtlar

Voidblade - a N64 postmortem

After more than 25 years of the release of the console, there is still a great Nintendo 64 homebrew community called N64brew (discord server here ). Last year they organized the second game jam targeting the system, N64Brew Jam 2021 (source codes available here ). Being hooked to the development for the system for more than 3 years now, I decided to give it a go this time. In this post I am sharing my experience with the system, my thought process for game design and my regrets. The Theme A few days before the theme announcement I was already getting hyped about the jam and started thinking about a few conceptual ideas. I could incorporate 2d vector-style graphics with some transparency effects to simulate 2d lighting. Like a lightsource casting light in every direction, which is occluded by other polygons. Maybe I could even add some 2d physics. I was dreaming of something more like a cinematic platformer with potential puzzle elements. I even started working on some polygon renderi

Change desktop resolution with node.js FFI

I use my desktop workstation as a home-server of sorts. It is great to game in the comfort of your living room, on the TV, with your favorite game pad if you have an Apple TV (or any other compatible device). This is possible using a variety of software; Steam Link , Rainway or if you have an NVIDIA GPU using the open source streaming alternative Moonlight . There is a problem though: I have an ultra-wide monitor which does not play well with some game/streaming app combinations. It forces you to switch the game between fullscreen and windowed modes when you are on the actual terminal vs remote.

The problem with async generators

Let’s imagine that we want to manage cancellation of an async operation using generator functions in javascript. When a secondary event occurs, we can listen for it and force the generator function to return by calling its return method and handle cleanup in the finally block, which will always run before a generator returns. Say we have the following imaginary async generator, which will wait for a second and yield; var generator = async function*() { try { yield await new Promise((r) => { setTimeout(r, 1000) }).then(() => 'Waited for 1 sec.') // More yields... } finally { // Do cleanup here. e.g. abort an XHR or invoke a // cancellation on some ongoing operation console.log('Did cleanup.') }} Then we want to run such a generator to completion in a loop. One way to do this is using an asynchronous for await…of loop. Let’s say we call return before the async operation in the generator is complete. va

Free SSL for shared hosting

Are you still paying for your SSL certificates? There is a free and open certificate authority called Let’s Encrypt for some time now and its main usage is through its certbot. This means that it can be fully automated! The bot prepares everything for you implementing the ACME protocol and works by placing a file with hash information on a specific location accessible through your domain, which proves that you have access to that domain (called challenges). The problem with certbot is that, it requires shell access, which is not available on most (if not all) shared hosting plans.

Cheap, DIY NAS

Resim
For a long time, I had a dream. A network attached storage (NAS) solution to keep my backups on. I’m a little mad when it comes to backing up. Do not feel all right without at least 3 copies of the same thing on different places. When I was working on a 3d game engine project many years ago (was using DirectX8 using visual basic to be specific), I have lost 4 months of work to an MS DOS 6.22 installation disk that I carelessly used to recover my Windows 98 installation. It didn’t play well with my HDD that is larger than 2GB.

Reverse Engineering a FlySky TX

Resim
I was once into hobby RC airplane stuff – unfortunately don’t have the time to fly these days. (Check my first flight here ) Got myself a cheap 6 channel FM transmitter on eBay back in the day, not that 2.4 GHz rubbish, one with a huge antenna, you know. It was a much cheaper option then. Not of very high quality, but capable of doing many cool stuff and it is highly configurable. It is possible to change throttle curves, do mixing etc. Configuration process involves connecting it via an “apparently” serial connector to its USB dongle (which is then a serial to USB converter) and a computer. Install an old school t6config program (still not an idea where I get it) on a Windows PC and you’re good to go. The serial connection is also used for controlling RC simulations although with a lot of effort. You need to intercept serial stick commands with a software tool (I remember using ppjoy) and map them to real joystick inputs, which the TX is not very helpful as it sends unusual value rang

Quick and dirty animaton with async/await

Animation is a pain if you do not know how it is implemented. Basically, you are updating a value with respect to time. This is generally done by calculating the time elapsed since the last frame and interpolating this value between its initial and final values. The interpolation needn’t be linear, there are many such interpolating functions with for example some easing. Even there are methods that will consider previous and later values such as Catmull-Rom splines. In this article, I’ll not go into the details but just introduce a simple ‘hack’ if you will. This approach is influenced mainly from Unity coroutines with the yield keyword. Similarly,with the help of new ECMAscript features, namely async functions and await, we can define an animate function as such; const startValue = 0; // start valueconst endValue = 100; // end valueconst totalTime = 1000; // Aniation time in millisecondslet value = startValue;async function animate() { const lastTime = performance.now(); while