🕷 software releases

by ryan davis



sitemap

graphics version 1.0.0b6 has been released!

Published 2016-11-17 @ 14:16

Graphics provides a simple framework to implement games and/or simulations and is designed to follow mathematical conventions, NOT game programming conventions. Particularly it:

  • Uses degrees.
  • Draws in quadrant 1 (0-90 degrees).
  • Right hand rule: 0 degrees is east, 90 is north, etc.

These allow simple things like Trigonometry functions to work as expected. It means that all that stuff you were taught it grade school still work as intended. This makes one less thing you have to adjust when implementing your simulation.

Changes:

1.0.0b6 / 2016-11-17

I’m still not happy with the color system. I’d love some help to make it more usable.

  • 1 major enhancement:

    • Added Graphics::Drawing: a simulation that doesn’t double buffer or clear each tick.
  • 20 minor enhancements:

    • Added DrawGrid decorator.
    • Added Graphics::Simulation#draw_collection
    • Added Graphics::Simulation#register_bodies
    • Added Graphics::Simulation#register_body
    • Added Screen#save.
    • Added ShowFPS decorator module
    • Added Simulation#done that causes soft exit to allow profiling of apps.
    • Added WhiteBackground decorator.
    • Added cyan and magenta to color dictionary.
    • Added sge_FastFilledRect to sge_primitives.
    • Body#bounce returns true if it did bounce.
    • Defined Graphics::Simulation::CLEAR_COLOR.
    • Graphics::Simulation now stores a collection of collections of bodies. Those bodies are updated and drawn automatically each tick.
    • Graphics::Simulation.clear defaults to CLEAR_COLOR.
    • Improved MVC pattern in Simulation.
    • Pushed Simulation up to AbstractSimulation.
    • Registered more default colors. Should also make arrays of names.
    • Reimplement Body#bounce to use clip & NORMAL. Much cleaner.
    • Split Simulation#draw into pre_draw and post_draw to give overrides more flexibility.
    • Split up Simulation for Drawings.
  • 4 bug fixes:

    • Fixed a bug in boid refactoring.
    • Fixed bounce math to try to place the body to where it would bounce. (sotoseattle)
    • No more srand in examples.
    • Only apply friction on #bounce if greater than 0.
  • home: https://github.com/zenspider/graphics
  • rdoc: http://docs.seattlerb.org/graphics