A simple chat client written in C++ and compiled to WebAssembly via Emscripten. It uses the ENet library for networking and the UI made with SDL2, OpenGL and ImGui.

This was created as a experimental project to practice deploying such applications online and setting up a server backend for it.

The theme was inspired by my first client/server I wrote in C++ which used TCP sockets. It ran in the console and used text for everything. Hence the ASCII based art.


This is not meant for actual use, all it does is send text to the server and the server broadcasts the text to all connected clients. Server uses a very low tick rate. No usernames or list of connected people etc basic stuff you would expect from a chat application. All it's meant to do is demonstrate that it's possible for ENet compiled to WASM to connect to a remote server via WebSocket and send / receive data. The server is also compiled to WASM  and runs on Node.js. The C++ client/sever compiled as a win32 executables will use UDP to send/receive data. Both versions use the same C++ source.

Leave a comment

Log in with itch.io to leave a comment.