Plenty of games and applications are written in PHP and plenty of games and applications are written in Python. You can write good code in both and bad code in both. Was there something in particular that was pushing you to switch even though you've already finished a project?
Upgrading from version 1 to version 2. Didn't know if there were new ways to write stuff that would make it more compiled and less "messy" coding.
I'm even considering redoing a new game based upon this code, just rewriting it.
It stems, though, primarily from the fact that I'm an intermediate PHP coder at best, and I've gotten to the point where I have to keep looking up stuff on how to code "this or that", whatever project I'm working on.
I'd like to keep learning things on my own, though if someone wanted to be "unbored" and help me out, that'd be cool too. (not asking for that, though, but if people are interested…)
My primary question was just if there is something that would make me learning more advanced stuff easier, such as a new language or making it run quicker (aside from getting a VPS).
Well, no matter what language you choose, you'll still have to learn stuff, look things up, etc. Personally I find Python to be a nicer language than PHP, but of course if you don't know it yet you'll have to start over in terms of learning. Like I said earlier, you can write messy code in pretty much any language; code messiness is often a factor of the coder, not the language. :smile: The best suggestion I have there is to be disciplined and just try to write cleaner code.
As for running faster, changing languages probably won't really help you, at least not dramatically. You can speed things up by improving code and algorithms; my guess is that your algorithms/data structures are where slowness is coming from, not the language itself. A common example is using searching a list for a single object many times, instead of using a set data structure of some sort (that might use a BST, hash table, or something else).
I would stick with what you know unless you have a compelling reason to change. You might want to try some Python (or any language) on the side to get a feel for it and see how you like it. You might find that you really like some other language, in which case changing might make sense. Just watch out for the "grass is greener" syndrome: make sure that you aren't preferring something just because it's different.
As for how you might actually rewrite the code, you can either try a literal piece-by-piece translation, which will probably be easiest but lose some of the gains. A harder approach, but better in the long run (probably), is to rewrite it from scratch having learned what you've learned. Just make sure you know the target language before you do this, or you will end up writing messy code as you learn that you will have to fix later.
Considering you're using php I can certainly understand wanting to switch. I think saying python is nicer than php is an understatement. That being said I agree with david and the notion that your code is probably the source of the problem. Not the language. Often times elegant and easy to read code is near-optimized code. So I suspect both of your problems are related. Or at least once you're writing better code some of these problems disappear. I won't discourage you from learning many languages, though.
PHP is likely to be faster than Python for web server applications because more servers have it built-in. If you use Apache, make sure you use mod_python (mod_php more or less comes by default) – it embeds Python directly into the server so that it doesn't have to start up separate processes each time, which can make a very big difference for performance.
You might also consider Ruby, Lua, or even something like Java. Java is heavier and harder to deploy on a web server, though, and usually requires a fair bit of extra stuff like Tomcat. Regardless of the language you choose, it will be very useful if you either have control over the web server in question (to install modules like mod_python) or have a system administrator who is friendly to requests for installing stuff.
Other than those two things, I really like your idea.
You may be best off sticking with what you know, there will be a big time investment in learning something new
I would have to disagree with this assertion. In fact, I think that learning multiple languages / frameworks will only aid your efforts. Learning the basics of web development is the most important part. Design patterns like AJAX are available using these same basic web components. The same can be said for Ruby, PHP, .Net, etc. Of course, that doesn't mean that you shouldn't choose the right tool for the job.
By just sticking with "what you know", you might be limited. For example, if you decide to use long polling, PHP may not be your friend.