Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Game Development & Artificial Intelligence With PHP

A friend of mine told me that it is possible to even create games with PHP.

Is that really possible?

Can we implement artificial intelligence using PHP?

Looking for your ideas.

Thanks

like image 386
Sarfraz Avatar asked Dec 08 '09 10:12

Sarfraz


2 Answers

Yes, PHP is Turing complete, so in theory you can create any kind of application you desire. It doesn't mean you should, though, and there are far more suitable tools out there.

like image 114
DanDan Avatar answered Oct 13 '22 13:10

DanDan


While it is possible to implement Artificial Intelligence and Games in PHP it's not optimal to do so. PHP is designed for effective Server Side web programming and as such isn't the most optimal platform to be developing Artificial Intelligence and Games on.

That said, it also depends on how you define AI, if you mean games that have AI again, it's possible but not optimal.

Programming languages are a way to express a concept, different languages are better at expressing different types of concepts. For PHP it's very good at expressing online server side scripting concepts, however it is less suited to expressing concepts like Video Games compared to more general languages such as C, C++, Java, C#, etc... (There are far more, this is just a shortlist)

If you really want online games you should consider Java which has excellent web integration while providing a better medium for creating games.

like image 24
Jake Woods Avatar answered Oct 13 '22 14:10

Jake Woods