Skip to main content

r3shape-labs
PyPi Package version
GitHub Stars License

r3frame2 is a collection of modules, classes and utilities designed to bring structure to your next project, without hindrance.
Providing a robust and extensible development framework for many kinds of multimedia applications. Leveraging pygame-ce, you get the simplicity of python minus the hair-pulling.

Installation

Install r3frame via pip:

pip install r3frame2

r3 Playground

Once installed, you can run the playground demo by typing:

r3playground

This will launch an interactive example that is actively maintained and used to showcase r3frame's capabilities.

Quick Start

Getting started is as simple as the following code:

import r3frame2 as r3

class MyScene(r3.app.R3scene):
    def __init__(self, app):
        # to begin, lets configure the world in this scene
        # for we pass it an instance of a desired partitioning system configuration
        super().__init__(app, r3.resource.R3worldConfig(r3.resource.R3gridConfig()))

    def init(self):
        # load an R3entity
        self.database.load_entity("player", [100, 100])
        
        # query said entity and toggle physics on it
        self.player = self.database.query_entity("player")
        self.physics.toggle_transform(self.player)

        # insert our entities into our world's partition
        self.world.partition.insert(self.player)
    
    def exit(self): pass

    def events(self):
        # handle movement along the x-axis
        if self.app.events.key_held(self.app.keyboard.A):
            self.physics.set_velocity(self.player, dx=-100)
        if self.app.events.key_held(self.app.keyboard.D):
            self.physics.set_velocity(self.player, dx=100)

        # handle movement along the y-axis
        if self.app.events.key_held(self.app.keyboard.W):
            self.physics.set_velocity(self.player, dy=-100)
        if self.app.events.key_held(self.app.keyboard.S):
            self.physics.set_velocity(self.player, dy=100)

    def update(self, dt: float): pass

    def render(self):
        # queue a render call for our player (0 = Opaque Render Phase)
        self.renderer.queue(r3.resource.R3renderCall(0, self.player.pos, self.player.surface))

class MyApp(r3.app.R3app):
    def __init__(self):
        super().__init__(title="MyApp")

    def init(self):
        self.add_scene("playground", MyScene)
        self.set_scene("playground")

    def exit(self): pass

MyApp().run()

Contributors

Contributing

Want to help improve r3frame? Feel free to contribute by submitting issues, suggesting features, or making pull requests!

License

r3frame is open-source under the MIT License.

Metadata

Release files for r3frame2 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for r3frame2 0.0.8
File Size Uploaded Provenance Actions
r3frame2-0.0.8.tar.gz 37.3 kB Without provenance Details for r3frame2-0.0.8.tar.gz

Release files / r3frame2-0.0.8.tar.gz

Download URL r3frame2-0.0.8.tar.gz
Size 37.3 kB
Tags Source
SHA-256 checksum
How to use checksums
86d6a289c6e14987b3f5c85c8345a6061512b150dd77e641bd37e290cc4638fa
BLAKE2b-256 checksum
How to use checksums
e87a6b89c1fa899fb105a903517936922651f7faa377ff1fb9b88c327b8068d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Security for r3frame2 0.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page