Giter Site home page Giter Site logo

breakout's People

Contributors

alexriegler avatar

Watchers

 avatar  avatar

breakout's Issues

Add Linux binaries to releases

Linux platforms should also have installers and/or executables for each release.

Some research should be done to look into what formats are best for distributing to Linux platforms.

Update project to use C++20

The game is using C++17 right now but could be upgraded to C++20.

There shouldn't be any breaking changes.

This requires changing the CMAKE_CXX_STANDARD variable in the main CMakeLists.txt. I think this should be the only change required but you should double check that there aren't any reference to C++17 anywhere.

Switch from console logging to file logging

Right now the game opens up a terminal along with the game window, which is a bit unconventional. It would be better if the game didn't need to open a terminal window and it instead logged messages to a file.

"Too many sounds" exception

Description

Currently sound effects are limited to an arbitrary 200 limit. After reaching this limit, the game throws an exception and exits. This limit is easily reachable after one or two levels.

Here is where the issue is in the code:

void SoundEngine::play2D(const std::string& filename, bool loop)
{
auto search = m_soundsByName.find(filename);
if (search == m_soundsByName.end()) {
throw std::runtime_error {"File not yet loaded"};
}
if (m_sounds.size() > 200) {
throw std::runtime_error {"Too many sounds"};
}
// TODO: Utilize circular buffer
auto& sound = m_sounds.emplace_back(search->second);
sound.play();
}

Suggestions

The sound effects instance are not being reused at the moment but they can and should be.

Perhaps some kind of circular buffer could be used. Some logic would need to be added to determine whether a sound effect has finished and if it has, then reuse the sound effect.

SFML states the following about sounds,

Another source of error is when you try to create a huge number of sounds. SFML internally has a limit; it can vary depending on the OS, but you should never exceed 256. This limit is the number of sf::Sound and sf::Music instances that can exist simultaneously. A good way to stay below the limit is to destroy (or recycle) unused sounds when they are no longer needed. This only applies if you have to manage a really large amount of sounds and music, of course.

Source:
https://www.sfml-dev.org/tutorials/2.5/audio-sounds.php

sf::Sound documentation:
https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1Sound.php

Merge the dev branch with master

The dev branch was created a while ago when the project was still using Visual Studio to build the game. It uses C++20 and has some significant architectural differences from master.

This will take a considerable amount of effort to merge. My suggested merging strategy is to take parts of the dev branch piece-by-piece into the master branch. There may be parts that we don't want to merge.

Updating the master branch to C++20 is addressed by issue #2.

Add MacOS binaries to releases

MacOS platforms should also have installers and/or executables for each release.

Some research should be done to look into what formats are best for distributing to MacOS platforms.

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.