Will Python (run in a browser) handle an RTS's game window?


If Python can be run in a browser,

Will my RTS client's game window be playable? - how? - browser window? - in its own window?
It looks like printf's are written to the browser window, but will Threading occur normally?
I'll keep my invulnerable RTS server in Java. And do a client in pure Python now. Will it be as good as in Java?
Who is Participating?
Not sure what you mean with: "Python running in a browser"

Am also not sure what your exact objective is:

You want to write python code, that is running on a client, but you don't want to install python?

You want to have a python client, but be able at the same time to do partial rendering with HTML / javascript?

So please correct me if I'm  not answering to what you're actually interested in.

If you mean the equivalent of Java Applets (Java running in a browser if the java plugin is installed), then no. At least I'm not aware of any native python running within a browser.

A pure python client could use for example Pygame / Gtk / PYQt / PySide or any other frameworks and connect to game servers / web servers.

Some of them allow to instantiate  a browser widget. PyQt  Pyside and PyQtk for example allow you to have a browser window with javascript and full DOM access and you can call python code from javascript.

There is trinket.io which is python in a browser without installing anything locally, but up to my understanding (I'm not 100% sure) the code is saved on trinket.io's web server and the python is actually translated to python. So I think this will not be anything useful  performance wise.

skulpt and brython are also just javascript applications, that translate python to javascript on the fly. So I guess that the performance is reduced and that you will not have access to many python libraries.

Most browser games, that I'm aware of are written in javascript (or close derivatives, that are translated to javascript like typescript / coffeescript) with the help of some javascript framework  and communicate with a server written in any language of your choice (C, Python, Java, ruby, .net, go, nodejs )
beavoidAuthor Commented:

Reading the expert answer I received again, please can you select it as the solution and award the points
David Johnson, CD, MVPOwnerCommented:
which is correct you want to award the expert points or you want to delete the question?
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

beavoidAuthor Commented:
gelonida main answer and close normally

Plz put "thanks" as my closing comment
beavoidAuthor Commented:
I need a python browser entity to do pygame well. Is that not a problem?

beavoidAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.