gamedev/bytemon
ByteMon (JBGame): Development Blog
▶ Play it in your browser
Catch and battle creatures made of old computer hardware, from BitChu the calculator to Windows OS to the one and only sudo, on a generated island shared with everyone online. It runs on JBend, the Java backend I wrote from scratch.
Play ByteMonPlay as a guest, or register to keep what you catch. The development blog is below.
This is the update log for ByteMon, which began as JBGame, my second multiplayer game and the reason I wrote JBend. After the first Java game stalled at its login screen, I decided the game needed a real backend underneath it first, so most of these updates are about the backend. The early entries were written on my old site, kanetempleton.space; I've copied them here as they were, to-do lists included.
2026: the game is finished enough to play and hosted on this site. Play it here, or read Update 4 below for what changed. Update 5 gave it something to do, and a name: ByteMon.
Update 0: JBend
This update pack establishes the backend environment for running the game servers, website, and engine. Since these updates deal with the entire backend, there will likely be items on the to-do list for a while.
To-Do
General
- change password support
- email sending
- login session expiration
- logout support
- add more failsafes for HTTP server
- secure password management
- encrypted server communication
- secure session cookie management
- login page reflects your current login status
Connections
- connection logs
- enforced communication protocol
- more POST security
- stress tests for web server
- stress tests for database querying
Security
- encryption
- prevent cross-site request forgery
- more POST security
Done
- add callback support for server database queries
- ... lots more ...
Update 1: Live Website and Servers
The primary goal of this update pack is to host all backend components on my VPS and host a live website.
To-do
- recruit someone for css
- add css
Done
- redirect main .space index page to game web server (5-19)
- create development blog pages for game (5-19)
- status message improvements on registration page (5-19)
- test login and registration functionality from VPS (5-19)
- add favicon.ico to web pages folder to avoid 404 errors (5-19)
- test VPS connections to web server, websocket server, and TCP server (5-19)
- change server database manager to connect to VPS database instead of localhost (5-19)
- set up VPS MySQL database + user for the website and game (5-19)
- install java + jdk on VPS machine (5-19)
- upload JBend to VPS (5-19)
- transfer VPS space primary domain name to kanetempleton.space (5-12)
- register new domain name kanetempleton.space (5-12)
- purchase VPS space for kanetempleton.com (5-12)
Update 2: System Foundations
This update consists mostly of technical improvements to strengthen the core backend that the game engine runs on. (5-29-2019)
Web
- users who are banned during their login session will be logged out the next time they make a web request
- support for reading cookies from front-end web pages
- changed game page to only allow websocket connections for users who are logged in
- changed login page to reflect your current login status; displays your username and "log out" button
Admin
- created admin ban and unban commands; targets a specific username or IP address
- added "kick all" support to kick command
- created ping command to issue a ping to all TCP and WebSocket connections
- added more details to the connection display command
- added admin web portal for executing certain server console commands
- created admin kick command
Security
- passwords are now salted before being stored in database so that they are never visible in plaintext
- support to store/retrieve IV and other message data from CBC crypto methods
- touched up RSA encryption methods
- passwords are now encrypted before being transmitted when registering or logging in
- added RSA encryption to server
- tried adding ElGamal encryption to server; gave up
- added symmetric CBC encryption methods to server
- performed more DoS stress tests after implementing connection control mechanisms; web queries slowed down but no servers crashed
- performed stress tests for DoS attacks from single IP; TCP and WebSocket crashed immediately, HTTP was fine
Connection Management
- saving/loading/checking of banned IPs and usernames; banned IPs are unable to make connections
- increased the max connections per second threshold of HTTP server to avoid denying web requests from legitimate users
- connection manager keeps track of number of connection attempts an IP has made; if this number exceeds a threshold within a short amount of time, the IP will be temporarily banned from making connections
- added connection manager to servers which keeps track of data for specific IPs
- added a thread to occasionally check the "health" of the database connections; sends queries every 30 mins, then resets the database connection if the query does not successfully complete
- fixed a bug where a server reaching the maximum amount of connections would crash when attempting to register another connection
- created ping pong system for server to kick inactive connections; server requests a specific response from clients, if connection sends wrong response or doesn't reply in time, it is disconnected from the server
- changed server behavior for registering connections so that connections on the HTTP server are only registered when they are sending a packet of data containing an HTTP request; this fixed another issue with extra connections getting stuck in the server
- fixed an issue in the HTTP server which did not always drop connections after sending an HTTP response, causing connections to sometimes get stuck in the server
- added server support to kick a specific connection ID
- touched up connection registration code which always registered incoming connections as websocket connections awaiting a handshake
Login System
- added some bruteforce password protection: five incorrect password attempts for any username will temporarily prevent login attempts for that name
- prevent registration of multiple users with the same email address
- added email requirements: must contain @ sign, minimum/maximum character requirements
- added username requirements: minimum of 1 character, max of 14 characters, only letters and numbers
- added password requirements: minimum of 6 characters, max of 20 characters, only printable chars, and no @ sign
- deleted all user accounts so that the password encryption scheme can be properly used moving forward
Engine Improvements
- console thread and database manager thread start before any server threads; prevents some nullpointer bugs
- added launcher support for starting threads in a specific order
- toggle option for displaying text of outgoing network messages
- store console output to text file logs
Update 3: Game World
The goal of this update is to create a primitive game engine.
To-do
- player login session
- player account creation
- map data
- player input listeners
- sprite rendering for webclient
- identical downloadable client
Done
- basic interface to load/update player coordinates via websocket connection
Update 4: Finished and Hosted (2026)
Update 3 ended with a to-do list that was most of a game. This update ports JBGame to JBend 2.0 and finishes enough of it to be worth playing, then puts it on this site. The art is the original; the rest of the client was rewritten.
Done
- port to JBend 2.0: the whole server, its WebSocket endpoint and its game loop are described in one config file [11-28-2026]
- players see each other: other players' positions are sent to everyone within nine tiles, as they move [11-28-2026]
- map data: the world is a 250x350 tile island, generated from the tile coordinates when the database has no hand-made section, so the same place always looks the same [11-28-2026]
- the map streams to the client in 50x50 sections as you walk toward them [11-28-2026]
- movement checks the terrain: no walking on water [11-28-2026]
- chat, with a rate limit and a length limit [11-28-2026]
- guest play, so you can try it without an account [11-28-2026]
- player login session and player account creation, using JBend's accounts: a browser already logged in on the site joins without typing a password [11-28-2026]
- player positions are saved to the database and restored at the next login [11-28-2026]
- player input listeners: arrow keys and WASD, or click (or tap) a tile and the server finds a path there around the water [11-28-2026]
- phones: tap to walk, tap to type, and a layout where the map fills the screen with the info panel floating over it [11-28-2026]
- sprite rendering for the web client, with smooth movement between tiles [11-28-2026]
- one lock around the game world, so the network, database and game threads never trip over each other [11-28-2026]
Still To-Do
- identical downloadable client
- NPCs - spawns, dialogue, movement
- Items - inventory, ground items
- Equipment
- Combat
Update 5: ByteMon (2026)
The world needed something in it. Now it's ByteMon: creatures made of old computer hardware that you catch and battle. I've never played Pokémon, so this is that idea from the outside, with a calculator. Two items come off the old to-do list on the way: NPCs and combat.
Done
- BitChu, the calculator everyone starts with [11-29-2026]
- ADD: +1 health. SUBTRACT: -1 enemy health.
- MULTIPLY: twice as many BitChus, up to 8 (8 bits make a byte). They share one health bar, and every ADD and SUBTRACT after that counts for each of them.
- DIVIDE: cuts both healths in half. Once a battle.
- it can never be lost, so nobody can run out of ByteMon
- Floppit, the floppy disk, found in the wild [11-29-2026]
- WRITE: -5 enemy health. CORRUPT: the enemy's next move does nothing.
- SAVE remembers its health, LOAD goes back to it
- The numbers were picked by a solver, not by feel. I wrote a program that plays every possible battle perfectly from both sides. With my first guess (WRITE at 2) BitChu won every time, even moving second. At 16 health each and WRITE at 5, whoever moves first wins, either way round. [11-29-2026]
- 66 wild Floppits wander the island, six of them near where new players appear. Walk into one to battle it; caught and deleted ones are replaced. [11-29-2026]
- Turn-based battles, run on the server: pick which of your ByteMon fights, then take turns [11-29-2026]
- CATCH: a wild ByteMon at a quarter of its health or less can be caught. It knows it, stops fighting, and begs for mercy, a little more desperately each turn. Take it to 0 anyway and it's deleted, there is nothing to catch, and everyone online is told what you did. [11-29-2026]
- A wild Floppit that saved while it was healthy will LOAD its way out of trouble instead of begging [11-29-2026]
- Lose to a wild ByteMon and the one you picked is deleted. RUN gets you out half the time. [11-29-2026]
- Wild ByteMon fight badly on purpose: multiplying first and then subtracting catches one about three times in four; only ever subtracting, about one in ten [11-29-2026]
- Player against player: click a player within three tiles to challenge them. They accept or decline, you each pick a ByteMon, a coin decides who moves first, and the winner takes the loser's ByteMon. Logging out mid-battle is a loss. [11-29-2026]
- What you own is saved to the database, and moves between accounts when it's won [11-29-2026]
- The art: 16x16 sprites and a battle screen in the style of an early-80s arcade cabinet. Black screen, phosphor green, scanlines. A corrupted ByteMon glitches, a deleted one falls apart into pixels. [11-29-2026]
- A collection screen showing what you own and what each kind can do [11-29-2026]
- All of it works on phones [11-29-2026]
- The game is called ByteMon now [11-29-2026]
- BitChu's DIVIDE can be used as often as you like, and a fifth move, CLEAR, takes it back to one BitChu. The solver says the balance didn't change: whoever moves first still wins with perfect play. [11-29-2026]
- Ten more kinds of ByteMon: Windows OS, Cursory, Qwerty, USBee, WiFido, Printergeist, Trojan Horse, Blockchain, Recursaur, and sudo, the one-of-a-kind legendary. With twelve kinds a perfect-play solver is out of reach, so the balance comes from a simulator that has every pair fight and tries to catch each wild kind, and the wild ones now pick moves by playing the battle out in their heads. [11-29-2026]
Still To-Do
- trading ByteMon
- identical downloadable client
- Items - inventory, ground items