Game Streaming


Game streaming is much like video streaming but the difference is that the mouse and keyboard events can be captured by the server that triggers the image to change. the idea behind game steaming is to render 3D images to a pbuffer in the GPU memory, convert it to 2D object and stream the same to a client much like streaming video using VLC.

A lot of companies are doing this kind of project. Streammygame is one of the and the other is Onlive. I sort of got interested in the subject so I decided to search for possible ways of doing it. A DYI if you will. So I came across several sights dealing with the same subject matter, I compiled several forum discussions on how to implement it on a LAN environment. Right now I still don’t believe that it will work over the Internet. Too much variables to consider. So I decided to do it on a LAN environment instead.

Much of the work I have done on game streaming can be found here. The more essential part of that forum is how to install it so here goes.

  • DEB and RPM files can be found here
  • Install TurboJPEG first
  • Install TurboVNC and finally
  • VirtualGL

TurboVNC and virtualGL needs to be installed on the client machine as well. Soon as that is done start the VNC Server on the host machine. Pull up an terminal window and issue this command

vncserver

If everything is installed correctly, the following reply will be issued

New ‘X’ desktop is ubuntu:1

Starting applications specified in /home/ranch/.vnc/xstartup
Log file is /home/ranch/.vnc/ubuntu:1.log

ranch@ubuntu:~$

This means that an instance of an “X” server is running and is ready to stream a game. Note that you can create several instances (or sessions) to have several clients stream the game and play it independently of the others.

Client Machine

You need to download and install TurboVNC client on you client machine. After doing that, run the TurboVNC viewer. You will need to login to it to connect to the server. Then when the GUI of the host machine appears. open a terminal window and issue this command

vglrun <openglapplication> -opengl

This starts the applciation:

