All Projects → fiorix → cat-o-licious

fiorix / cat-o-licious

Licence: other
Cat game written in Go

Programming Languages

go
31211 projects - #10 most used programming language
javascript
184084 projects - #8 most used programming language
shell
77523 projects
HTML
75241 projects
Makefile
30231 projects

Projects that are alternatives of or similar to cat-o-licious

Doomfire
DOOM fire implementation written in rust
Stars: ✭ 80 (-20%)
Mutual labels:  sdl2, webassembly
RoguelikeTutorial2020
r/RoguelikeDev Does The Complete Roguelike Tutorial
Stars: ✭ 25 (-75%)
Mutual labels:  sdl2
pac-man-emulator
🕹 An emulator for the Pac-Man arcade machine (Zilog Z80 CPU) for Win/Mac/*nix and Xbox One.
Stars: ✭ 20 (-80%)
Mutual labels:  sdl2
wasmsign2
PoC implementation of the WebAssembly Modules Signatures proposal.
Stars: ✭ 18 (-82%)
Mutual labels:  webassembly
rust-webassembly-serverless
An AWS lambda function written in Rust using WebAssembly
Stars: ✭ 29 (-71%)
Mutual labels:  webassembly
GameKit
C++ tools for gamedev based on SDL2 and OpenGL
Stars: ✭ 15 (-85%)
Mutual labels:  sdl2
zero-graphics
Application framework based on OpenGL ES 2.0. Runs on desktop machines, Android phones and the web
Stars: ✭ 72 (-28%)
Mutual labels:  sdl2
TypeScriptXX
🧷 Stay safe! Type-safe scripting for C++ using TypeScriptToLua and CMake with auto-generated declarations.
Stars: ✭ 33 (-67%)
Mutual labels:  webassembly
DominicanWhoCodes
DominicanWho.Codes App
Stars: ✭ 58 (-42%)
Mutual labels:  webassembly
jasper
🧳 Single-binary packaging for Ruby applications that supports native and Wasm targets
Stars: ✭ 29 (-71%)
Mutual labels:  webassembly
wasm-linker-js
A simple WebAssembly Linker in JavaScript
Stars: ✭ 14 (-86%)
Mutual labels:  webassembly
vrcpu
Code, documentation, schematics, notes for my Ben Eater inspired breadboard computer and emulator
Stars: ✭ 98 (-2%)
Mutual labels:  webassembly
gameboyGO
Gameboy emulator in go
Stars: ✭ 24 (-76%)
Mutual labels:  sdl2
ugo-compiler-book
📚 µGo语言实现(从头开发一个迷你Go语言编译器)[Go版本+Rust版本]
Stars: ✭ 996 (+896%)
Mutual labels:  webassembly
imgalign
Webapplication for image stitching and aligning
Stars: ✭ 162 (+62%)
Mutual labels:  webassembly
waterCloset
Ridiculous 2D SDL platform game
Stars: ✭ 30 (-70%)
Mutual labels:  sdl2
wasm-ops
Chart of WebAssembly Instructions
Stars: ✭ 46 (-54%)
Mutual labels:  webassembly
fullstack-rust
Reference implementation of a full-stack Rust application
Stars: ✭ 39 (-61%)
Mutual labels:  webassembly
gearoenix
Cross-platform C++ 3D game engine.
Stars: ✭ 33 (-67%)
Mutual labels:  webassembly
vmrp
mrp emulator, virtual machine, mrp模拟器
Stars: ✭ 126 (+26%)
Mutual labels:  webassembly

cat-o-licious

This is a simple cat game written in Go, inspired by flappy. My kids were too excited to see flappy's source code and wanted to design and code their own game, so that's what we did together on a rainy Sunday.

The original version uses SDL (like flappy) and works on MacOS, Linux and Windows.

In the wasm directory there's an experimental version in WebAssembly. Most of the code is copied from the SDL version, except for the media handling parts and lack of audio. This allow kids to play the game in a web browser.

Try playing in browser now!

cat-o-licious

Install

If you're not here for the code, and just want to play, you can download binary releases from https://github.com/fiorix/cat-o-licious/releases/.

Keys

Arrows left and right, as well as A and D for lateral movement. F for full screen, and Q to quit.

Playing

You're the cat, and food falls from the top of the screen. The more good stuff you lick the more points you make. The more points you make the more food drops, and it gets really hard to get out of the way of the broccoli, tomatos and pineapples.

My kids love veggies btw, but they say that cats don't.

Building from source

Tested on MacOS, Linux, and Windows. Requires cgo.

Install go-sdl2 bindings:

go get -v -d github.com/veandco/go-sdl2/{sdl,img,mix,ttf}

More information on go-sdl2. go-sdl2 ships with static SDL2 in .go-sdl2-libs/ so you don't have to install SDL for your OS.

Get the code, build static binary:

go get -v -d github.com/fiorix/cat-o-licious
cd $GOPATH/src/github.com/fiorix/cat-o-licious
go build -v -tags static

The assets directory must be relative to the path of the binary. Assets include fonts, images, and sounds used by the game. The font was copied from flappy, images randomly downloaded from the Internet, and the game soundtrack is my daughter's composition in Garage Band. Go figure.

Run:

./cat-o-licious

There's a minimal set of command line flags for things like screen resolution, player speed, and FPS.

WebAssembly

This version has no external dependencies, but requires a web server.

cd wasm
make

Then use a web server to serve the wasm directory and point your browser there.

For local test/dev you can use server.go in the wasm directory.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].