v3.1.0 - August 19, 2022
- Made
Vector
a C class, improving overall Rubato performance. - Controller support!
Surface
support! This is a class that lets you easily draw to a screen. The drawing is cached and is therefore very fast.- Increased performance by using
Surface
instead ofDraw
(3-4x improvement).
- As
Vector
is now a C class, it only holds floats and is therefore subject to floating point errors in unexpected cases. Be careful in accuracy-dependent calculations to handle deviation properly. Note that Python ints are implicitly cast to floats when used in Vector. Color.rgba32
is no longer a property is a method instead.Vector.one
and other similar class properties changed to classmethods, i.e.Vector.one()
Group.all_gameobjects()
to get, recursively, all the game objects belonging to a group and its children.- Multiple
Event
types for controller events. Controllers are registered automatically by Rubato for event listening. - Assorted
Input
methods for querying the state of a controller. Raster
renamed toSurface
.Raster
is now a component that holds a surface. It is analogous toImage
forSprite
s.- Polygon filling algorithm for convex shapes
- Line and circle/filling algorithms.
- Made
QTree
a C class. This is an internally used class and should not affect normal library usage. - Default drawing/debug colors from green to cyan.
- Made rendering of images faster
Polygon.generate_polygon
toVector.poly
.generate_polygon
is deprecated and will be removed in a future update.
Game.name
, which did not do anything... yikes.Image.surface
is not accessible anymore. Instead useImage.surf.surf
.flipx
andflipy
are no longer available. Instead, set the scale to be negative.Vector.to_int()
. UseVector.floor()
orVector.round()
instead.
- Deeply nested groups not colliding with ancestors
- Hitboxes outside the boundaries not making use of QTrees properly
v3.0.0 - July 31, 2022
- Optimized collision detection with Quadtrees, speeding up high-demand simulations significantly.
- z_indexes completely reworked.
- Some setup, draw, and update methods deprecated in some classes.
- Camera position is now where it looks at. ie. default camera position is now
Display.center
. - Reorder constructor parameters for most classes.
- Removed
Game.scenes
, moving mostSceneManager
code intoGame
. - Renamed several internal
Time
attributes to better describe what they are. - Renamed
Vector.random_inside_unit_circle()
toVector.rand_unit_vector()
Component
now has a z_index- true_z property for components which gets the z_index of the
Component
offset by its parentGameObject
Time.scheduled_call()
for a self-correcting recurring method call on a timed interval.- clone functions for
Group
,GameObject
, andScene
. Draw.texture
andDraw.queue_texture
to draw textures to the rendererDraw.sprite
andDraw.queue_sprite
to draw sprites to the rendererSprite
class to draw images that are not linked to Game Objectswrap()
function can create and populate a GameObject with component(s) automatically.world_mouse()
function to easily get the mouse position translated into world-coordinates- Support for operations with Vectors using tuples and lists, meaning less objects need to be created. (note that no length checking occurs, so make sure your tuples and lists are of length 2).
raise_operator_error()
function to raise an error about an operator in a Pythonic style.Scene.switch()
instance method that allows users to switch to a scene without callingGame.set_scene(scene_id)
Game.draw
andGame.update
functions, both of which are overrideable, to give user-defineable functionality not reliant on scenes.Group.contains()
method for checking whether a group or gameobject has already been added to it.Hitbox.contains_pt
method for checking whether a point is inside a hitbox (useful in buttons and the like)
- Made
Time.now()
a function instead of a property. - Refactored collision detection code to not report contact points, since we don't need them anymore.
- Added
hidden
attribute to all components and removedvisible
attribute fromAnimation
,Image
, andRaster
- Moved
border_color
andbackground_color
to individualScene
objects instead of a single attribute for the whole game. - Restructured the internal file heirarchy. Should not affect normal library useage at all.
- Default border color in draw functions from
Color.green
toColor.clear
- Use
Draw.{thing}
to draw immediately andDraw.queue_{thing}
to draw with a specific z_index. (replace {thing} with the draw function of your choice) - Switching scenes now only takes effect on the next frame.
- Reordered
Draw.clear
params to be more intuitive. - Renderer is automatically cleared if no scene exists.
- z_index from
Group
- Misc. unused draw, setup, and update methods for some classes.
- Advanced rotational physics. Will be added in a later patch once Hitbox is refactored.
- Vector
unit()
method. Usenormalized()
ornormalize()
instead.
- Resizing an
Image
now works. - Updated all clone functions to work with new stuff.
- Changing the camera zoom now affects all Sprites.
- Made vector operations more complete and raise errors properly.
Group.count()
not working properly.
v2.2.0 - June 12, 2022
- Removed all of the defaults dictionaries. Instead we are switching to a pythonic way of doing things. The key names, types, and defaults are still the same so its just a matter of adding ** to the beginning of the dictionary.
Vector.angle
now returns the angle in degrees, starting from the top and going clockwise.Vector.from_radial
now matches the angle format described above and takes in an angle in degreesVector.angle_between
now returns the angle in degrees.Color.random
now a function and not property. ->Color.random()
Time.delta_time
andTime.fixed_delta
are now in seconds instead of millisecondsDebug.*
all draw functions are moved to the Draw class. Default to Debug functionality.
Display.get_window_border_size()
returns the size of the black bands around the window.Input.get_mouse_abs_pos()
returns the absolute position of the mouse.Display.border_size
fixed and integrated intoInput.get_mouse_pos()
: you only get on-renderer positions.Image.from_surface()
andImage.from_buffer
functionality.Group.active
property. Boolean that controls whether the group is drawn and updated.Color.random_default()
Allows to randomly choose from a set of default colors.Debug
Added Debug module, that is called at the end of the game loop.Debug
Now shows docstring in documentation.
Math.sign()
now returns 0 for 0.time
module renamed torb_time
to not conflict with the Python time module.Draw
now has a default color of green.os.walk
Each function with os.walk has a recursive option now. To allow you to choose between recursive and shallow.window_pos
setting window_pos in init() now takes into account the border, so you set the topleft of the border.
Vector.random_inside_unit_circle()
now actually returns a unit vector.- Fixed all Vector functions that had an angle in them to use north-degrees properly.
- Added
Math.rad_to_north_deg()
andMath.deg_to_north_rad()
to change accurately. - Fixed
error.deprecated()
to require a replacement or else it didn't work.
v2.1.1 - May 10, 2022
Display
can now print the screen contents.Raster
for pixel mutation and drawing. (Separated from image)Display.border_size
returns the size of the black bands around the draw area.
Text.align
renamed toText.anchor
and is now properly documented.input
module renamed torb_input
to not override the built-in function.math
module renamed torb_math
to not override the built-in function.
Image
no longer has drawing functions. Instead use aRaster
object.
Text
font defaults was never actually being set if None. Now it is.- DLLs now actually bundle.
v2.1.0 - May 6, 2022
Text
can now rotate.Button
. A button class that can be used to create a clickable area.end()
. Quits the game.pause()
. Pauses the game.resume()
. Resumes the game.penetration
andnormal
Manifold properties.- Removed and deprecated functionality is supported.
colliding
set to Hitboxes that automatically updates with the hitboxes it is currently incident on.on_exit()
user defineable callback for hitboxes.- PyInstaller support.
- All
Hitbox
s now haveget_aabb()
andget_obb()
methods. - Can create a
RigidBody
with density instead of mass and moment. Will usually result in nicer behavior. Vector
now has a many quality of life methods. As well as rationalization.Math
fraction simplification, simplifying square roots, and prime number generation.
- Optimized draw cycle, effectively doubling framerates.
- Some "to" and "from" methods for
Color
. - Significantly changed internal
Vector
functionality to allow custom pointers. - Moved the rotation parameters from
Component
toGame Object
. Component
can now take in a dictionary of parameters.- Moved collision test code and impulse resolution to
Engine
class. - Changed default physics fps to 30.
Polygon.generate_polygon()
can now takes an optionaloptions
parameter. When set, it returns aPolygon
instead of a list of vertices.- Move basic draw functions from
Display
toDraw
.
Vector
's static methodis_vectorlike()
.Vector
instance methodtranslate()
. Use the+
operator instead.Vector
instance methodtransform()
. Use the*
operator androtate()
instead.- Engine static method
overlap()
. Use the built in Hitboxoverlap()
method instead. - Removed
sep
property from Manifolds. Polygon
's instance methodbounding_box_dimensions()
. This will be replaced byget_bounds()
in a future patch.UIElement
. Instead useScene.add_ui()
with game objects.
v2.0.0 - April 5, 2022
- Sound class rewritten
- Spritesheet support
- A full UI system
- Text
- Quick draw functions in
Display
- Ported to PySDL2 from pygame
- Moved all window management from
Game
toDisplay
- Made classes that only need one instance static classes
- Rectangle implementation is now distinct from polygons
- Rename sprite to game object
Input.key_pressed()
can now take in an arbitrary number of arguments
- Default sprite images
v1.2.0 - March 15, 2022
- Proper 2d physics without angular velocity and torque
- Circle collision
- Groups are back
- Updated default image import to actually work properly
- Hitboxes can now be colored in. This replaces the old Rectangle class
- Hitboxes are now created like all other components (as in they use a options dictionary)
- Collision now happen automatically
- Rectangle class
- Animations are now independent from FPS
v1.1.0 - March 01, 2022
- Sound system
- Switched to a component based system (similar to Unity)
- Removed Groups because they were deemed useless
- Physics for now
v1.0.0 - Feb 01, 2022
- Full Documentation through docstrings and through website
- Loader for images. (Can load entire folders)
- Custom errors
- A full color implementation
- Added continuous integration
- Text can be drawn onto surfaces
- A more complete color implementation
- New time system
- Switched to GPL-3.0 License
- Lots of linting
- Move default options to their own area
- Many many bugs
v0.0.1 - Nov 03, 2021
- Basic framework for everything
- Sprites, Scenes, Main game object
- Rigidbody implementation