namelessWrench

The Only Rotten Dollhart Webring

A hideous fruit, disgracing itself.

Allo-Aro



vaporware
@vaporware

I released a new game! it's a online 2 player rts game that you can play in 30 seconds (ok actually like 44 seconds, but 30 seconds sounds cool lol).

go play it plz https://vaporwario.itch.io/30-seconds-of-letters-fighting

long dev blog about how this thing took me more than 10 years to learn how to make:
vvv


this has been a long time coming

Ok so I was in highschool and I already knew how to program in C. I just learned about network socket programming and was like I can do this! Let's make a networked game! I made something super simple that worked great on the local router. I typed the IP address of my moms computer right next to me and BOOM squares moving on both screens!

I excitedly called up one of my best friends and I asked for their ip address... It didn't work. I looked it up. Ok i guess i needed their external IP... Found some website that told me my external IP and entered that. Fuck that didn't work either...

enter the NAT

I spent the next few days learning how routers work and how what I wanted was impossible. There aren't enough IPv4s in the world so everybody got a router to make multiple computers use one IPv4. The router only knows where to send packets if a computer inside the network first sends a packet out to some server not behind a router. For example an HTTP request to a website. So typing in my friends IP was never going work.

How you get around this is by doing whats called UDP hole punch through, where both computers hit each others external ips and ports (port numbers aren't the same behind the router either). Then the router thinks you made the request out first and it lets the traffic through. Also all routers work differently so there's definitely some situations where this doesn't work at all. Ok so the problem is then: "How do you know your external IP and port"? you don't. You need some computer outside of your local network to tell you.

As a highschooler, I hit a brick wall. I didn't have a server, I didn't know how to rent a server, I didn't have any money to rent a server, and I didn't have any idea how much it could cost to rent server. I didn't even know what a VPS was.

i was stumped and sad and stopped.

years later

In college I somehow discovered cheap ass VPSes. I could pay $10 a year for a server with only 500mb of RAM and a static IP address!!! I'm still ecstatic about these deals to this day lol. I don't care how much RAM it has, i just need it to compile C and respond to UDP requests.

I wrote some super simple networking code to do UDP hole punch through and it worked! I used ncurses and had a lil ascii game where 2 letters moved around and you could shoot each other.

This honestly my proudest moment for a long time. This what I'd tell interviewers during college lol.

The netcode of course was shit. I just send you my location and what to display and you just trust and accept it. At some point I learned about rollback netcode and GGPO. I ended implementing a form of rollback in javascript for a client-server web game (instead of peer to peer like before). It worked pretty well, except the server was in Sweden with 200 ping ($10 baby!!!) so everything was laggy as hell even with what I thought was pretty good netcode.

my dream game

Sometime during college I had a thought. I know to make some games now, so if I make my dream game and can make money, then I'll "never work a day in my life" and all my problems will disappear! I had the dreaded "dream game" idea.

I had just gotten obsessed with this thing called https://www.saltybet.com/ where fighting game characters from a bunch of different fighting games played by bots would fight each other and you could bet fake money on it. Fucking amazing concept, I'm very tempted to play it again.

That site used something called M.U.G.E.N. It's a 2d fighting game engine made in like 1999 that was free for non commercial use and had a character format that you can across M.U.G.EN. games. So people just started porting every character from every game into this format and also started making their own. Super freakin' cool, but definitely not a balanced fighting game lol.

So my idea was "Hey it seems like a fun thing to try and design fighting game characters, instead of doing that, let me make a game where the player can do that" (facepalm). Since M.U.G.E.N. online support was modded on and kinda bad as far as I could tell without trying it myself, I said ok I'll just make a fighting game engine that is:

  1. easier to use than M.U.G.E.N.
  2. supports more different types of characters than M.U.G.E.N.
  3. has a built in editor that's super easy to use, with user extensions supported
  4. has a online mode where you can easily share your own characters.

Absolutely deranged scope for a first commercial game project done by one person in their spare time. After like 5 years of on and off work on it and intense guilt from not working on it, I gave up. I thought of this as the solution to hating my job. it had to make $$$. It had siphoned off any creative energy into guilt about not spending more hours making this game. In the end I had made a simple fighting game engine and a hard to understand character editor. It's called Custom Punch Pals and I never ended up releasing anything publicly.

more netcode

As part of this terrible scope mistake I spent some time trying to get networking to work. I looked into UDP hole punch through and found there was a whole RFC called ICE/STUN/TURN or something which was a 100+ pages saying exactly how to do UDP hole punch through correctly. I wanted to make it right, but of course when I tried to read all that I gave up. Instead I found something called pjproject to do it for me. pjproject touts itself as a "Open Source SIP, Media, and NAT Traversal library".

Even though it was super annoying to integrate and compile i got it working and made a simple lock step networking framework. If you can make your game completely deterministic, just send your inputs over the network and then once you have every players inputs, you can simulate the next frame. To test it I made a tiny game with terminal graphics using ncurses again. This was all on linux + mac, cause that's what I was using at the time. I then proceeded to realize that pjproject is copyleft unless you pay money. And also I have no idea how to compile this beast for windows, along with being pretty scared of socket programming in windows. This was was another dead end.

Stratgame

But I had made this thing called "stratgame". I had made it while watching my friend play starcraft and I was like I can make a simple version of that, (even though I didn't understand starcraft at all lol). This was the first version of 30 Seconds of Letters Fighting made in 2018. All the elements are there, it just doesn't work on windows and only works in a terminal window.

Is this my white whale

Since 2018 I had figured out 3 very important things:

  1. I should just combine my early UDP hole punch code with my new lockstep networking stuff and be done with it. Doesn't matter if it implements a stupid RFC spec or not.
  2. Making windows games isn't too bad. (ty raylib)
  3. Making things for fun is way more fun and way easier than trying to make things that need to sell. (manifesto coming soon lol)

Fast forward to last month... I'm going through a rough time.

and so because my brain works this way, I start a new obsession. I've done it with juggling, morse code, Go, the Casio Loopy. This time it's networking code: the 5th try.

And I finally just did the freaking thing. Networking code in windows just means call WSAStartUp and use normal "berkeley" sockets for the most part. All the pieces came together so nicely. Since I also just learned about raylib, a C library for making games, it was super simple to port. Making an ASCII game is just the DrawText api on a grid, no more ncurses, no more terminal.

And honestly I've had the best time. I didn't give a single shit about making a good game, I was just making it because making things is fun. I did the fun parts that I like doing which happens to be writing low level netcode lol. FUCK indie prestige video game bullshit. Make bad games, make games that won't sell, make games that aren't finished, make games that will never release.

MAKE GAMES THAT SUCCEED NO MATTER WHAT!

When you take a walk outside, it is very hard to fail. You might injure yourself, you might get rained on, but like 99% of the time, you took a dang walk and moved your body a lil bit and saw outside your house. I want to do this with very hobby i have. This is the opposite of hustle culture, if you just enjoy doing the thing and have zero expectations, then when you do the thing you will enjoy it and it's very hard to feel shitty about it.

Anyhow that all fell to pieces when my indie game friends liked the game and thought it might be able to make money/be popular or whatever. And now I'm doing "marketing" to give it a fighting chance at getting a player base while constantly reloading the itch analytics page. But either way we here.

And the best part of it all is now I have a networking framework, so expect some silly trans co-op games in the future if i can manage it.

thanks for reading :)


You must log in to comment.