Skip to content
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

No SDL in current binary #12

Open
d9w opened this issue Sep 5, 2020 · 6 comments
Open

No SDL in current binary #12

d9w opened this issue Sep 5, 2020 · 6 comments
Assignees

Comments

@d9w
Copy link

d9w commented Sep 5, 2020

Hi,

I was wondering why SDL=OFF was provided in the current build_tarballs.jl in ArcadeLearningEnvironment_jll.jl? I realize this makes SDL a requirement, but since it is a requirement for the base Arcade-Learning-Environment that seems reasonable to me. Without it, this package can't render games (or at least as far as I understand), since setBool(ale, "display_screen", true) fails when not using -DSDL=ON.

@findmyway
Copy link
Member

@jbrea might know more details about the build_tarballs.jl file.

@jbrea
Copy link
Collaborator

jbrea commented Sep 10, 2020

I never needed rendering through SDL, because it is rather easy to render the images directly in julia (see e.g. here). What is your usecase?

@d9w
Copy link
Author

d9w commented Sep 10, 2020

Hi, thanks for the quick response. My use case is displaying video of trained agents, which I do using

function record(ale, directory::String)
    setBool(ale, "display_screen", true) # for live display
    setBool(ale, "sound", true) # for live display
    setString(ale, "record_screen_dir", directory) # for recording
    setString(ale, "record_sound_filename", string(directory, "/sound.wav")) # for recording
end

I'll admit that I hadn't seen that definition of display. I find that the overhead of getScreenRGB is high compared to displaying the ALE with SDL and the flag setBool(ale, "display_screen", true), but I don't have the numbers right now and I haven't tested the rest of this display function.

Also, without SDL, I don't think you can get sound, ie use the setBool(ale, "sound", true) flag, although maybe there's a way to recover the sound from the ale Ptr? It seems a shame to wrap that when the ALE already does it though.

@jbrea
Copy link
Collaborator

jbrea commented Sep 10, 2020

OK. This requires a bit of work, because we don't yet have SDL_jll. There is already SDL2_jll, but it is incompatible. Once we have SDL_jll it is most likely a very simple PR to change ArcadeLearningEnvironment_jll. I can probably have a look at this at some point during the next 14 days, but please feel free to go ahead yourself, if you find the time.

@d9w
Copy link
Author

d9w commented Sep 20, 2020

so here's the SDL_jll:

JuliaPackaging/Yggdrasil#1685

unfortunately it doesn't compile on all systems, so if you want to look into it further feel free, otherwise I think it would be okay to use it in the ALE given the systems it does support

@aviks
Copy link

aviks commented Dec 19, 2022

Been a while, but we now have libSDL available as a jll via SDL12_compat JuliaPackaging/Yggdrasil#6003 if you folks are still interested.

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