Can a game be made using PHP?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 30

Can a game be made using PHP??

16th Feb 2018, 11:41 AM
Aditi Bansal
Aditi Bansal - avatar
18 Answers
+ 19
thanks everyone for your suggestions
18th Feb 2018, 3:29 AM
Aditi Bansal
Aditi Bansal - avatar
+ 7
If you want to travel from New Delhi to Mumbai, you can do so by taking flight, train, bus, car, bicycle, walking and so on.. However, if you choose to travel by walking it definitely won't be a smart choice so, you will consider either flight or train. Similarly, almost every programming language is capable to do almost everything that any particular programming language can do. However, there are few languages which makes certain tasks easier for the programmer and hence are preferred. So yes, you can make games in PHP but you have other better and powerful options for this purpose. Hope this will help. Ashish
17th Feb 2018, 6:15 PM
Ashish Kumar Jha
+ 7
yes, but PHP is not meant for that!, you d be able to do so less, try exploring canvas in HTML5 with js, any good graphics library with C++ or java swift. if it's js u pick , then there are tons of resources here
18th Feb 2018, 8:03 AM
Morpheus
Morpheus - avatar
+ 4
PHP is not used to create games. It is used for server-side programming on websites. You can probably create a basic game of Tic Tac Toe with PHP, but you cannot create big games (Call of Duty, etc.).
19th Feb 2018, 1:18 AM
SOMEAWESOMEPROGRAMMER
SOMEAWESOMEPROGRAMMER - avatar
+ 3
yes, need to learn and learn
16th Feb 2018, 12:02 PM
***
+ 3
@Ashish Thanks✅✅✅
9th Mar 2018, 11:58 PM
</>
+ 2
Depends on the complexity of the game
17th Feb 2018, 3:20 PM
Sumit Kumar
Sumit Kumar - avatar
+ 2
I am thinking we can do
17th Feb 2018, 5:08 PM
ABINASH PANDA
ABINASH PANDA - avatar
+ 2
PHP is a server side language. You would use it for important parts like tracking the count of gold or general player statistics. You cannot use it to create games though. Once the players gets something sent to their browser, the PHP script closes.
18th Feb 2018, 9:39 PM
Private [GER]
Private [GER] - avatar
+ 1
a game I think ... if we make ,it is not interesting ...
19th Feb 2018, 6:56 PM
suneel singh
suneel singh - avatar
+ 1
but your query is very nice. .. beound the things
19th Feb 2018, 6:57 PM
suneel singh
suneel singh - avatar
+ 1
What you by saying game? It depends mostly best games are made by game engines like Unity, Unreal, CryEngine and etc. but if you want to create simple games you can even use HTML5 and PHP Note: Unity language is C# and JS
20th Feb 2018, 12:40 AM
Hasan Parasteh
Hasan Parasteh - avatar
+ 1
Hey there, yes a game can be made in php. Like Game => A basic die roller 1. Using the mt_rand() random number-generator function function roll () { return mt_rand(1,6); } echo roll(); Then we can pass the type of die we want to roll as a parameter to the function. 2. Passing the type of die as a parameter function roll ($sides) { return mt_rand(1,$sides); } echo roll(6); // roll a six-sided die echo roll(10); // roll a ten-sided die echo roll(20); // roll a twenty-sided die From here, we can go on to rolling multiple die at once, returning an array of results, or rolling multiple die of different kinds all at once, depending on our needs. But this simple script can be used for most tasks. THANK YOU.
26th Feb 2018, 10:22 AM
Lokesh Sharma
Lokesh Sharma - avatar
0
tic tac toe, yes Call of duty style game... no.
18th Feb 2018, 5:42 PM
DeleteThisAccount
0
hi everyone
19th Feb 2018, 8:43 PM
KAITO
KAITO - avatar
0
yes
25th Feb 2018, 1:42 AM
Mona Mostafa
Mona Mostafa - avatar
- 2
With PHP, they had made an open-source game engine (such as Unity) be downloadable, so I think you can download the Unity or others to make the game which you want.
18th Feb 2018, 6:08 PM
Matsumoto
Matsumoto - avatar