godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.34k stars 21.06k forks source link

Live wallpapers in godot #30453

Closed distantforest1 closed 4 years ago

distantforest1 commented 5 years ago

Hi I was wondering if it was possible to get live wallpapers working for godot. It would be fantastic as I've wanted to make some visually stunning live wallpapers for a while now and I'm sure there are many people out there who'd like to do the same.

It should be theoretically be possible, here are some examples done in Unity and Libgdx. The libgdx one is probably more useful.

Unity Live wallpapers https://github.com/PavelDoGreat/Unity-Android-Live-Wallpaper

Libgdx live wallpaper https://github.com/libgdx/libgdx/blob/master/tests/gdx-tests-android/src/com/badlogic/gdx/tests/android/LiveWallpaper.java

I tried to have a go at it myself, but the code is a little over my head at the moment. What do you guys think?

volzhs commented 5 years ago

https://www.facebook.com/groups/godotengine/permalink/740260046110592/ there was someone actually made it in 2016. I think it's more like tutorial documentation, not a feature of engine.

Chaosus commented 5 years ago

If I understood it correctly its just an export manifest modification - then this can be done automatically by engine

distantforest1 commented 5 years ago

If this is a tutorial documentation I would gladly help contribute, but I just need help getting there.

From what I can tell if I can get Godot to work on a WallpaperService.

package org.godotengine.godot;

import android.service.wallpaper.WallpaperService;

public class WallpaperTest extends WallpaperService {
    @Override
    public Engine onCreateEngine() {
        return new WallPaperEngine();
    }

    public class WallPaperEngine extends Engine {
        // How to get Godot to run here? 
    }
}

The possible candidates to put into the WallPaperEngine are these two:

If someone could provide me with a hint I would be ever so grateful. From what I can tell we just need to get godot working in a wallpaper service or in Engine.

girng commented 5 years ago

i think this is really use-case specific and would be better off as an addon

The5-1 commented 5 years ago

I am entirely inexperienced with android and pretty new to Godot as well. But to me it appears to be a matter of providing a dedicated export template APK which starts a WallpaperService and in the WallpaperService's Engine, overriding the methods to call Godot inside of them rather than using the the passed SurfaceHolder. Like in the Unity example @keenfoong listed.

The5-1 commented 4 years ago

Bumping this for 3.2. I am currently on 3.2 beta 1 and try to wrap my head around how to make use of the Godot activity inside a WallpaperService or rather WallpaperService.Engine. My first though was to just instantiate a Godot Activity inside my WallpaperService but not sure if that can even work. Since most members are private I can not access things like getSurface() or the GodotView anyways.

johnnyjmcivorv commented 4 years ago

bumping this. i would love to have live wallpaper support :)

akien-mga commented 4 years ago

Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.

The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.

If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!