镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

In the future, a node tree/graph should be added to the framework, so users can directly use add_child. #2704

Open

Description

@wijat

Right now, if a sprite is attached to another sprite, we have to manually calculate the transform. There is no concept of local space and world space—everything is in world space: position, rotation, and scale.

Most game engines support a node graph, where nodes can have parent-child relationships. With that, we can just call add_child, and the child will automatically follow the parent's transform.

For example, if I have a popup UI panel with a few buttons and labels, and those buttons also have text, and text have animation, then if I want to animate this UI panel (like moving or scaling it), I only need to animate the parent node. The children will follow automatically. Like Godot node tree.

I’ve developed games in Unity using C# for many years, and I believe a game engine doesn’t need a full editor. Python is already easy to work with. If Arcade adds more basic features like this, it would be much easier to build games on top of it.

I also prefer not to import too many other libraries. For example, my project won’t have import pygame anywhere.

By the way, in my opinion, pyglet and arcade are currently the best Python game development frameworks in terms of performance and simplicity. Arcade has the most features. I will make a game by Arcade.

Activity

  1. wijat commented on May 30, 2025

    @wijat
    Author

    Or just like this:

    from ursina import *

    app = Ursina()

    parent_entity = Entity(model='cube', color=color.azure)
    child_entity = Entity(model='sphere', color=color.orange, scale=0.5, position=(0,1,0))

    child_entity.parent = parent_entity

    app.run()

  2. eruvanos commented on May 30, 2025

    @eruvanos
    Member

    Thank you for the feedback.
    I guess we can keep this issue open until we complete the current epic (browser support) and discuss the suggestion afterwards :)

  3. wijat commented on May 30, 2025

    @wijat
    Author

    Sure, arrange your tasks.
    I do quite like Arcade for its simplicity and high performance. I'm currently using Arcade, and I will continue to provide feedback on any issues I encounter during making my game.

  4. einarf commented on Jun 4, 2025

    @einarf
    Member

    It can make sense to make a hierarchy for sprites to handle rotation or order (smaller group of sprites). Do you have an arcade-specific example? Even better if it's something runnable. The ursina example is not easy to translate to arcade. It depends at what level you apply it. If this is done too fine grained the performance cost can be astronomical, so it depends on the details.

    What will the specific andvantages be for such a system (whatever is described from the questions above).

  5. pushfoo commented on Jun 4, 2025

    @pushfoo
    Member

    For the near-term future, this may be best addressed with links to add-on ECS systems. I've mentioned Ben's Esper on Discord. The README.md is a little rough so I can try to help clean it up ahead of recommending ECS systems. If there are other good ones, we can link them too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions