Can Python be used to create multiplayer browser-based games? [closed] - python

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am interested in creating a multiplayer browser-based game for academic research, but am mainly competent in Python (with experience in PyGame).
I am aware of PyJS (http://pyjs.org/), but am not sure if that can handle asynchronous, multiplayer collaboration.
Is this doable in Python?

Pygame will be of no use to you here. You could probably do it (sockets won't be very useful to you either) I don't suggest it though.
If you learned JavaScript you would find your task much easier. Creating a game would require a canvas and that is JavaScript's specialty, even the web-frameworks such as Flask and Django don't inplament them, so eventually you will probably find yourself writing a lot of JavaScript anyway, games are very complex sooner or later your will find some hitch that will not be inplamented and will be forced into writing JS anyway.
Then you would probably need logins or a way to save scores. This is where Python can be useful, you could send all the information to be processed server-side in Python. This has been done before and is reasonably easy.
If you are talking about a 3d game don't, you will need some form of 3d engine such as three.js, those will be coded in JS (you will find all online engines are inplamented in either JS or Jquery) and those will cause endless headaches if you try to use one of those in Python.
If you want to develop an online in-browser game you will need to know some JavaScript knowledge at some point or another, Python is excellent server-side and good client-side as well, however games are extremely complex at the best of times with graphics and all. It is not like a web-page, this is an enormous task to undertake (even armed with all the web-development languages -HTML/CSS/JS/Jquery/AJAX/SQL/AngularJS this is an enormous undertaking), and using Python just makes you task much much more difficult, you will go though a lot of hassle and in the end, if you ever do survive it, it would probably have been easier to learn JS and use that.
Server-side, yes go for Python, if it is client side you need JavaScript.
If you still decide to do this start with a simple 2d single player game like flappy bird or tetris and then progress to something harder.

Related

How to protect my ren'py project from being copied? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
For all those who are not familiar with ren'py: It's basically python with some modifications. Since the project is coded in python, which can easily be edited by anyone it is not a good idea to include a license validation in the python files.
An executable starts the game, so I thought about wrapping it with a license validation in an .exe (but I honestly don't know how I can take an executable, put some code around and have one executable including the actual one). Maybe there is another way, which is safer than the one I named, suggestions?
You don't. Ren'Py only features basic encryption to prevent players from accidentally deleting/modifying files.
As security, game encryption isn't a fight worth picking. You have to decrypt the files to run them and that will always be a weak point to exploit. Anything you put on top is just delaying whoever wants in. You can write your game in binary and it will do exactly squat to someone who really wants to take it apart.
Ren'Py is designed to be mod friendly. Nothing you do will stop someone from dropping a rpyc file into the game directory and hooking into the game. Even if you modify the engine to only read specific files, you won't stop someone who can just insert the functionality back in. All you're really doing is making it more difficult to preserve the game after you're dead.
Nintendo can't stop people from extracting assets from their games. You don't stand a chance. You should hope to be so lucky as to have people interested enough in your game to want to mess around with the assets and code.
If you're talking about a license players need or some sort of login mechanism, you need to implement an online server to validate the credentials they input. There is no secure front-end way to validate credentials.

What technologies I may use to write drum-pattern audio signal based recognition program? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
as stated in the title of the question - What technologies I may use to write drum-pattern audio signal based recognition program? I want to create a tool for me as a drummer musician to transcribe a drum-part from a record. I imagine this as similiar technology to speech-recog but made especially for drum patterns previously defined in some kind of a drum pattern base.
The problem is Im a very beginner in programming. For half year i was interested in microcontrollers with basic c++, not even OOP. Currently im trying out python and this is my final programming knowledge/experience background. Now because of that poor level of know-how in IT, I dont really know what technology, frameworks etc I should get interested in with this kind of a project. It may be obvious that I should look for speech-recognition technologies and learn that and then apply that knowledge to build my own program, but Im not really sure where is the best place to start and if im ready for reading heavy walls of professsional open source projects code. Maybe there is some kind of a friendly python framework to get me started in that topic? I found Python Librosa framework in my research but it seems really advanced and it looks like i should learn signal-theory to get fluent in using that. Let me know what do you think and what kind of tactic should i aim to in your opinion.
The task of transcribing music automatically, from audio into notes (typically MIDI), is known in the research community as Automatic Music Transcription. The specialized task of doing it on drums only is known as Automatic Drum Transcription (ADT).
ADT is widely researched, and both open-source and commercial solutions are available. One open-source software can be found in ADTLib. It provides a very simple Python API that takes a WAV file and returns transcribed drum track. There are papers linked in the README file, describing how it is put together.
A web-based tool called ADTWeb allows to try out transcribing drums without installing any software.
Note that ADT usually assumes an input that is only/predominantly drums. If you want to extract drum patterns from a mixed song containing also other instruments, you mayb need some kind of Source Separation step as well.

Python Game Libraries [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
First off please do not mark this topic as a duplicate. All the relevant threads are years old. I would like updated information.
What are the pros and cons of the following libraries?
I am aware of:
PyGame, seems to be the most popular but the website is full of
broken links and no news in awhile.
Cocos2D Python, Seems good as cocos2D is all the rage right now.
Almost no support though and the stack overflow pages only seem to
get a post every couple weeks.
Pyglet, This is the only one I never tried as Cocos2D seems to use
Pyglet. Seems to update more then the cocos2D python stack overflow
but less then the pygame.
Other? Rate a better library!
I am looking for information on ease of use, preferably pythonic and up to date. But perhaps most importantly active.
Pygame and Pyglet are definitely on the radar.
Pygame
Great, popular game engine. No support for a variety of file types. But it's no longer maintained.
Pyglet
Very powerful, high support for many files. Thorough documentation. OpenGL support, intuitive.
Cocos2D
I really feel that Coco2D is just an unnecessary medium to use the underlying Pyglet engine.
After working with Pygame, Cocos2d, and Pyglet to create a series of games, I would have to recommend Pyglet.
Cocos2d and Pygame were very unwieldy. On the other hand, pyglet has a very neat API, enjoyable to work with, and very 'clean'.
It also has no external dependencies, and is wrapped on top of OpenGL, allowing you to do some pretty advanced special effects.
You can view a game (along with the source code) I created with Pyglet here.

Is it possible to implement heuristic virus scanning in Python? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am trying to create a virus scanner in Python, and I know that signature based detection is possible, but is heuristic based detection possible in Python, ie. run a program in a safe environment, or scan the program's code, or check what the program behaves like, and then decide if the program is a virus or not.
Python is described as a general purpose programming language so yes, this is defiantly possible but not necessarily the best implementation. In programming, just like a trade, you should use the best tools for the job.
It could be recommended prototyping your application with Python and Clamd and then consider moving to another language if you want a closed source solution, which you can sell and protect your intellectual property.
Newb quotes:
Anything written in python is typically quite easy to
reverse-engineer, so it won't do for real protection.
I disagree, in fact a lot but it is up for debate I suppose. I really depends how the developer packages the application.
Yes, it is possible.
...and...
No, it is probably not the easiest, fastest, best performing, or most efficient way to accomplish the task.
Well, sure it's possible. Python is turing-complete, so you can use it to the same ends as you can use other programming languages like C++. And you can certainly do a primitive signature-based or code-inspecting check in Python without great difficulty. So the answer to that question is yes.
Now for the deeper question: are you asking whether Python is a good tool for this job? I don't think so, primarily because Python Code is Hard to Obscure, which means that if you develop an anti-virus in Python, it becomes weak the moment you give it to other people. That's because a virus developer will find it easy to inspect your anti-virus engine, since you will not be able to obscure your python code. That means that they can find vulnerabilities in your virus scanner easily.
Indeed, one of the key components of a good anti-virus is making it as hard to reverse-engineer as possible, so that virus developers won't figure out what the weaknesses of your anti-virus engine are. Anything written in python is typically quite easy to reverse-engineer, so it won't do for real protection.

Finding the least busy open wireless network: which language to pick for this weekend project? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am a web developer (PHP/Javascript) and to increase my skill set, I would like to learn a new language. I have a simple test project in mind for this, so I can learn more about (wireless) networks and Linux, something I'm interested in as well.
I have specced out my project like this:
Look at all the open wireless networks in my area, and determine which one is the least busy (i.e. has the least data traffic), then list its ESSID. Do this by putting the wireless interface in monitor mode, and collect statistics about which access point receives/transmits the least TCP packets.
I think this would be a fun, simple way to get the "best" access point to connect to. I'm sure there are better ways to reach that goal, but this would cover all the things I want to learn about.
I am working in Ubuntu, and would like to learn Python or Ruby with this project. I have done a bit of research, and I think I'll need (a wrapper for) libpcap to sample the amount of data. I would also need to address iwconfig to change to the next channel, and look for packets there.
So, my question is: is there an ideal language for this? Is it possible to do this "inside" a language, without having to break out of it to issue a command line command like "iwconfig"? Any advice in general?
My preference is Ruby, and that is because it is my preference. However, there are lots of libraries availble in each language. See:
http://www.scribd.com/doc/56319311/Programming-Wireless-Security-32813
also
Which of these scripting languages is more appropriate for pen-testing?
I don't know much about Ruby, but I'm sure that Python could do what you want. In regards to stepping down into OS/CLI land, I would have a look at the os and subprocess modules. The subprocess module will let you call arbitrary binaries (such as iwconfig) from python and collect their results.
Python is fun to learn. Good luck.

Categories

Resources