Giter Club home page Giter Club logo

gustavsfairyland's Introduction

Gustav's Fairyland

Gustav's Fairyland is a simple puzzle game on time where the player has to choose the right clip to construct a custom fairytale which is narrated by the famous composer Gustav Mahler.

The game has been created by Tamino Dauth and Carsten Thomas. We have recorded the video clips with the permission of the actors we filmed. The music composed by Gustav Mahler as well as the graphics were freely available on the Internet.

Automatic Build with TravisCI on Linux

Build Status

Automatic Build with AppVeyor on Windows

Latest Build

Manual Build

Linux

Run one of the following commands: cd ./scripts && bash ./buildlinux_debug.sh cd ./scripts && bash ./buildlinux_release.sh

It should use the local directory ./clips when CMAKE_BUILD_TYPE is set to Debug. This helps you to update the clips locally for testing.

Fedora

The game depends on several libraries on Fedora:

  • qt5-qtbase-gui >= 5.5.1
  • qt5-qtmultimedia >= 5.5.1
  • qt5-qtsvg >= 5.5.1
  • qt5-qttranslations >= 5.5.1
  • gstreamer1-libav >= 1.12.4-1 (only if the videos cannot be played)

Windows

On Windows 7 the program has been compiled using the MinGW distributed with Qt. The shell path in CMake has to stay clear. Unfortunately there is only a 32 MinGW Bit compiler. Generator: Code Blocks - MinGW Makefiles CPack creates an NSIS based Windows installer.

Android

  • Download Android SDK and NDK.
  • Download the Qt Open Source release for the corresponding Android version.
  • Add the path to "android" to your PATH "$HOME/Android/Sdk/tools/".
  • Make sure that the paths in the Bash scripts are set properly (scripts/buildandroid.sh, scripts/buildqtavforandroid.sh and scripts/config-android.sh).
  • Go to the scripts folder: cd ./scripts.
  • Execute one of the following commands: bash ./build_arm_release.sh or bash ./build_x86_release.sh

Use the following CMake module for Android deployment with Qt: Qt Android CMake

There is a Bash script scripts/buildandroid.sh which does everything as long a virtual Android device is installed properly and the paths are correct.

The program zipalign might not be found for signing the app. It is in "$HOME/Android/Sdk/build-tools/24.0.1/zipalign but expected in "$HOME/Android/Sdk/build-tools/zipalign". Just do: ln -s "$HOME/Android/Sdk/build-tools/24.0.1/zipalign" "$HOME/Android/Sdk/build-tools/zipalign"

Fix x86 32 Bit Android arch for the release build (apparently Android CMake uses the wrong toolchain name): ln -s "$HOME/android-ndk-r12b/toolchains/x86-4.9/" "$HOME/android-ndk-r12b/toolchains/i686-linux-android-4.9"

The Android build uses QtAV for playing videos on Android devices since QtMultimediaWidgets are not supported on Android. Therefore ffmpeg and QtAV have to be build for Android too which happens in the build script scripts/buildqtavforandroid.sh.

If you want to build an Android version for Qt manually, use the script scripts/buildqt.sh.

Use the following command to get debugging output:

adb logcat

Install app on the current device (this is done automatically by the CMake module on building): adb -d install -r gustavsfairyland.apk

More information:

Make sure the codec is supported on Android: https://developer.android.com/guide/appendix/media-formats.html

Software Architecture

The class fairytale represents the main window and main application.

Game Modes

The abstract class GameMode allows you to implement custom game modes. All game modes must be added when the game is started. There is always a default game mode for a quick start. Other than that, the game mode can be choosen before starting a game.

Clips

The clips consist of video and audio files. These files have to be converted into different file formats for the different platforms: Linux, Android and Windows. This is done by running different Bash scripts. Set the option USE_COMPRESSED_FILES in CMake and it will install the compressed files instead. It should always be enabled when creating a release build.

Audio compression: cd ./scripts && bash ./compressaudio.sh

Video compression: cd ./scripts && bash ./compressvideos.sh

Jenkins

There is several Bash scripts for building the game using Jenkins. You can adapt the variables in those scripts for your own environment. For the Linux release execute this command: cd ./scripts && bash ./jenkins_linux_release.sh

It creates a TBZ2, an RPM and a DEB package.

gustavsfairyland's People

Contributors

tdauth avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

gustavsfairyland's Issues

Release 1.3

The version is in the making but not yet ready.

Major changes:

  • DONE: Many new bonus clips.
  • DONE: Only one music piece by Mahler as background music (4. Sinfonie - 3. Satz) which is not that
    annoying.
  • DONE: Success click sounds do always interrupt fail sounds but fail sounds are queued. Besides wait for the finish of the success sound before starting the next round.
  • Playable Android version (also deployed on Google Play or somewhere).
  • SVG graphics for the clip images. The current scaling looks horrible.
  • Fix the cancel bug: When canceling the sound is not stopped and the game continues.
  • Fix misplacing widgets in creative mode (only sometimes -> Let's Play).
  • Make all main window layouts central (horizontal and vertical).
  • Disable music during videos -> wait for the asynchronous call/state change.
  • Test Ubuntu, Debian and standalone Linux binary.
  • Mac Release? Cross compile?

Remove window paintings

You can see the wind direction by the clip movement so remove the windows. The windows are confusing to many players.

Subtitle support

Since the videos are German (intro, outro etc.) they cannot be understood by non-German speakers.

Therefore English subtitles should be added for the videos with spoken words. The subtitles have to be shown when the English translation is chosen.

Qt has no direct subtitle support, use a workaround:
http://stackoverflow.com/questions/21219633/how-to-force-qt5-mediaplayer-to-show-subtitles
https://forum.qt.io/topic/47378/again-how-show-a-subtitle-on-qmediaplayer/
http://doc.qt.io/qt-5/qgraphicsvideoitem.html

QtAV seems to have subtitle support:
https://github.com/wang-bin/QtAV/blob/master/src/QtAV/Subtitle.h

Android support

Building for Android does already work with the shell scripts build_android_arm_release.sh and build_android_x86_release.sh but requires the installation of the Android NDK which is specified in the scripts.
My private Jenkins build job compiles this and creats APK files.

Current issues:

  • Painting is slow as fuck. The clips move very slow. Probably an OpenGL painter would be faster (test if hardware acceleration is really used by Qt) but has some painting issues (unused area, check again!).
  • Although QtAV does not crash anymore, sometimes the video area stays black and sometimes the video is shown.
  • The click sounds are not played at the moment (why?).
  • How to provide the app? Third party APKs are blocked by default, Google Play costs 20 $? and requires some app standards? F-Droid: must be added to their repo and requires custom build scripts?
  • Some buttons are too small (skip button and pause button).
  • Rotating the view is bugged and fucks up the font and button size.

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.