Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wijat opened this issue May 30, 2025 · 5 comments

Comments

@wijat
Copy link

wijat commented May 30, 2025

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.

@wijat
Copy link
Author

wijat commented May 30, 2025

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()

@eruvanos
Copy link
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 :)

@wijat
Copy link
Author

wijat commented May 30, 2025

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.

@einarf
Copy link
Member

einarf commented Jun 4, 2025

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).

@pushfoo
Copy link
Member

pushfoo commented Jun 4, 2025

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants