Jump to content

I'm creating Ruby Gems for Pixi.js


ShrewdPixel
 Share

Recommended Posts

Greetings!      TL;DR - Links to pixi.js Rails gem at the bottom, with more to come.

I'm a big fan of RubyOnRails as an application framework for a lot of reasons; It has several easy to integrate database options, it now has ActionCable for built in web-sockets, it's stupid fast for developing websites/applications, and it can easily(relatively) be deployed to Digital Ocean on the cheap using dokku.

I've already been using it to deploy games like the one I have on display in the game showcase (Loyal Online - link to post) when building HTML5 games from scratch without any frameworks. But it's been slow enough going that I've had to upgrade my approach and start learning frameworks/engines like pixi.js.  (Which I already love and am building a new one now.)

So to speed up and simplify using Rails to make HTML5 games, I've started porting pixi.js to gems that can be easily included in any Rails app. I've already gotten the main library file ported and is now featured in the rubygems.org library. (So it can now just be included in the gemfile of any Rails app and quickly be bundled in.) I'll also be setting up individual gems for the other optional components like projection, filters, sound etc. keeping with the modular nature of Rails. I'll update this thread as I get them setup and tested.

I know Ruby On Rails hasn't been considered a very viable option for making gaming apps in the past, but I'll be changing that this week. ^_^

https://rubygems.org/gems/pixi_js

https://github.com/Palmweaver/pixi_js

Link to comment
Share on other sites

Greetings once again!

I've now created the next Rails gem for pixi - this time it's pixi_projection.

I've noticed that even though I wasn't using spine2d, this will produce a type error if it's not used. But if spine2d isn't needed for your app, it still can be used at this time.

Guess I know which one I'll be porting next. ^_^ And here come the links:

https://rubygems.org/gems/pixi_projection/

https://github.com/Palmweaver/pixi_projection/

I've also noticed that the pixi_js gem has been downloaded a bunch already. Guess I'd better pick up the pace.

Link to comment
Share on other sites

Greetings Game Devs!

We've now got pixi_spine in the RubyGems.org library! So you can rock out including it into the Rails asset pipeline.

Here are the links:

https://rubygems.org/gems/pixi_spine

https://github.com/Palmweaver/pixi_spine

I really had no idea that the gems were to start getting dowloaded this quickly, so I'll be taking a break from working on my new game project to port the rest of the library over as quickly as possible. I should have the entire toolset ported in the next 8 hours or so.

Link to comment
Share on other sites

Greetings!

And now we have pixi_filters in the Gem repo. That ought to blur the lines a bit.

And here are the links:

https://rubygems.org/gems/pixi_filters

https://github.com/Palmweaver/pixi_filters

It's getting there; while it's tempting to make an all encompassing package, Rails benefits greatly from it's highly modular design. And that's one thing I really like about pixi.js; it fits that same paradigm rather well.

Link to comment
Share on other sites

Whew! Almost there.

Double header this time: we have pixi_layers and pixi_lights compiled and uploaded to RubyGems.org.

Cue the links:

Pixi Layers for Rails:

https://rubygems.org/gems/pixi_layers

https://github.com/Palmweaver/pixi_layers

Pixi Lights for Rails:

https://rubygems.org/gems/pixi_lights

https://github.com/Palmweaver/pixi_lights

Only a few more to go; I'll probably have to get some sleep before the next ones. I've been up all night studying the pixi.js library architecture and compiling these gems and I should get some rest before errors start creeping in. But we'll have the whole library online soon.

Link to comment
Share on other sites

And one more for now!

We now have pixi_sound available for bundling on RubyGems.org.

And the links are:

https://rubygems.org/gems/pixi_sound

https://github.com/Palmweaver/pixi_sound

That will be it for now; while I really want to add pixi_ui, it's listed as a WIP so I want to do some testing before trying to compile it into a gem. I was also considering tilemap but currently it's an absolute mess when it comes to iOS performance (6-10 frames per second under the best of conditions), so I'll be coding my own tilemaps for now. As for any of the other components, I'll wait until I have my next demo built; but if anyone specifically needs one before that, just message me or comment on this post and I'll put it together.

Wish me luck on building one hell of a RubyOnRails pixi.js demo this weekend!

Link to comment
Share on other sites

2 hours ago, themoonrat said:

Good luck! Don't use ruby at all, but it'll be great seeing the results of all your hard work :)

Thanks! I really love your library (I've seen your contributions on Github) and after making several HTML5 games from scratch, I'll be using it for my next project.

I believe porting them to Ruby Gems will make the library more accessible to a wider range of developers, and easier to integrate with databases. This can have the added benefit of providing more security for HTML5 games made with pixi.js. (See my response to protecting games from piracy in this post.) Also, RubyOnRails has built in web-sockets, so when combined with database functions, it's trivial to build more advanced games like MMO's with it. (Here's an example of one that I made from scratch posted to the game showcase here.) It also works with Omni-Auth (Signing in with Google, Facebook, Github, etc) which is more secure and accessible for users than taking passwords for logging in. (Tom Scott has a great 5 minute talk on Youtube on why you should NEVER take passwords here.)

I know that's a lot of links, but this is something I've been thinking about for quite some time, so there's a lot of planning and thought going into it.

Most of all, thank you for the feedback and support, and all the hard work you've put into this library. I plan on doing a demo and Youtube tutorial in the next few days, and I'll be plugging the pixi.js library enthusiastically with it.

 

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...