Jump to content

Realtime winline effect


Jonny Shaw
 Share

Recommended Posts

Hi all, just after a bit of advice on how best to handle something like the realtime winlines below for a slot game...

https://prnt.sc/hpfo74

I currently have it working with PIXI Graphics line to based on the grid which works fine - but leaves little for styling.  I've used the glow effect from PIXI-Filters, but that only seems to work on iOS and desktop (Android chrome on a Note 8 refuses to render the lines when the filter is enabled).  In previous games I've used simple 9 sliced sprites rotated with different widths to join the sections - but not sure what other methods I could try out here? and which would be the best performance wise too?

Thanks in advance!
 

Link to comment
Share on other sites

PIXI supports 9 sliced sprites too (http://pixijs.download/dev/docs/PIXI.mesh.NineSlicePlane.html) and you might have more success with filters on sprites than on Graphics.

As always with WebGL, performance is best when you are making consecutive draw calls using the same base texture. Filters will always break that batching, so if you could put one filter over all of your sprite draw calls, rather than 1 filter per line, then that'd help

Link to comment
Share on other sites

5 hours ago, themoonrat said:

PIXI supports 9 sliced sprites too (http://pixijs.download/dev/docs/PIXI.mesh.NineSlicePlane.html) and you might have more success with filters on sprites than on Graphics.

As always with WebGL, performance is best when you are making consecutive draw calls using the same base texture. Filters will always break that batching, so if you could put one filter over all of your sprite draw calls, rather than 1 filter per line, then that'd help

brilliant many thanks, yeah have already used 9 slicing quite a bit so will go that route, probably little need of a filter as its a simple glow for now so will just bake it into the png.  Thanks for the tips on the draw calls though - anyone come across a way of counting the draw calls in chrome?  Tried a couple of webgl extensions but none seem to work with PIXI for me

 

Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...