gym-mupen64plus icon indicating copy to clipboard operation
gym-mupen64plus copied to clipboard

Adding VNC documentation

Open Redrew opened this issue 4 years ago • 5 comments

Hi, can you add some information in the README on using VNC to view the emulator? I am trying to use the environment for a project and am having quite a lot of issue with this. Thanks

Redrew avatar Apr 21 '20 03:04 Redrew

Hi @Redrew, how are you running the environment currently?

Prior to adding a docker setup, I did have a readme section on using VNC. You can still see that here.

Unfortunately, it isn't quite as straightforward with the current instructions when using docker. However, a few months ago, I put together a configuration using docker compose, which does run the VNC server as well. That hasn't been merged yet, but is available here. The readme is updated in that branch as well. It is a little light on info about VNC, but may be better than nothing.

Let me know if that info helps, how you're running the project, and what issues specifically you're encountering. A little more detail will help me know what I should add to the docs.

bzier avatar Apr 22 '20 03:04 bzier

Hi @bzier, I am running the environment through docker using your standard instructions. Should it would if I just copy your docker-compose file from your branch and run it?

Redrew avatar Apr 23 '20 07:04 Redrew

I have another question, tell me if I should open another issue for this. Is there support for CPU vs CPU play in the Smash emulator? I want to record gameplay for training my Smash reinforcement agent.

Redrew avatar Apr 23 '20 07:04 Redrew

Hi @Redrew. I apologize for the insanely long delay in responding to you.


Regarding the original question:

How to connect with VNC when using the 'standard instructions' running via Docker?

Assuming you are running a container with the command documented here, this is what I would suggest:

  • First, add the -d switch to the command. This will run in 'detached' mode so your terminal is not hooked into the stderr/stdout of the container.
  • After the container is running, drop into a bash shell inside the container and run the VNC server:
    # from your host shell prompt (e.g. `user@host$ `):
    docker exec -it test-gym-env bash
    
    # inside the container shell prompt (e.g. `root@02b1b2cc25da:/src# `)
    x11vnc -display :0 -forever -viewonly -shared -nopw -q &
    
    # after the process is started, you can exit the container shell
    exit
    
  • Check the port that was mapped to your container:
    docker ps | grep test-gym-env
    
    You are looking for the port which was mapped to 5900 (e.g. 0.0.0.0:55009->5900/tcp) - in this case 55009.
  • Use a VNC client to connect to localhost:55009

Regarding the second question:

Should I just copy your docker-compose file?

I am hoping to merge PR #74 this weekend. The README has been updated to hopefully provide clear instructions on using that approach. I can't say for sure if it would all just work simply copying the one file, but either way, once the merge is complete, it should all be good-to-go. I have had that PR hanging over my head for way too long, and it is about time to get it behind me.


Regarding the third question:

What about CPU vs CPU?

If you mean a multi-agent setup, this is not yet supported, but there is an open issue for it (#67). One of the problems originally was that the input plugin only supported a single controller. That has since been addressed, so it should be possible to implement, although it isn't clear exactly how to fit it into the current architecture. Discussion around that topic can happen in #67.

If you mean something else by CPU vs CPU, please let me know.


Again, my apologies for taking forever to come back to this issue. Hopefully you were able to get things working in the meantime.

bzier avatar Jan 31 '21 01:01 bzier

As far as the documentation is concerned, I could certainly add those steps above, but I think I would prefer to rely on the docker-compose setup for running each of the separate processes. Let me know if you think it is still worth adding what I shared to the README.

bzier avatar Jan 31 '21 01:01 bzier