GithubHelp home page GithubHelp logo

rubatopy / rubato Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 1.0 24.78 MB

A lightweight, developer-first game engine built for Python

Home Page: https://rubato.app

License: GNU General Public License v3.0

Python 92.44% Shell 1.64% C++ 5.37% Cython 0.41% Mustache 0.15%
python game-engine physics 2d-game-engine engine game-development sdl2 rubato educational educational-resources educational-technology python3

rubato's Introduction

rubato

Lisence PyPI PyPI - Downloads GitHub Release Date GitHub Build Status GitHub Docs Status

Discord Server   Twitter Page   Linkedin Page  

rubato is a modern 2D engine for game developement in python built in Cython using SDL2. It is aimed to aid in rapid prototyping and educational development of games as a stepping stone towards AAA tools such as Unity. rubato is more robust than its competitors, with a more intuitive syntax, high customizability, and zippy performance.

Here are some features we're especially proud of:

  • Powerful Rigidbody Physics
  • Event Subscription/Listener System
  • Spritesheets and Animations
  • Particle Systems
  • Tiled / Tilemap Support
  • Multichannel Sound System
  • Antialiasing + Anisotropic Filtering
  • Collision Optimization with Quadtrees
  • Texture-based Hardware Acceleration
  • User Interface Elements
  • And more!

1.0 is the latest API-stable release as of Dec. 31 2022, and we plan to maintain backwards compatibility in future releases. Please note that the alpha versions (0.x.x) are now deprecated and it is strongly recommended to update in order to get the latest features and optimizations.

Wondering about the name? rubato is a music term that indicates a phrase that should be performed expressively and freely. We aim to harness that same freedom, bringing a fresh, modern take on game developement in python to a variety of users regardless of their coding background.

Getting Started

Using rubato is super easy. Just install rubato through pip in a terminal:

pip install rubato

After that, getting a window up takes only 3 lines of code!

import rubato as rb

# initialize rubato
rb.init()

# launch the window
rb.begin()

Check out our tutorial to learn more about what you can do with rubato.

Changelog

See CHANGELOG.md

Looking to contribute to rubato?

See CONTRIBUTING.md. And join our discord!

A big thank you to all of our contributors who help make this project possible.

Code of Conduct

See CODE_OF_CONDUCT.md.

rubato's People

Contributors

github-actions[bot] avatar mrelnekave avatar shaielnekave avatar tinmarr avatar tsedan avatar yankelach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

shaielnekave

rubato's Issues

UPPERCASE lowercase shift and caps switch.

When shift and or CAPS is pressed make

rb.game.radio.listen("p_down", callback)
and
rb.game.radio.listen("P_down", callback)

be different.

Also
if rb.Input.is_pressed("r"):
and
if rb.Input.is_pressed("R"):

Perlin Noise clean up

Make sure that it is implemented correctly, giving the right credit.
Should be clean and utilize hidden classes so that the user can only use the Perlin noise function.

split custom window methods and properties from Game into Display

as the title says, we want to access window information and properties not through Game (which is super cluttered and not following OOP) but through the Display class. This means porting all the current Game window methods into Display and refactoring code to work with these new changes.

Preferably we could also have separate getters and setters for the window size and the display width/height so that users don't have to mess with unintuitive sounding variables like "resolution".

Make some examples

Describe the issue
These are basically just big code blocks that demo how to use certain things

Animations need to not be tied to fps

Describe the bug
Currently animations are running very quickly at higher fps

Expected behavior
Instead, they should be independent of the games fps

Additional context
What would be nice is if you define a running fps for each animation you create (for example, 24fps for one animation and 60fps for another and the animation would move at that speed (as long as the value is not greater than the current fps or something).

create helper function allowing to import an entire folder of spritesheets

Basically create a function that takes in a directory with spritesheet images, and import them all, adding them to an animation component automatically such that each filename (with extension removed) becomes the name for that respective animationstate.
i.e.:
I have a folder with idle.png and run.png, each of which is a spritesheet in which the individual sprites are the same size.
I run "import_from_folder(folder_dir)" and it imports all of the spritesheets into an animation object with the names "idle" and "run".

Create tileable image component.

  • Simple Tilemap
  • Tiled Support
    • Proper scaling
    • Multiple Tilesets
    • Layer Offset
    • Multiple Layers
      • Tile Layers
      • Object Layers
      • Group Layers
      • Image Layers
    • Layer Visibility
    • Layer Opacity
    • Tile Opacity
    • Objects Collisions
    • Map Background Color
    • Parallax
    • Worlds
    • Layer tint color
    • Tile animations

Tiled strict limitations:

  • No infinite maps
  • Orthogonal and rectangular tiles only

Menu System

A proper menu system would make it much easier to make proper games

Pausing doesn't work

Describe the bug
When you set the game state to paused, the game quits instead of pausing.

Expected behavior
The game should pause

Combo input function

Just like there is functionality for ctrl+z and ctrl+shift+z etc. We need to be able to give the combo functionality to users. rb.Input.is_combo_pressed(*args).

modifier key is considered pressed when it isnt

how to replicate:
run the ball pit, and resize the window by holding shift. release shift BEFORE releasing the mouse cursor to end the resize operation. Now if you press "a" the secret combo will print even when shift is not pressed.

could be a mac only issue, could also be an SDL issue and therefore unfixable, not sure so assigning to martin.

Change coordinate system

Make it so that the 0,0 coordinate is the center the screen instead of top left being 0,0.

Also make it so that positive Y is pointing upwards.

Various game parameters don't update live

For example:

  • Changing the window name variable doesn't change the window name

There are many others.

What I want to happen is if a variable is "public" than changing it needs to have an effect. If you want it to be just read only, use a property method. If the user of the library shouldn't need to change it make it "private" (add a dunder).

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.