Networked multiplayer implementation of the card game Big 2. The game is written in the Muon programming language, using SDL and OpenGL.
The game rules can be found on Wikipedia.
Platforms: only Windows is supported at the moment; Linux version is planned. If you'd like to help out porting this to Linux/macOS, let me know!
- Install the latest version of the Muon compiler.
- Download SDL2.
- Clone the big2 repo. Note:
../muon/lib/is used to refer to the Muon standard libraries (part of the Muon compiler), which should be taken into account when choosing a local path. Alternatively, just editbig2.argsbefore building. - Copy
SDL2.dll(from your SDL2 directory, underlib/x64) to the root of the big2 repo. - Compile, e.g.:
mu --args big2.args && cl /I"SDL2_path/include" /Zi big2.c /link kernel32.lib user32.lib gdi32.libSDL2_path/lib/x64/SDL2.lib opengl32.lib dbghelp.lib ws2_32.lib Advapi32.lib(use any 64-bit C compiler; replace 'SDL2_path' placeholders with your SDL2 path) - Run the game!
big2(See command line arguments below)
-name [yourname]-join [address](join game; address must be IPv4 address, port number is optional: e.g.127.0.0.1,127.0.0.1:1234, etc.)-host-port [port](optional, host only; default port is 27191; protocol is TCP/IP, make sure any firewalls are configured to allow traffic)-rounds [number](optional, host only; default is 8)-ai [number](optional, host only; add N AI players)-hostonly(optional, host only; don't join game)-log(optional, host only; write game log to disk)
For example:
- Host game:
big2 -name Nick -host - Join game:
big2 -name Saul -join 127.0.0.1
Enter: Play selected cards/: PassF1: Show FPSF11: Full screen
stb_image.h: https://github.com/nothings/stb
Card sprites are based on https://code.google.com/archive/p/vector-playing-cards/
Marko One font: https://fonts.google.com/specimen/Marko+One (view license)
Card place sounds: https://www.kenney.nl/assets/casino-audio (modified)
Charm/Charm2 sound: https://freesound.org/people/Scrampunk/sounds/344696/ (modified) (view license)
Charm2 sound: https://freesound.org/people/Alivvie/sounds/323438/ (modified)
Win sound: https://freesound.org/people/humanoide9000/sounds/466133/ (modified) (view license)
Graphics & audio tools: BMFont, Paint.NET, Audacity
All Muon code in this repo (.mu files) licensed under MIT license.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.