Giter Site home page Giter Site logo

Comments (4)

cyfra avatar cyfra commented on September 12, 2024 3

Yes, you can. Using standard linux tools: Xvfb + DISPLAY + x11vnc (for example).

// In the commands below, I'm using ":1" as the display id - you can pick any number.

// This creates a "fake" framebuffer, where data will be rendered.
Xvfb :1 -screen 0 800x600x24 &

// This is "hosting" your framebuffer as VNC server (that you can use your client to connect to).
// WARNING: there are some additional options to set here, to have a secure connection.
x11vnc -display :1 -localhost &

// And then start the game - setting the DISPLAY variable, so that game is sending video to the right location.
env DISPLAY=:1.0 python3 -m gfootball.play_game

from football.

qiyuangong avatar qiyuangong commented on September 12, 2024 1

It works. 👍
But the video has a bit slower than local rendering. I guess it is related to network and VNC resolution.

Thank you very much, @cyfra .

Issue closed.

from football.

qiyuangong avatar qiyuangong commented on September 12, 2024

Yes, you can. Using standard linux tools: Xvfb + DISPLAY + x11vnc (for example).

// In the commands below, I'm using ":1" as the display id - you can pick any number.

// This creates a "fake" framebuffer, where data will be rendered.
Xvfb :1 -screen 0 800x600x24 &

// This is "hosting" your framebuffer as VNC server (that you can use your client to connect to).
// WARNING: there are some additional options to set here, to have a secure connection.
x11vnc -display :1 -localhost &

// And then start the game - setting the DISPLAY variable, so that game is sending video to the right location.
env DISPLAY=:1.0 python3 -m gfootball.play_game

Wow, thanks. Look nice.

I will try it in our local environment. :)

from football.

IouJenLiu avatar IouJenLiu commented on September 12, 2024

Hi @cyfra

With xvfb, it seems that the rendering is performed on CPU. Could we enable GPU-based rendering on remote server? Thanks!

from football.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.