Stephane

Server side rendering?

Recommended Posts

Hi !

I have a mobile game based on pixi.js+pixi-spine (let's call it the client). I also have a backend in node.js (let's call it the server).

Now, I want to dynamically generate gifs from my spine characters and display/send them from server's side.

I have 2 options:

  1. generate the gif files on the client, send them to the server
  2. store my spine assets on server, generate the gifs server side

I'd prefer option 2, but rendering on an headless server seems to not be a straight road. I tried quickly node-pixi, just the require is complaining about window missing.

Anybody has experience doing tis kind of server side rendering? Any suggestions?

Share this post


Link to post
Share on other sites

You may also want to consider using PhantomJS.  It's going to be much slower than in the browser (and WebGL won't be an option last time I checked) but it can often create "server-side" graphical results close to the "client-side" equivalent (and using the same code).

Share this post


Link to post
Share on other sites

I dunno about being lightweight ... the shim and other node canvas dependencies can be significant.  From my experience of server-side rendering I'd say the phantom route is less hassle, especially if using a remote service (e.g. phantomjscloud).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.