-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Separation of 2D and 3D games #510
Comments
You are probably getting these artifacts because you did not set There definitely is some overhead from 3D transforms, but I don't think this can cause any problems unless your game goes to extreme entity numbers. The burden of maintaining separate 2D code is not worth the questionable performance gain. Maybe someone can give a different opinion |
@chemicstry I am using the Here's the system I am using to spawn the sprites:
|
The sprite clipping issue has been fixed on master #385, but it has not been included in a released version yet. |
@memoryruins Good to know! |
FWIW, Godot is actually unusual in having a dedicated 2D engine in addition to 3D. It's one of its unique features they tout as an advantage over competitors. However, many if not most 3D game engines "fake" 2D this way. It has some advantages, even in terms of ease of use for some situations. Some people even argue that it's better than working with pixels anyway. However, I believe the way 2D works in Godot was actually born out of the UI system first if I'm not mistaken, and Cart does want to model Bevy's UI after Godot's (making the editor a "game" built out of the UI components in the engine.) So it may make sense for Bevy to implement 2D in a similar way to Godot -- it's worth discussing IMO. |
@cart I think at this point this can be closed as |
@Bauxitedev While it is still just work-in-progress, you may be interested in the new Bevy Retro plugin which does 2D similarly to Godot does with a focus on pixel-perfect rendering. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I'm not sure if I'm doing anything wrong, but it appears Bevy mixes 2D and 3D games together. The engine appears to be always running in 3D, but if you use a Camera2DComponent, the camera simply switches to a orthographic side view... but 3D features, like the depth buffer, are still enabled. This results in weird artifacts like this, where sprites with an alpha channel cut each other off when drawn in an overlapping way:
Additionally, components like SpriteComponents take a 3D translation vector, even though the z component does not make sense in a 2D game.
I think it would be better if it worked more like Godot, where 2D and 3D are two completely separate worlds. 2D entities also have their own 2D-specific nodes. This makes it much easier to make pixel-perfect games, since the pixels are mapped 1:1 from the world to the screen.
The text was updated successfully, but these errors were encountered: