My devlog from hell type sht
Soooooo my JEE exam is in 144 days, and me with infinite wisdom decide to implement a new backend for my YSFlight server, what happens next is very tragic 🥀
why i need a new backend?
Wellll i was checking out my homie skipper’s ysflight server and I see AI aircrafts- I think, thats cool as hell, I could add it to too, I had some experience working with YSFlight’s source code from cirnoYSF… and hence I sacrifice my JEE, my future for a… silly project and hence project Remelia (I swear I won’t name my next project after a touhou girl) was born.
Hours 1 - 2
I experiemnt with fsnetwork.cpp and the AI files to find out how I can implement various things… It all goes pretty well, I started from scratch instead of picking up cirnoYSF’s source, removed a few things and it was focused only for server, so it compiled faster… Also I switched from old termio that was being used to newer termios, that fixed the keyboard input issue on linux. So far all well… I even used a few unimplemented packets to connect them with my proxy server Sakuya AC- I belived it would be the best YSFlight server ever. I implemented a way for Sakuya AC to add AI aircrafts by itself, changed AI behaviour and added faster logins (little did I know… where this was going to end…). It all ran well on my bleeding edge arch linux machine.
Hours 2 - 4
Now I gotta implement shit with Sakuya AC, adding various commands to summon the AI aircrafts, first I do the normal standard things you do… you know… I implemented the new packet structure, most of which were hardcoded and shit, I also like to write pseudocode and just offload actual syntax to Gemini or Claude, I believe its the most efficient way to vibe code ngl. So everything is going well… until… You know how I test shit… I was connected to my production database and I accidentally ran a faulty for loop… and boom… my entire compute usage from neon.tech is gone. (BTW, if you are wondering why I am using neon.tech, thats cz its free, i hate payin’ for shit yk~ not that i like these fancy shovels they sell for basic functions), now I can’t connect to my DB…

I start looking for good
free postgre sql hosts. Reminds me of Elephant SQL and Railway… They used to provide really good free Database
hosting for free tier. Now I’m looking for a new host, and I find Avien… Its a good one- perhaps even better
for the purpose of a game server, since its always on- but has limited number of connections compared to neon- Only my
game server connects to the database anyways. So after all that BS I finally have my databse back… or do I? (insert
vsauce music) First, I need to migrate my old data, for some reason Avien doesnt let me migrate my data because of the
neon extension that was installed on neon’s server. So I decide to migrate database from my own backup -
screenshots… Turns out its very hard to type the password hashes from screenshot- So tragically had to use pg_dump
like a normie… now I need to change my databse connection URL for the scoreboard too, the scoreboard website is made
with react and typescript (i know… even i am disappointed in myself for choosing that tech stack), i put my new
database url and run the react app… the api returns 500. apparently the certificate from avien is self signed and
not verified. i legit do not know what the f*ck that means~ like seriously avien is a huge a55 provider, moreover
asyncpg, tableplus, pg_admin - none of them complained about shit. I just do not know what to do atp… I was lowk
tierd… I just really hope nobody runs a Man on the Middle attack on my server thehehehehehe~ (databse is not using
ssl 😔)
Hours 4-6
So now I am back at implenting the original game mode- my homie biry tells me I should make a game mode where there are Chinese invading Hawaii (i originally planned an Alien Invasion but whatever), I only wanted to use stock aircraft for the purpose - so I chose SU-27, I believe thats the closest to the Russian-licensed aircrafts they have built. I will be honest- the usernames are lowk racist. Anyways I notice one of the issue that the server crashes whenever a client is killed- this reminds me of the same issue with cirnoYSF on linux. I turn down level of optimization from O3 to O2; O2 to O1 - finally it works without any optimization- theres a lot of memory issue with soji’s code ngl - but its still insane how soji wrote entire ysflight- I think ysflight was made before git and mercurial… writting so huge code before source control is something so insane- I will never reach “epicness” of that- I had the same thought for Touhou, and other games from that era- I will never understand how people maintained codebases without version control- I use git for version control for something as small as a single shell script. Soji, ZUN, and many programmers of that era - made so epic shit without fancy dark mode ide, debuggers, version control- is truly insane dawg- i wish i could be that much epic programmer some day. Anyways back to fixing the first server crash- Yea so turning down the optimization worked well. Now I need to score AI kills, but theres a problem- there is no any packet being sent when the AI aircraft dies- its just flight state packets were coming one moment and not coming the other moment. I actually spent a lot of clever ways to track kills of Human to AI but it failed… I couldn’t achieve much without completely altering the exsisting structure of Sakuya AC- which I don’t want to.
Hours 6-8
Now time for deployment!!! I am so happy it runs on my local bleeding edge Arch Linux™️(BTW) dev machine- I really hope everything works fine on the stupid debian 9 shitbox thats hosted in drainage of Ohio and hasn’t been updated for 4 years and has a uptime of 5 years.
…
…
(i honestly do not know what i thought xd)
At first I just used sftp and copied the binary directly from dev machine to the server in ohio… didnt work…
a few glibc related error- i lowk expected that- Most sane people from here would use docker or something related
to containers- but me? NAH ITS BLOAT! I NEED THAT STORAGE SPACE FOR STORING 4312 ALICE MARGRATROID FAN ARTS!!! I try a
few tweaks- booting into my old Pop! OS laptop- since it ran older kenel- but the server was wayyy too oudated for
anything to work. And its 1 am now- So I gave on everything and let my shitbox from ohio compile the entire project
remelia- and I prayed to god the vps doesnt die (its a single core 0.5gb ram vps); jerked off and went to sleep.
Hours 8 - 10
I wake up, first thing I do is ssh into my vps- i see it compiled succesfully- thats so insane- I really expected it to have some missing dependency- even while I was sleeping thought it would fail due to missing opengl and pulseaudio deps but surprisngly that was there… I have no clue how that got into a server… Apparently it took the shitbox 3 hours to compile Remelia, compared to 5 minutes on my dev laptop. So finally everything works… (tragic)
It didn’t work… xd… old GLIBC starts misbehaving and simply doesnt work. It behaves really weirdly, one of the most weirdest thing was that it exited gracefully with exit code 0 when a client tried to login (???). I just couldnt tell when, where or why Remelia was crashing on the server, I spent time debugging before I give up.
Hours 10-12
I have mentioned how sloppy the memory managment of YSFlight is- but that’s only limited to linux, on windows however- things are wayyy better- So thats my next plan- I upload the entire source code of Remelia to github- so that I could use Github Actions to compile the windows binary. I have tried mingw on windows before- it simply doesnt work well with YSFlight. MSVC is the only good way to compile shit for windows. 11 mins later, the binary is done and compiled. I download it- but sadly newer MSVC uses some UCRT shit- which is like basic cpp stored as a different file loaded from Windows system file. My VPS aldready had wine on it- Wine 5 that is- I try running the new binary and it fails due to missing visual cpp runtime stuff (i have no clue what those things are, i have used linux for dev work most of my life). Apparently I’m supposed to install them myself. and so i use winetricks to install… sadly it fails… Now i need to install wine 10… on a debian 9 machine… that has never been updated since 2021…
(…)
Hours 12-14
So finally install is done~ yay! now everything should be done? NAH

At first it demands graphical interface to run Remelia… which is a console application, its weird- But I just use
xvfb- but sadly the best internet provider in india. ever. Jio Fiber combined with the shitty weather of Odisha- a
single drop of rain and my entire internet is gone- I am now working with cellular data (thats how badly I wanted
to complete the project), Now xvfb simply WONT START. No logs, nothing… Im just doomed. I try do a killall xvfb.
No process found…
(…)
After like 45 mins of searching its supposed Xvfb and xvfb, the casing was different, the old xvfb server was
running from unterminated session (from my broken jio fiber connection) which is why the new one was failing… im so
stupid- ong
Now the graphical part is done- it still doesn’t run… the vcruntime was installed improperly- I am just fed up atp- and now I want it to over- I try a few desparate things- I start with a new 32bit wineprefix and compile remelia for 32 bit- I make a wineprefix on my arch linux machine and copy it to server- None of them worked- They all failed at the “Instant Login” feature that Remelia boasted- I could clearly see it ran completely fine on my dev machine. I just didn’t know what to do-
I ask Gemini for help, it tells me to use strace logging and musl - yeah im not porting shit to musl, but I did check out strace- strace spat out some weird shit- that neither me and Gemini could figure out- I tried reaidng the log- I knew it was a combination of aldready sloppy memory management and also the old kernel- but I really couldnt tell what exactly was wrong (I still can’t, its just that I fixed the issue). I was done with Remelia. I really didn’t want to do the musl part- like come on.
At this moment- I regretted. everything. Maybe I should use vercel and aws like every sane person instead of buying servers in romania and lithunia for 20 ruppe a year. Maybe I should use proper code coverage and testing, maybe I should buy those fancy shovels those sillicon valley companies sell me- maybe richard stallman doesn’t like the shit i do. maybe its a warning from god, maybe the touhou girls didn’t like me naming all my side projects after them. maybe its the entropy of universe. maybe nothing matters anymore. I just go take a shower.
Hour 15
During shower, I have feeling its 100% the old kernel fumbling with the high speed of TCP packets- and I come back and slow down the packet sent rate- I pray to god and push the commit to Github Actions- and it works- finally. well… yeah… it worked… finally… there was some weird shit linux 4- which caused oom condition to kill Remelia even tho it wasn’t out of memory when packets were transffered at high speed.
I BELIEVE I AM THE MOST GOATED PROGRAMMER THAT EVER LIVED FR FR, I WILL KEEP USING LIGHT MODE IDE AND RANDOM VPS IN EAST EUROPE TO HOST MY SHIT. I SHALL KEEP USING SCREENSHOTS AS DATABASE BACKUPS!!!!
Well yea its done.
TLDR : i’m f*cking based, docker and all are for normies and shit- debug like a real man