Advertisements
    • Adam
    • March 14th, 2010

    Hi, I wanted to install these applications do I need to use root to install them, I have only been using Linux for a week so I am new to it sorry to ask. I am using Xubuntu by the way.

    Great work.

    Thanks.

    Kind Regards

    Adam

    • badrra
    • March 15th, 2010

    Thanks Adam.

    No need. If you run the DEB files it will ask for authorization and that is sufficient.

    You need to make sure that your video card driver is properly installed before you proceed. You can test it by running glxgears or if compiz is working,then you’re sure that the drivers are properly installed.

    After having done so, then you can proceed with the installation process.

    The system works best in a LAN environment. I tried it over WAN, it sucks hehehehe.

      • Flemming Terkilsen
      • September 23rd, 2010

      Hi Badrra

      I was wondering if this could be used for a more like teaching environment.

      Like my teacher is showing some work ways on His Computer, of how to Texturing a 3D Model in Maya (3D Program) to us (24 pc on lan) which would help us a lot

      It’s a Xp system we all have installed, included Maya software..

      Thanks in advance

      Flagmo-T aka Flemming Terkilsen..

        • badrra
        • September 24th, 2010

        The server should be a Linux machine. Client machines could be anything from MAC, Linux, Windows or even handheld devices (PSP, iPhone, etc.) The only pre-requisite is that the server is a Linux BOX. If the application (Maya) is running on Windows, then this will not work. However, you may want to try running Maya on Linux using Wine, or you may want to run Windows virtual machine on Linux and run it from there.

        Hope this helps.

    • Adam
    • March 15th, 2010

    Thanks for your reply.

    I don’t want to sound silly or anything but how do I get games to stream through the network, for example, I want to be able to stream Command & Conquer Tiberium Wars through VirtualGl so then my sister can play on it without me installing it on her computer. Do I have to point VirtualGL to the game or something sorry if this sounds like a silly question but I really am new to Linux lol. Command & Conquer Tiberium Wars runs pretty well through Wine so at least I know the game works on Xubuntu. glxgears also seams to be working fine, I’ve installed the latest Nvidia Graphics drivers on my computer.

      • badrra
      • March 16th, 2010

      From your sisters PC, run vncviewer. It will ask for servername and password. That will be your vncserver name and vncpassword. then you will be able to access the desktop of your Xubuntu.

      Forgot before that, create a link to the game say “wine game-name vglrun”

      Just click on the link you created and the game starts automatically on your sister’s PC.

      Edit: Sorry its vglrun “name of the game”. You can also try it in Xubuntu. after running vncserver, run vncviewer and do the same thing.

      Have fun.

    • Adam
    • March 17th, 2010

    Thanks for your help,

    I just formatted my computer to start fresh and before I formatted it I had a Terminal box within TurboVNC Viewer, now I don’t have one i’m guessing it’s meant to be there to type in the commands? I also tried vglrun wine “cnc3.exe” in Xubuntu itself to see what would happen & I got this error “wine: Module not found”.

    Again thanks for your help.

    • Simon
    • April 22nd, 2010

    Silly question sorry, but if I already have vnc4server installed do I need to remove this before installing TurboVNC?
    Keen to give this a go!

      • badrra
      • April 22nd, 2010

      You don’t have to it will not run in conflict with any other VNC servers. But you nee to go to the TurboVNC directory and run the servers from there just to make sure you are running TurboVNC.

      But you can also give vnc4server a try. It could be faster.

    • Simon
    • April 23rd, 2010

    Thanks for the response. My server currently only has a hulking 16mb ATI ES1000 on board, so need to test with something very old school first that it can actually run 🙂
    Will try to do over the next week.
    If it works ok I’ll get a proper nvidia card.
    Cheers.

      • badrra
      • April 26th, 2010

      Can you run glxgears on it? If so then it will run.

    • Simon
    • April 26th, 2010

    No, not yet. Ubuntu 10.04 just hit RC, and I read ATI drivers yet to be fully implemented. Trying to get an old nvidia card to play with. Let you know how I go, could be another week.
    Cheers.

    • nooewbie
    • August 30th, 2010

    Hi, i would like to ask you isit possible to set up for multiplayer games instead?

    Streammygame as far as i know does not support multiplayer games.

    Also, to implement this kind of thing, would it be better off to code a program or to do virtualisation using multiple virtual machine and each client with its own VNC software to connect to the vnc in the virtual machine to do multiplayer server rendering games.

    • rnbguy
    • January 4th, 2012

    how will one do this to stream windows platform games such as fifa2012?

      • badrra
      • January 5th, 2012

      Try installing it on a linux machine then stream the game from there.

    • Wimma
    • January 5th, 2012

    How does input work (k/b, mouse equivalent) using a PSP or iphone?
    Also, what VNC client does that use?
    Is there anything that would enable an android device to be the client?

      • badrra
      • April 5th, 2012

      I used turbo vnc in psp but you can use any vnc client available. Android will definitely work.

    • Kristian
    • March 3rd, 2012

    How many fps do you get in WoW when you steam it? 🙂
    You have tried over wan have i read, is delay to big or what seems it suck? 🙂 Tried with fiber?

      • badrra
      • April 5th, 2012

      Very low. You need a lot of bandwidth to do this over WAN. 10 Meg or more. Connection quality is also a must.

      • badrra
      • July 1st, 2012

      really slow. not promising at all. perhaps in the near future.

      • badrra
      • September 18th, 2012

      fps is low over WAN definitely not recommended. Fiber? no. Over a LAN connection with a gigabyte router I haven;t really tried but I am sure it is going to be good.

  1. I’ve been browsing online more than three hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me.
    In my view, if all web owners and bloggers made good content as
    you did, the internet will be a lot more useful than ever before.
    |
    I could not refrain from commenting. Well written!

    |
    can I use this post on my site?

  2. Hi I am so grateful I found your website, I really found
    you by mistake, while I was searching on Yahoo for something else,
    Anyways I am here now and would just like to say thanks for
    a marvelous post and a all round entertaining blog (I also love the theme/design), I
    don’t have time to read through it all at the moment but I have book-marked it and also added your RSS feeds, so when I
    have time I will be back to read more, Please do keep up the
    great jo.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: