Skip to content
View AAAsHHH's full-sized avatar

Block or report AAAsHHH

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
AAAsHHH/README.md

QMars R2

A 2D pixel-art sandbox game built with C++ and raylib, compiled to WebAssembly with Emscripten.

~         ~~          __
       _T      .,,.    ~--~ ^^              
 ^^   // \                    ~
      ][O]    ^^      ,-~ ~
   /''-I_I         _II____
__/_  /   \ ______/ ''   /'\_,__
  | II--'''' \,--:--..,_/,.-{ },
; '/__\,.--';|   |[] .-.| O{ _ }
:' |  | []  -|   ''--:.;[,.'\,/
'  |[]|,.--'' '',   ''-,.    |
  ..    ..-''    ;       ''. '

Play now

About

QMars R2 is a small multiplayer-style sandbox game inspired by games like Core Keeper, Terraria, and Stardew Valley.
It demonstrates:

  • Real-time rendering with raylib
  • Custom 2D engine and tile/map system
  • Asset streaming and resource management
  • Web export via Emscripten (WASM)

Features

  • Pixel-art 2D rendering
  • Tile-based world with camera and culling
  • Simple inventory / item system
  • Save/load system (browser storage via IndexedDB)
  • Web, desktop, and potential mobile builds from the same codebase

Tech stack

  • Language: C++
  • Engine/Library: raylib
  • Web build: Emscripten (WebAssembly)
  • Tools: MSYS2 / MinGW, Notepad++, custom build scripts

How to run locally

Desktop (Windows)

  1. Install raylib and a C++ toolchain (e.g. w64devkit or MSYS2 + MinGW).

  2. Clone this repo:

    git clone https://github.com/YOUR_USERNAME/YOUR_REPO.git
    cd YOUR_REPO
  3. Build the desktop version:

    g++ -o game.exe main.cpp -IC:\raylib\raylib\src -LC:\raylib\raylib\src -lraylib -lopengl32 -lgdi32 -lwinmm
  4. Run game.exe.

Web (WASM)

You need Emscripten.

  1. Install emsdk and activate a toolchain.

  2. Build raylib for web (once):

    cd C:\raylib\raylib\src
    set EMSDK_PATH=C:\raylib\emsdk
    mingw32-make PLATFORM=PLATFORM_WEB clean
    mingw32-make PLATFORM=PLATFORM_WEB
  3. Build the game:

    emcc -o index.html main.cpp ^
      -I. -IC:\raylib\raylib\src -IC:\raylib\raylib\src\external ^
      -LC:\raylib\raylib\src C:\raylib\raylib\src\libraylib.a ^
      -sUSE_GLFW=3 -sASYNCIFY -sEXPORTED_RUNTIME_METHODS=ccall ^
      --shell-file C:\raylib\raylib\src\shell.html ^
      --preload-file "assets@assets"
  4. Serve locally:

    python -m http.server 8080

    Then open http://localhost:8080/.

Controls

  • Move: WASD / Arrow keys
  • Interact: E / Mouse
  • Inventory: 1–9 keys
  • Pause: P / Esc

(Adjust to your actual controls.)

Roadmap

  • Better mobile input support
  • Multiplayer over LAN
  • More biomes, items, and enemies
  • Editor tools for level design

Contributing

This is primarily a personal project, but suggestions, bug reports, and small PRs are welcome.

           `J ::.:.:.``;;;;;;;;;;;<;;;<<<<<<<<<<<<v<v<vvvvvvvx L
            L  :. :.:.:.:.``;;;;;;;;;;;;;;<;<<<<<<<<<<v<<v<vv<( T
            `> .    . .:.:.:.:.`:;``;;;;;;;;<;;;<;<<<<<<<<<<<v< >
             b ;           . : .:.:.:.`;;;;;;;;;;;<;;<;<<<<<<<<, I
             `,`               . : :.:.:.:.`.`;;;;;;;;;;;;<;<;<<. 5
              b ;                    . : .:.:.:.`;;;;;;;;;;;<;<;<: E
              `,<                         . . .:.:.:.``;;;;;;;;;;. I
               b :                             . . :.:.:.:.:.:.;;;. 5
               `>;                                  . .:..:.:.:.`.:  |
                b :                                      . . :.:.:.x T
                `,;                                          . . .::  E
                 b :                                               _  !4
                 `r :                                   __.__,--,;'))))).
                  b :                         ___...--'; `))))))))' '' `>!9eOc
                  `r :              __,--:-;;;)))))))))))'' '' ' ' _. -'-'.`!9Eg.
                   L : . __.--_--:,)))))))))))'' ' '  _. ._.-'-'-'-'\-'\---\/\ ``Qu.
                   `,: !x;:)))))))) ')'' ' _ _._-.'\'\_\_-'\''-\'_'\-'\'\ -_\'-\-. 95n.
                    D` ))))'''  _ .___.-_:/-/\/-_\ /-_, /-,\ \-/_\/\,-\_/-\/-/--' ..v<]9o.
                  __b :<> -_\._/\,- ,_ -\ _/\-\ _-\ -_/-\,\/,-/\_/-_\'\--' .vvvvvvv}v}}x}]NEo.
            .ooPO%LOCu  `< `/\_ -:\/_/-/,\/,/-,/_,-/\ :_\:_-:__-'' ...vvvvvvvvvvvvxx}vx}}}}==No
          .oPO'       `y. `< ~-\ _\/\_,- \ , - ,___..--' .......>>vvvvvvvvx<xvvxx}=x===}~^^   I
    om3jR&57'          `Ey, `\ `!,\ \-/_/\_---''.......vv>>vvvvvvvvvv)v<xvx=}=<~~^~`       :_yd

MIT License – see LICENSE.

Popular repositories Loading

  1. AAAsHHH AAAsHHH Public

    𝕬𝖇𝖆𝖓𝖉𝖔𝖓 𝖙𝖍𝖞 𝖘𝖆𝖈𝖗𝖊𝖉 𝖗𝖎𝖙𝖊𝖘, 𝖔𝖗 𝖕𝖗𝖔𝖈𝖊𝖘𝖘𝖎𝖔𝖓 𝖔𝖋 𝖉𝖊𝖆𝖙𝖍, 𝖙𝖍𝖆𝖙 𝖋𝖗𝖊𝖊𝖉𝖔𝖒'𝖘 𝖇𝖆𝖓𝖓𝖊𝖗 𝖒𝖆𝖞 𝖞𝖊𝖙 𝖜𝖆𝖛𝖊. 𝕬𝖑𝖆𝖘, 𝖜𝖊 𝖕𝖆𝖞 𝖍𝖔𝖒𝖆𝖌𝖊 𝖙𝖔 𝖆 𝖛𝖆𝖈𝖆𝖓𝖙 𝖘𝖊𝖆𝖙, 𝖊𝖓𝖙𝖍𝖗𝖔𝖓𝖊𝖉 𝖚𝖕𝖔𝖓 𝖆 𝖍𝖎𝖑𝖑 𝖔𝖋 𝖘𝖐𝖚𝖑𝖑𝖘, 𝖜𝖍𝖊𝖗𝖊 𝖙𝖍𝖊 𝖜𝖍𝖎𝖘𝖕𝖊𝖗𝖘 𝖔𝖋 𝖙𝖍𝖊 𝖋𝖆𝖑𝖑𝖊𝖓 𝖉𝖔 𝖊𝖈𝖍

    HTML

  2. TheOn TheOn Public

    On for U

    HTML

  3. ontest.github.io ontest.github.io Public

    HTML

  4. RadioI RadioI Public

    Your Own Radio

  5. FasterThanLEDs FasterThanLEDs Public

    C++