Code Monkey home page Code Monkey logo

shark's Introduction

What

This is a PoC "desktop pet" ร  la shimeji using ebitengine that runs on Windows, Linux, and macOS. It currently has these animations:

  • Idle
  • Dragging
  • Right-click
  • Randomly Walk horizontally
  • After some time has passed (1 hour by default), a Hungry animation will be activated, during which dragging is disabled.
  • When Hungry, right-click to start Feeding animation and reset to the normal idle state.

Here's a demo video.

Fair warning: I'm a Go noob who mostly has no idea what he's doing. Read the source code at your own peril.

Download

Download latest version from GitHub Releases.

Newer builds straight from master branch are also available as artifacts on GitHub and sourcehut:

github status builds.sr.ht status

GitHub requires logging in to download artifacts, while Sourcehut doesn't have macOS builds. Such is life.

Usage

Windows & Linux

Simply unzip then run the shark-windows.exe or shark-linux executable.

macOS

Since I'm not participating in Apple's $99/yr protection racket, macOS users will need to jump through some hoops to run this program:

  • Double click on the downloaded zip file to get the Shark app bundle. (skip this step if you downloaded using Safari, which automatically unzips)
  • Drag the Shark app bundle into your Applications folder.
  • Right-click on Shark -> Open. You'll see a warning pop-up saying this application was created by an unverified developer (yours truly). Note: you must right-click instead of double-clicking, because double-clicking will open a different pop-up which hides the option to open the app.

  • Click "Open" anyway.
  • From now on you can launch the Shark application just like any other app, either from Spotlight or from the Applications folder.

There's also Apple's official guide here.

In the future I might pay the $99 if I end up writing more macOS apps and this becomes enough of a nuisance. Maybe.

Options

If run from a terminal, use the -h argument to see available options. Windows users can create a shortcut to save their desired options.

Here are the currently supported options:

  -hungry int
        The number of seconds it takes for Gura to go hungry (default 3600)
  -size int
        Size multiplier: make Gura as big as you want (default 1)
  -stop int
        Chance to stop walking, in % (default 40)
  -walk int
        Chance to start walking, in % (default 5)
  -x int
        X position on screen (default 9999)
  -y int
        Y position on screen (default 9999)

Compile from source

  • Clone this repo
  • Follow ebitengine's install guide
  • Run: go build -tags ebitensinglethread -o dist/
  • Your compiled binary should now be in ./dist/

Alternatively, if you already have Go, you can run go run go.imnhan.com/shark@latest to compile and run the latest version without manually cloning the repo. You still need to install ebiten's dependencies first though.

Apparently it should compile on FreeBSD too but I haven't tried that. Do let me know if it works on your FreeBSD desktop!

Artist

The sprites were graciously provided by Mee Way:


Twitter | Behance | Facebook

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

shark's People

Contributors

nhanb avatar raa0121 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

shark's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.