dirkk0 Posted August 29, 2014 Share Posted August 29, 2014 Hi, just a short notice that it is possible to use the programming language Python with Pixi.js (and other libraries including Three.js, Howler,js and so forth) by using Brython, a Python implementation for the browser. Here's a minimal example:http://jsfiddle.net/dirkk0/s7butdL1/show/(code http://jsfiddle.net/dirkk0/s7butdL1) Best, Dirk hubert 1 Quote Link to comment Share on other sites More sharing options...
hubert Posted August 29, 2014 Share Posted August 29, 2014 It's a killer! As far I understand all you have to do is to include the brython source and tell the interpreter that he is dealing with a different type of script and you can code in python?! LOVE IT! Quote Link to comment Share on other sites More sharing options...
Sebi Posted August 29, 2014 Share Posted August 29, 2014 Brython is pretty slow compared to PythonJS. All those libs just take Python code, then translate it to javascript and then run it in the browser. That might be convenient for a python developer but other than that, I don't see the benefit of this. Afaik JS (v8) runs 5 times faster than Python, not gonna replace JS. Quote Link to comment Share on other sites More sharing options...
dirkk0 Posted August 30, 2014 Author Share Posted August 30, 2014 @hubert: exactly - ain't that cool? :-) @SebastianNett:Exactly. That's why I intend to use both Brython and PythonJS.Brython runs in the browser on the fly and makes experiments somewhat easier. PythonJS will compile to a native JS file which is better in production.Turns out, the Brython community is somewhat more responsive than the guy who does PythonJS. I filed an issue on the PythonJS github a week ago and got no response so far. http://goo.gl/YEChlyI have Pixi.js and Howler.js running with Brython so far. I had no luck with Phaser, though. Quote Link to comment Share on other sites More sharing options...
hubert Posted August 30, 2014 Share Posted August 30, 2014 Yeah pixi and howler is the stack I use for my game. As for server side I intended to use Vertx.io since it is faster than node and has a few advantages over node when it comes to managing threads on your server. The thing is that vertix can run javascript on server side like node but it is hard to find anyone that can manage this part of the code at server side for a fair price (making games is fun and all but we're RUNNING A BUSSINESS HERE!) anyway brython shows another possiblity to reuse the code but in other direction Server side to Browser Side! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.