Skip to content

Latest commit

 

History

History
71 lines (52 loc) · 1.5 KB

README.md

File metadata and controls

71 lines (52 loc) · 1.5 KB

rplace

reddit.com/r/place inspired system to refresh some boost::asio knowledge.

build

tech stack

c++20, cmake, boost::asio, UDP, json, conan, async python3, gtest

MVP goals

  • single server, multiple clients
  • no map persistance on server
  • no user identification
  • API allows:
    • set pixel color
    • get pixel color
    • get complete map
  • client able to render the map
  • 8 RGB colors
  • built easily with dependencies
  • tested on component level
  • CI configuration
  • hardcoded 16x16 size

further features

  • user auth
  • time limited edit slots
  • pixel map as client input to draw automatically
  • multiple maps support
  • variable map size

development

how to build

virtualenv .venv
source .venv/bin/activate
pip install conan~=2.0
conan profile detect
conan install . --output-folder build # --build missing
cmake . -GNinja -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -B build
cmake --build build

how to run tests

cd testing
virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt
pytest -v

how to lint and format the code

pre-commit run --all
pre-commit install

troubleshooting

vscode integration

Set Cmake: Use CMake Presets to always to force preset usage and make the conan-provided deps available.