mrhands

Sexy game(s) maker

  • he/him

I do UI programming for AAA games and I have opinions about adult games


Discord
mrhands31

blep
@blep
This page's posts are visible only to users who are logged in.

mrhands
@mrhands

My entire game engine runs on them, lmao. The way I've set this up is that I have a C++ backend and an HTML/JS frontend. The C++ application sets up a web server on port 1443 that serves HTML, CSS, images, and other files. It then listens to AJAX commands from the client, which are simply GET requests for specific paths like /ajax/select_main_menu_item?button=new. Any time the server state changes, everything gets bundled into a JSON payload sent to the client via a WebSocket on port 1444. And this works surprisingly well! Because my games are always turn-based, the client only has to respond to payloads as they come in.

And now for the insane twist: The server and client are the same executable! The web client runs inside a Chromium Embedded Framework instance, so the calls are coming from inside the userspace!!


You must log in to comment.

in reply to @blep's post:

I use a single clojure.async go-loop to handle all messages (and buffers up to 1024 incoming messages which is far more than we need), it's seamless and easy. I can't imagine an easier way to do it.

stop inventing graphql and just make more requests. list of items? you just get 100 ids. now you can make 100 requests to get each item’s details. who cares. they’re tiny

This is a good plan iff you pipeline them (send all the requests without waiting) ❤️