Discussion: Is PHP Good for Gaming?

Discussion in 'PHP' started by weilies, Aug 15, 2010.

  1. #1
    i just recently learn CakePHP and do inspired a lots by it's AJAX framework.

    i wonder is PHP suitable for browser based realtime strategy game? Even though there is no fancy 3D graphic, but if there is 5K concurrent user playing the games, and the server refresh their HP/MP or other statistic every second (realtime), can the web server support?

    Is this the reason why people use Game server for gaming?

    Thanks for all your input coz i really hope to do some research before really go in depth in design the PHP Browser game :)
     
    weilies, Aug 15, 2010 IP
  2. Googl

    Googl Active Member

    Messages:
    509
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    75
    #2
    It's today, I've realised that lot's of PHP enjoy playing browser based games. I think the web server can handle that.
     
    Googl, Aug 15, 2010 IP
  3. Thorlax402

    Thorlax402 Member

    Messages:
    194
    Likes Received:
    2
    Best Answers:
    5
    Trophy Points:
    40
    #3
    I don't quite understand the question. PHP does not have support for real-time games. All the games you play on the web are mostly developed in Flash. People run their games on specially formatted servers (game-servers) because they are accessable to the public (unlike their home PC's usually are) and they are built to handle the user load. I don't know where you have been seeing PHP used as a way to play browser based games, but perhaps you are thinking more of how sites like addictinggames.com display and organize their games on their site.

    You would be able to refresh data on a page every second or so by posting and retrieving information with ajax, but I feel like that would be excrutiatingly slow and very inefficient.

    If I am mistaken then please correct me, but I have never seen PHP used for the actual development of games.
     
    Thorlax402, Aug 15, 2010 IP
  4. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #4
    The reason PHP is not really used for games, is because its limited, you can create text based games (like the common RPG, Mafia etc.) - but their not as fun as the real thing which is why people tend to use other languages as they have extensive support for such task.
     
    danx10, Aug 15, 2010 IP
  5. Lam3r

    Lam3r Active Member

    Messages:
    235
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #5
    Those browser based RTS games you're talking about are most likely made in Flash or Java. The website it's hosted on probably uses PHP, but the game itself is most likely not developed in PHP, unless it's text-based.
     
    Lam3r, Aug 15, 2010 IP
  6. weilies

    weilies Peon

    Messages:
    453
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Yes, that was what i mean, coz Ajax allow callback server with N seconds. Let say i set it to 1 seconds refresh a portion, it could be nearly realtime.
    So we could refresh you HP while you character hit by another user, stuff like that
    Instead of REFRESH via F5

    tht's the problem coz i hv no idea how slow it's if my game is going to have this kinda callback every few seconds with thousand of concurrent user

    Mafia and those Vampire games in Facebook are in PHP. Let's forget bout how lousy PHP can support on graphic, but in term of Numbering Game (Strategy game) with simple images, is it able to create a simple game and yet can attract user and wont crash with 5K concurrent user in one web server?

    We are talking bout how well PHP and web server can go in gaming industry :)
     
    weilies, Aug 15, 2010 IP
  7. Thorlax402

    Thorlax402 Member

    Messages:
    194
    Likes Received:
    2
    Best Answers:
    5
    Trophy Points:
    40
    #7
    I haven't really played some of the more detailed games on facebook, but those games tend to be more just images with text on top of them showing relavent information. It would be possible to do something like this and have the browser refresh every-time data needs to be changed (aka. the user updates something). I wouldn't consider this a "real-time" game, but the concept you are talking about is used all over facebook.
     
    Thorlax402, Aug 16, 2010 IP
  8. chunkys

    chunkys Guest

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    No PHP is not good for gaming but Java related is good! I have used
     
    chunkys, Aug 16, 2010 IP
  9. weilies

    weilies Peon

    Messages:
    453
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    i know for sure PHP cant beat Game engine, IDE development
    But can you give some points that PHP + AJAX + JS cant do in a browser based game compare to Java?
    What Java has and PHP + AJAX + JS doesn't in develop a browser based game? (eg. a turn based game)
     
    weilies, Aug 16, 2010 IP
  10. tech_tycoon

    tech_tycoon Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    AIR technology and java will be good for gaming.
     
    tech_tycoon, Aug 16, 2010 IP
  11. Thorlax402

    Thorlax402 Member

    Messages:
    194
    Likes Received:
    2
    Best Answers:
    5
    Trophy Points:
    40
    #11
    Flash can actually work with php to store data I believe so you might want to look into that as a possible improvement
     
    Thorlax402, Aug 16, 2010 IP
  12. web_doctor

    web_doctor Peon

    Messages:
    164
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #12
    With the use of AJAX, PHP can be used for gaming but not that really good and not very interactive...
     
    web_doctor, Aug 17, 2010 IP