Code Monkey home page Code Monkey logo

yh's Introduction

Please visit the repository of the full game:

https://gitlab.com/gilmi/haskell-play

yh

A tech demo for a shmup game.

Currently works on Linux and OS X.

Controls:

  • Arrows to move
  • Z to shoot
  • X to squeeze
  • C to restart from checkpoint

How to Run

From Source

You will need Stack.

Ubuntu:

sudo apt install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-gfx-dev libsdl2-mixer-dev
make build
make exec

OS X

brew install sdl2 sdl2_ttf sdl2_image sdl2_gfx sdl2_mixer
make build
make exec

From Compiled Binary

Binaries available here.

Ubuntu:

sudo apt install libsdl2-2.0-0 libsdl2-ttf-2.0-0 libsdl2-image-2.0-0 libsdl2-gfx-1.0-0 libsdl2-mixer-2.0-0
./shmup

OS X

brew install sdl2 sdl2_ttf sdl2_image sdl2_gfx sdl2_mixer
./shmup

yh's People

Contributors

soupi 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

yh's Issues

build failed

`-- While building package sdl2-mixer-0.1 using:
/Users/mac/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.0.1.0 build --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
Logs have been written to: /Users/mac/Downloads/yh-master/.stack-work/logs/sdl2-mixer-0.1.log

Configuring sdl2-mixer-0.1...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Preprocessing library for sdl2-mixer-0.1..
/private/var/folders/rq/yw2r9yfn07z4w8f7_k9fktl00000gn/T/stack16289/sdl2-mixer-0.1/Mixer.hsc:196:16: error: use of undeclared identifier 'MIX_INIT_MODPLUG'
    hsc_const (MIX_INIT_MODPLUG);
               ^
/private/var/folders/rq/yw2r9yfn07z4w8f7_k9fktl00000gn/T/stack16289/sdl2-mixer-0.1/Mixer.hsc:196:16: error: use of undeclared identifier 'MIX_INIT_MODPLUG'
/private/var/folders/rq/yw2r9yfn07z4w8f7_k9fktl00000gn/T/stack16289/sdl2-mixer-0.1/Mixer.hsc:196:16: error: use of undeclared identifier 'MIX_INIT_MODPLUG'
/private/var/folders/rq/yw2r9yfn07z4w8f7_k9fktl00000gn/T/stack16289/sdl2-mixer-0.1/Mixer.hsc:199:16: error: use of undeclared identifier 'MIX_INIT_FLUIDSYNTH'
    hsc_const (MIX_INIT_FLUIDSYNTH);
               ^
/private/var/folders/rq/yw2r9yfn07z4w8f7_k9fktl00000gn/T/stack16289/sdl2-mixer-0.1/Mixer.hsc:199:16: error: use of undeclared identifier 'MIX_INIT_FLUIDSYNTH'
/private/var/folders/rq/yw2r9yfn07z4w8f7_k9fktl00000gn/T/stack16289/sdl2-mixer-0.1/Mixer.hsc:199:16: error: use of undeclared identifier 'MIX_INIT_FLUIDSYNTH'
/private/var/folders/rq/yw2r9yfn07z4w8f7_k9fktl00000gn/T/stack16289/sdl2-mixer-0.1/Mixer.hsc:404:16: error: use of undeclared identifier 'MUS_MP3_MAD'
    hsc_const (MUS_MP3_MAD);
               ^
/private/var/folders/rq/yw2r9yfn07z4w8f7_k9fktl00000gn/T/stack16289/sdl2-mixer-0.1/Mixer.hsc:404:16: error: use of undeclared identifier 'MUS_MP3_MAD'
/private/var/folders/rq/yw2r9yfn07z4w8f7_k9fktl00000gn/T/stack16289/sdl2-mixer-0.1/Mixer.hsc:404:16: error: use of undeclared identifier 'MUS_MP3_MAD'
/private/var/folders/rq/yw2r9yfn07z4w8f7_k9fktl00000gn/T/stack16289/sdl2-mixer-0.1/Mixer.hsc:406:16: error: use of undeclared identifier 'MUS_MODPLUG'; did you mean 'MUS_OPUS'?
    hsc_const (MUS_MODPLUG);
               ^~~~~~~~~~~
               MUS_OPUS
/Users/mac/.stack/programs/x86_64-osx/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:38:10: note: expanded from macro 'hsc_const'
    if ((x) < 0)                                      \
         ^
/usr/local/Cellar/sdl2_mixer/2.0.4/include/SDL2/SDL_mixer.h:139:5: note: 'MUS_OPUS' declared here
    MUS_OPUS
    ^
/private/var/folders/rq/yw2r9yfn07z4w8f7_k9fktl00000gn/T/stack16289/sdl2-mixer-0.1/Mixer.hsc:406:16: error: use of undeclared identifier 'MUS_MODPLUG'; did you mean 'MUS_OPUS'?
    hsc_const (MUS_MODPLUG);
               ^~~~~~~~~~~
               MUS_OPUS
/Users/mac/.stack/programs/x86_64-osx/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:39:41: note: expanded from macro 'hsc_const'
        hsc_printf ("%lld", (long long)(x));          \
                                        ^
/usr/local/Cellar/sdl2_mixer/2.0.4/include/SDL2/SDL_mixer.h:139:5: note: 'MUS_OPUS' declared here
    MUS_OPUS
    ^
/private/var/folders/rq/yw2r9yfn07z4w8f7_k9fktl00000gn/T/stack16289/sdl2-mixer-0.1/Mixer.hsc:406:16: error: use of undeclared identifier 'MUS_MODPLUG'; did you mean 'MUS_OPUS'?
    hsc_const (MUS_MODPLUG);
               ^~~~~~~~~~~
               MUS_OPUS
/Users/mac/.stack/programs/x86_64-osx/ghc-8.2.2/lib/ghc-8.2.2/template-hsc.h:41:50: note: expanded from macro 'hsc_const'
        hsc_printf ("%llu", (unsigned long long)(x));
                                                 ^
/usr/local/Cellar/sdl2_mixer/2.0.4/include/SDL2/SDL_mixer.h:139:5: note: 'MUS_OPUS' declared here
    MUS_OPUS
    ^
12 errors generated.
compiling .stack-work/dist/x86_64-osx/Cabal-2.0.1.0/build/SDL/Raw/Mixer_hsc_make.c failed (exit code 1)
command was: /usr/bin/gcc -c .stack-work/dist/x86_64-osx/Cabal-2.0.1.0/build/SDL/Raw/Mixer_hsc_make.c -o .stack-work/dist/x86_64-osx/Cabal-2.0.1.0/build/SDL/Raw/Mixer_hsc_make.o -m64 -fno-stack-protector -m64 -fno-stack-protector -m64 -D__GLASGOW_HASKELL__=802 -Ddarwin_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Ddarwin_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -I/usr/local/include/SDL2 -D_THREAD_SAFE -I.stack-work/dist/x86_64-osx/Cabal-2.0.1.0/build/autogen -I.stack-work/dist/x86_64-osx/Cabal-2.0.1.0/build/global-autogen -include .stack-work/dist/x86_64-osx/Cabal-2.0.1.0/build/autogen/cabal_macros.h -I/usr/local/include/SDL2 -I/Users/mac/.stack/snapshots/x86_64-osx/lts-10.4/8.2.2/lib/x86_64-osx-ghc-8.2.2/vector-0.12.0.1-JlawpRjIcMJIYPJVsWriIA/include -I/Users/mac/.stack/snapshots/x86_64-osx/lts-10.4/8.2.2/lib/x86_64-osx-ghc-8.2.2/primitive-0.6.3.0-CXy1O9sQYlI58rn9KQkFyo/include -I/Users/mac/.stack/programs/x86_64-osx/ghc-8.2.2/lib/ghc-8.2.2/time-1.8.0.2/include -I/Users/mac/.stack/programs/x86_64-osx/ghc-8.2.2/lib/ghc-8.2.2/bytestring-0.10.8.2/include -I/Users/mac/.stack/programs/x86_64-osx/ghc-8.2.2/lib/ghc-8.2.2/base-4.10.1.0/include -I/Users/mac/.stack/programs/x86_64-osx/ghc-8.2.2/lib/ghc-8.2.2/integer-gmp-1.0.1.0/include -I/Users/mac/.stack/programs/x86_64-osx/ghc-8.2.2/lib/ghc-8.2.2/include -I/Users/mac/.stack/programs/x86_64-osx/ghc-8.2.2/lib/ghc-8.2.2/include/

make: *** [build] Error 1`

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.