Code Monkey home page Code Monkey logo

astroflight's People

Contributors

chbridges avatar

astroflight's Issues

Linux trajectory bug

Trajectory draws a straight line to point (0, 0). Perhaps OpenGL works differently here than it does on Windows, as the issue was fixed there by saving trajectory points only until a specific value (mod 20) is reached.

filesystem library not portable

Visual Studio requires the include and namespace std::filesystem
GNU G++ requires <experimental/filesystem> and std::experimental::filesystem

Extremely unclean code

Split up header files. Add comments. Categorize. Compile using flags:
-W: Print extra warning messages for some problems.
-Wall: Enable all the warnings about questionable code
-pedantic: Show all the warnings demanded by strict ISO compliance

Level constructor doesn't handle exceptions

As of now, the level constructor can only load valid levels. Empty or incomplete files that are not filled with 0s will lead to an infinite loop until astroflight.cpp throws std::bad_alloc.

Star background affects the framerate a lot

Each star (currently 160) call sin(time+offset) every single tick. Optimize using the following strategies:

  • Calculate their brightnesses on a different thread
  • Sort them by offset and and split them into groups, call sin(time+avgOffset) for each group
  • Store their colors (dependent on the respective offset) as a member variable
  • Add a public class function to draw all stars using a single vertex buffer object

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.