GithubHelp home page GithubHelp logo

openrhythm / openrhythm Goto Github PK

View Code? Open in Web Editor NEW
23.0 11.0 1.0 1.78 MB

Rhythm game similar to FoF, GH, or RB. (no longer in development)

License: ISC License

CMake 14.26% GLSL 0.06% Shell 0.41% C++ 85.01% Batchfile 0.09% JavaScript 0.16%
opengl rhythm-game c-plus-plus game-development game-engine cross-platform-game music-game music game gamedev

openrhythm's Introduction

OpenRhythm

Discord

OpenRhythm currently depends on the following libs:

  • CMake
  • SDL2
  • Freetype - I may switch to using stb_freetype haven't decided quite yet.
  • GLM
  • STB (included in extern/stb)
  • Gettext

Submodules

This project contains submodules. There are two ways to handle this.

To clone the repo and all submodules do:

git clone --recursive https://github.com/OpenRhythm/OpenRhythm

Otherwise if you have just cloned the repo you will need to run these to clone the submodules:

git submodule init
git submodule update

Compiling and packaging

You will need a compiler that supports C++14

  • Makedepends : dependencies for compiling but not for executing :

    • CMake (3.0 minimum)
    • GLM (Graphics, header only)
  • Dependencies : for compiling and executing :

    • Freetype2
    • Gettext
    • OggVorbis
    • SDL2
    • cubeb

Windows

The following instructions are using "Build Tools for Visual Studio 2017"

Download the pre-built dependancies and make sure they are in the extern folder.

https://drive.google.com/file/d/0BwN4qYrZTBNbaW1Tb3pycm1aTlE/view?usp=sharing This are x64 release builds done with VS 2015

Then run win-release-build.bat

Unix: (MacOS/Linux)

GCC-4.9+ or Clang-3.4+ (MacOS: download Xcode Command Line Utils)

  • Linux
    • Debian / Ubuntu / Linux Mint
    sudo apt-get install cmake sdl2-dev libfreetype-dev libglm-dev
    
    • ArchLinux / Manjaro / …
    sudo pacman -S cmake sdl2 freetype2 glm
    

Then build the code

./release-build.sh 
# or
./release-build.sh --verbose

openrhythm's People

Contributors

kaeipnos avatar mdsitton avatar mecwerks avatar salamandar 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

fervi

openrhythm's Issues

OSX Build

Having trouble building on OSX:

  • cubeb doesn't appear to be set up correctly as a sub-module.
  • release_build.sh script has some errors
    • mkdir and rm options arguments at end of arg list instead of beginning
    • rm CMakeCache.txt before cd'ing to build
  • With fmt version 3.0.2 and 4.0 build fails on smf.cpp with error:

/usr/local/include/fmt/format.h:2228:20: error: ambiguous conversion for functional-style cast from 'const ORCore::MidiChannelMessage' to 'MakeValue<fmt::BasicFormatter<char, fmt::ArgFormatter > >'
Value result = MakeValue(value);

I'm interested in helping develop (possibly, sporadically), and beta-test.

Status of project

Hi!

I've been getting started with making a rhythm game lately, and came up with OpenRhythm. I Googled it to see if it was already taken, and I found this project. I'd like to get your opinions on what I should do next. Here are some possible courses of action I've thought of, feel free to tell me which you would prefer.

  • I change the name of my project. Probably the easiest option.
  • I continue the legacy of this project under the same name with my new code.

I'm fine with either option, but please let me know. I'd love to keep good FOSS rhythm games going.

Using the SHAsum inside the scores database

I just write down here an idea I don't want to forget.

If the plan is to use a centralized database for scoring, and not anymore in the .song file, the database could refer to the path of the file. But what if the music dir is moved/renamed ?
Then the best could be to refer to the SHAsum of the midi file. When the library is rescanned, we simply check the SHA to be sure the music is the same, or to relink some moved music with its score.
Of course I don't say it'd be a good idea to remove the filepath from the database, but at least the SHAsum is another info to check library changes.

Error while compiling master

I wanted to get on Master to add translations, and I get 👍

/home/salamandar/tmp/OpenRhythm/src/game/parser.cpp:125:63: erreur : ‘struct ORCore::MetaEvent’ has no member named ‘absTime’
             m_tempoTrack.add_event(tempo.qnLength, tempo.info.absTime);
                                                               ^~~~~~~
/home/salamandar/tmp/OpenRhythm/src/game/parser.cpp:126:76: erreur : ‘struct ORCore::MetaEvent’ has no member named ‘absTime’
             m_logger->trace("Tempo change recieved at time {}", tempo.info.absTime);

I updated the submodules but no changes. Smthg missing ?

Configuration and Config Files.

Currently there is nothing implemented to load, store or make available any sort of configuration options.

There needs to be some kind of central config class that allows you to get and set global configuration keys/values which will get automatically saved to the config file once changed.

The config file will probably be either JSON or YAML.

Rust

I'm really interrested in learning Rust. I'm currently reading on how integrate Rust code in a C++ application.
How do you feel about putting some of this next-gen awesome language in Openrhythm ? Ofc if you're okay I'll document and comment my code as necessary.

Link SoundTouch-C on Mac

The SoundTouch-C library is built shared and is not found by default at runtime. My workaround was to include the lib path on LD_LIBRARY_PATH, but a more automatic method would be prefered.

Threading

