maplibre / maplibre-rs

Experimental Maps for Web, Mobile and Desktop
Apache License 2.0
1.35k stars 79 forks source link

Bevy Plugin #305

Open itsezc opened 3 months ago

itsezc commented 3 months ago

Using Maplibre to create Maps in Bevy is very difficult / verbose and requires alot of hacking. Since Maplibre uses similar rendering to Bevy, and there is scope for including "Map rendering" as part of games, it would be nice to have a bevy-maplibre plugin, that is officially maintained by MapLibre.

nyurik commented 3 months ago

See #75

wipfli commented 3 months ago

@itsezc MapLibre RS does not have all the features of MapLibre GL JS / MapLibre Native. It is more of an experiment to see what new technologies can be used for a next-generation map renderer. So if you want to make maps in Bevy with MapLibre Native, probably it is best to open a feature request issue in MapLibre Native...

maxammann commented 3 months ago

Leaving this open as I have not yet thought creating a plugin for bevy (the other way around).

I think it should be fairly easy to do. Maybe maplibre-rs could establish itself as an in-game map viewer?

Anyone knows whether maps are typically generated or designed? My feel is that they are mostly designed and typically raster maps.

nyurik commented 3 months ago

I think a different path (for now) would get us much more -- https://github.com/maplibre/maplibre-native/issues/1057

itsezc commented 3 months ago

Leaving this open as I have not yet thought creating a plugin for bevy (the other way around).

I think it should be fairly easy to do. Maybe maplibre-rs could establish itself as an in-game map viewer?

Anyone knows whether maps are typically generated or designed? My feel is that they are mostly designed and typically raster maps.

maplibre-bevy makes sense, the scope of the issue is to use it for two purposes: rendering in game maps but also creating map heavy games think Risk, Travel Simulators etc. with the help of the Bevy ecosystem.

maxammann commented 3 months ago

I think a different path (for now) would get us much more -- https://github.com/maplibre/maplibre-native/issues/1057

I think this is less a question of programming language but more of tool stack/platform. For bevy support you basically need to support WebGPU or the bevy WebGPU layer. To make it available in a GTK app you need to support the surfaces and input handling of GTK.

Input is generally a big thing to overcome after rendering.

TLDR: it is quite complex and every use case needs a tailored implementation.

maxammann commented 3 months ago

Leaving this open as I have not yet thought creating a plugin for bevy (the other way around).

I think it should be fairly easy to do. Maybe maplibre-rs could establish itself as an in-game map viewer?

Anyone knows whether maps are typically generated or designed? My feel is that they are mostly designed and typically raster maps.

maplibre-bevy makes sense, the scope of the issue is to use it for two purposes: rendering in game maps but also creating map heavy games think Risk, Travel Simulators etc. with the help of the Bevy ecosystem.

As maplibre-rs is niche the market of in-game maps looks interesting!

maxammann commented 3 months ago

This is closely related to https://github.com/maplibre/maplibre-rs/issues/112 which is concerned about making maplibre-rs more reusable in other rendering engines