Unreleased - October 30, 2022 (Expected)
v1.0.0 - December 31, 2022 (Expected)
Text
no longer can affectFont
s directly.- Entirely removed the
Group
class. This means code utilizing groups will need to be significantly refactored. - Refactored
Scene
s as a consequence of the removal of groups. See documentation for more information. - Added
ignore_cam
option toGameObject
s. This decides whether the gameobject respects the scene's camera when it draws. Replaces the previous UI group behavior. - Reordered some function arguments for many functions and constructors to prioritize more used arguments.
Tilemap
andSimpleTilemap
componentsGameObject
now have children whose positions, rotations and z_index are relative to their parents. Usegameobject.set_parent()
to set a parent.hitbox.should_collide()
which can be overriden to determine whether a hitbox should collide with another.
- The default window size now matches the resolution instead of being half it to be more intuitive.
- Changed default resolution to (500, 500).
font.add_style
andfont.remove_style
no longer look if the thing you are removing or adding exists.Font
styles are integers you | together.- Exe files will not crash on closing in Windows.
GameObject
s no longer have a default name. Instead it is now "".
Time.milli_to_sec()
andTime.sec_to_milli()
because they were unused.
surface.blit()
now uses cartesian coordinates like the rest of rubato.Time.target_fps
now caps the fps as the correct value.
v0.4.0 - November 18, 2022
- Hidden a LOT of methods that weren't meant to be touched by users.
- Renamed
surface.get_size()
tosurface.size_scaled()
andsurface.get_size_raw()
tosurface.size()
. - Removed
Game.camera
. Good code should use the scene's camera directly orGame.current().camera
. - Made
Game.current()
a classmethod instead of a property. This is to make it more obvious that it is read-only. - Restructured the Joystick input system to make it easier to work with in more complex settings.
- Changed external
Time
methods and attributes to use seconds instead of milliseconds where applicable. - Fullscreen option in
init()
is now a boolean. - Added maximize option to
init()
. - Renamed
Surface
andRaster
draw_point()
functions toset_pixel()
. - Removed
get_pixel_tuple()
because you can just doget_pixel().to_tuple()
. - Renamed
Draw.point()
andDraw.queue_point()
toDraw.pixel()
andDraw.queue_pixel()
Events.JOYSTICKCONNECT
andEvents.JOYSTICKDISCONNECT
events, and appropriate response objects.surface.save_as()
andraster.save_as()
methods to save a surface or raster to a file.scene.on_switch()
overridable method that is called automatically when the scene is switched to.hitbox.on_enter()
overridable method that is called automatically when a hitbox enters a collision.Text
support for anisotropic filteringDisplay
Maximize, Minimize, and Restore methods.
- Default physics fps to 50 to be consistent with Unity.
Color.from_hex()
now supports many different hex formats.Image
can now be created with an empty string. This is needed when cloning.Scene
andGroup
remove functions can now take in multiple items like the add functions.
- Adding groups and gameobjects adds them at the end of a frame instead of in the middle of one.
Rectangle
andCircle
now raise errors when provided with incorrect parameters.Display.save_screenshot()
wasn't working correctly on MacOSSurface
cloning now clones the alpha and color mod correctly.
v0.3.5 - November 5, 2022
- Removed
Events.ZOOM
because it was only propagated as a result of user behavior. - Renamed
ScheduledTask
toRecurrentTask
andTime.scheduled_call()
toTime.recurrent_call()
. - Reordered the arguments of
RecurrentTask
,FramesTask
, andDelayedTask
to be more intuitive. - Removed
is_stopped
from the init arguments of above task constructors to simplify them. - Removed
Debug
class. - Switch from the SDL coordinate system to the cartesian coordinate system.
- Centered drawing to
Surface
s and made them cartesian.
rigidbody.stop()
method to quickly set the rigidbody velocity to 0.EventResponse
and subclasses for individual rubato eventsAnimation
now has an alpha that can be set.argb
variants ofColor.from_rgba32()
andcolor.rgba32()
.- Python 3.11 support.
RecurrentTask
task callback can now be made to take in a task argument. This allows you to stop the task when you want.delay
argument in Frame, Delayed, and Recurrent tasks now only controls the delay.- Frame, Delayed, and Recurrent tasks no longer modify
delay
, and instead determine the next time to run the task usingnext_run
. - All event listener callbacks now can take in an
EventResponse
. - Made
Events
an enum for nicer documentation. Doesn't impact usage. - Internal file structure. Shouldn't impact most users.
- Optimized and fixed some internal rendering algorithms.
- Colors are now internally represented as argb32 integers instead of rgba32 integers.
hitbox.get_aabb()
methods now return the aabb in the form of bottom-left, top-right coordinates instead of top-left, bottom-right.
- Hidden
rigidbody.physics()
because it is called automatically. - Hidden
Radio.handle()
because it is called automatically.
- Fixed border-thickness not being taken into account when making surfaces in
Draw
methods. - Turning blending off in surface drawing methods affecting antialias border blending.
- Potential division by 0 error when drawing under certain conditions.
v0.3.4 - October 8, 2022
- Changed the type of some scale parameters from a scalar value to a Vector/tuple for more customization and consistency.
shadow_pad
parameter inDraw.text()
is now a vector to allow for different padding in the x and y directions.- Renamed
surface.merge()
andraster.merge()
tosurface.blit()
andraster.blit()
, respectively, to be more consistent with Unity's API.
- Extra arguments to
raster.blit()
to allow for the full functionality ofsurface.blit()
.
- Removed sdlgfx dependency, replacing them with a cache-based
Surface
implementation. - Default z-index for all queue-based
Draw
functions is now 0 to match the rest of rubato. (was Math.INF) - All
Draw
functions can now take in a camera as an optional argument. Text
component now uses a Surface in its implementation.
Draw.texture()
andDraw.queue_texture()
because they used SDL_Texture objects which are hidden in rubato.- Hidden a few functions that deal with internal SDL objects that were not user-usable anyway.
- Some drawing processes weren't taking into account zoom and the camera's z-index.
- Potential memory leak issue with naked
Font
objects.
v0.3.3 - September 12, 2022
- Renamed
Draw.surf()
andDraw.queue_surf()
toDraw.surface()
andDraw.queue_surface()
. - Removed all
delete()
functions because they did nothing that was useful for memory management, which was their purpose. - Removed
Sprite
, becauseSurface
does the same thing. Display.update()
andDraw.text()
now use center position like the rest of rubato.- Removed
PressStart2P
font and replaced it withMozart
.
ParticleSystem
, which manages a system ofParticles
.remove()
functions where needed.Surface.from_file()
as a replacement forSprite
.shadow
option when drawing text.- A few miscellaneous
str
andrepr
methods where most likely to be used.
- Made
animation.anim_frame()
a function instead of a property method. - Renamed
surface.generate_tx()
tosurface.regen()
. - Renamed
animation.set_current_state()
toanimation.set_state()
. - Internally use
round()
more often instead ofint()
to avoid rounding errors. button
attribute of mouse events is now an integer instead of a string to be consistent.
animation.image
because it exposed an underlying SDL surface, which should not be seen by users.- Long deprecated mouse methods in
Input
vector.distance_between
(usevector.dist_to()
).camera
argument from some draw methods to be consistent.
- Returned
NotImplemented
object instead of raising an error for vector math methods. - FPS drawing correctly on smaller resolutions
- Some
repr
methods not returning a string capable of recreating the object. - SDL dlls are now properly bundled on every major platform.
v0.3.2 - August 28, 2022
Polygon
s MUST take in a list of vectors in clockwise order instead of counter-clockwise as was before. Generator methods automatically reflect this change but if you are passing in your own lists, make sure to reflect this change.component.true_z()
is now a function instead of a property method. This is to match with our new property method convention.
gameobject.remove_ind()
method to remove an individual component from a game object with a given index. Use this to remove components from a game object which holds multiple instances of the same type of component.component.true_pos()
andcomponent.true_rotation()
methods to get the position and rotation of a component in world space. These functions correctly apply the gameobjects position and rotation to the component while respecting offsets.Vector.poly()
andVector.rect()
methods to generate lists of vertices for regular polygons and rectangles.color.clone()
.- Functions that required Vectors before now accept appropriately-sized tuples.
Events.MOUSEWHEEL
andEvents.SCROLL
(which are the same), propagating mouse scroll events.GameObject
s andGroup
s can now be hidden in order to make their children not draw.GameObjects
s can be active just like groups.- Allowing passing in the hidden attribute into
Component
constructors. Raster.fill()
andSurface.fill()
.vector.within()
method to check if vector is within a certain distance of another vector.Raster
component andSurface
now have a changeable alpha. (Image
andSprite
by extension)
- Modified the internal workings of
gameobject
s components data structure to more flexibly handle inputs. (Can now handle getting components by a parent type (such as Hitbox or Component or even object)). - Renamed
vector.distance_between()
tovector.dist_to()
. - Renamed
polygon.translated_verts()
topolygon.offset_verts()
. - Renamed
polygon.real_verts()
topolygon.true_verts()
to maintain naming consistency. - Rewrote
Rectangle
from the ground-up. - Window is now shown when begin is called. Not when init is called.
mouse_button
key passed in mouse press events renamed tobutton
- Default physics fps to 50 to align with Unity.
- Automatically normalized joystick events/getters to be in the range of -1 to 1 instead of -32768 to 32767.
hitbox.get_obb()
because it wasn't working properly. Usehitbox.get_aabb()
instead.polygon.transformed_verts()
because it was unused in the engine.camera.scale()
. Simply multiply by the zoom instead.Surf
, moving its functionality toSurface
and updatingRaster
andImage
accordingly.
- Getting
Rectangle
,Polygon
, orCircle
components from a gameobject returning allHitbox
type objects. You can still replicate this functionality by passingHitbox
into the component getter. - Offsets (including rotational) not working properly. Physics has also been refactored to handle scaling properly.
Rectangle
side getters and setters, which were not utilizing offsets properly. They now work with the AABB of the rectangle.gameobject.active
not functioning properly.- Bug fixing from bugs found through pyright.
Time.delta_time
being misused in a couple rigidbody methods.
v0.3.1 - 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
v0.3.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.
v0.2.2 - 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.
v0.2.1 - May 10, 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.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.
- 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
. 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.
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.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.
v0.2.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
v0.1.0 - March 15, 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
- Sound system
- Proper 2d physics without angular velocity and torque
- Circle collision
- Groups are back
- A more complete color implementation
- New time system
- Switched to GPL-3.0 License
- Lots of linting
- Move default options to their own area
- Switched to a component based system (similar to Unity)
- 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
- Many many bugs
- Removed Groups because they were deemed useless
- Physics for now
- Animations are now independent from FPS
v0.0.0 - Nov 03, 2021
- Basic framework for everything
- Sprites, Scenes, Main game object
- Rigidbody implementation