Well there are basically 2 implementations :

  • Multithreaded optimization (transparent threads)
  • Working threads
    • UI
    • Audio
    • Network
    • Small tasks (saving/reading files,…)

The main question is : where do we implement the threads ?

  • In the "main" code : create thread, create objects, call methods, all inside the "main" game code
  • In the "core" code : some "wrapping classes" specific to each task so that the main code does not have to bother with the threading code

Possible memory leak in audiotests.cpp

I mentioned this before you merged the branch but you seem to have missed it.


    auto *anotherResamplerstream =
        new ORCore::ResamplerStream(anotherOgg, SRC_SINC_MEDIUM_QUALITY);

    auto soundOutput = new ORCore::SoundIoOutput();

You call new a couple times but don't delete the allocated memory.

Configuration systems

So currently we are using the yaml config file, but after thinking about it more there might be better options for reducing code complexity.

Songs are pretty much forced to use ini style config files for backwards compatibility reasons, so we need an ini parser anyways.

Curious what your throughts are on this though.

Finish the VFS and integrate it with the codebase.

Currently there is a partially complete VFS, however there is still some missing features like merged mounts.

Basically to integrate with the rest of the code all file IO needs to go through the VFS. To make the name VFS make sense we will also want to have it able to perform basic filesystem operations in a cross platform way.

Perhaps look into unit testing?

I went searching for a unit testing framework a while back and decided that I wanted to wait until C++17 was closer to release and more supported. Because macros 👎 and C++17 adds a couple features that i think should allow unit testing frameworks to nolonger use macros...

I'll have to take another look though the various frameworks since its been probably a year since i last took a look at the options.

Optional PNG++ ?

I meant to ask you to understand, why Png++ is an optional library ? Why activate/deactivate it and how is it handled in the source code ?

Doc

Well I've already tried CLdoc and it works pretty good, renders great web pages, with a search engine. The parsing is slow and monothread though.
My core/audio code already implements its (very simple) syntax, and I'll push the cmake changes in the docs branch. Did you have another doc engine in mind ?

Complete the audio system.

Currently the audio code merged in pr #11 is very incomplete. So this work needs to be expanded upon.

Overall my current plan for the audio engine is to have audio inputs, streams, dsp/fx, and outputs.

  • Inputs will be stuff like microphones, vorbis disk streaming, vorbis network streaming, and in-memory vorbis playback.
  • Outputs are soundcard outputs, vorbis network streaming, and maybe a null output?
  • Streams will be what connects the various components of the audio engine together. Inputs will put data into a Stream, Outputs will take data out of a stream, and DSP/FX will modify a stream.
  • The dsp/fx side of things will contain stuff like
    • sample rate conversion,
    • mixers to mix 2 or more streams into one,
      and Audio effects like
    • echo,
    • Pitch Bend,
    • etc.

Not all of this needs to be implemented immediately, but I just needed to get my thoughts on everything down somewhere.

Change MIDI for another format

I don't like MIDI. It's old (thus _too much_ optimized), a pain to parse, and not so adapted to our needs. I'm sure it's even worse to generate MIDI. And it's not even using seconds for a unit…
If we want to extend to more than guitar, we probably should define a new format (or use an existing format, idk what OSU or RB are using). And if we want to add metadatas like scenes, effects,… too.

Refactor rendering code to be more extendable, and better performant.

This could be done along side #7 then each backend could have its own dll.

Something that could be interesting after these things are finished, is to try and implement a mantle rendering back end for example. I would probably use this to access the mantle api:
https://github.com/jmegaffin/magma

This could technically also allow us to support an old opengl 1.0 direct rendering style backend as well. For the most ancient of hardware...

DirectX might be interesting to dive into as well haha.

So many options so little time :P

Audio compilation errors with Visual Studio.

1>  soundio.cpp
1>C:\Users\Matthew\development\musicgame\src\core\audio\output\soundio.cpp(98): error C2131: expression did not evaluate to a constant
1>  C:\Users\Matthew\development\musicgame\src\core\audio\output\soundio.cpp(98): note: failure was caused by non-constant arguments or reference to a non-constant symbol
1>  C:\Users\Matthew\development\musicgame\src\core\audio\output\soundio.cpp(98): note: see usage of 'byte_count_max'
1>C:\Users\Matthew\development\musicgame\src\core\audio\output\soundio.cpp(110): error C2440: 'initializing': cannot convert from 'int16_t [byte_count_max]' to 'int16_t'
1>  C:\Users\Matthew\development\musicgame\src\core\audio\output\soundio.cpp(110): note: There is no context in which this conversion is possible

Basically the audio code is using some non-constant at compile time variable in a c style array and VS is complaining.

License

Sorry to spam…
Which licenses do you think of ? I hope you think about open source… ;)

How to save scores

Well I want the scores to be saved in a "centralized" user database, and I think we all agreed on this.
That means several things :

  • No more "giving the songs to a friend with my scores" (or giving the whole database ? Meh.)
    • We could implement some sort of "export scores inside the music filetree"
  • We have to be able to "detect" when songs are moved, renamed
    • Shasum on the audio file ? Yeah, but that means audio metadata modifications breaks the DB
    • Metadatas inside the ogg file > Hum, as we said, the less we modify the audio files, the better ;)

Use SFML instead of SDL

Hi there !
I've been told about SFML. This other media API is way faster and, some say, easier to use.
It supports all systems.

What do you think about it ?

Translation support

Gettext is usually used on UNIX systems with .po files, seems to be supported on Windows/OsX too, dunno.

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.