+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: New PHP Game site

  1. #1
    sclewin's Avatar
    sclewin is offline x10Hosting Member sclewin is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Ontario
    Posts
    88

    New PHP Game site

    Hi,

    I recently learned about PHP, Javascript, and MySQL and put together a test PHP/MySQL game. I am now all hyped up and want to write a online PHP strategy game and, if possible, would love any suggestions or warnings.

    First, is that allowed on the x10hosting. I went through the commandments and could not see any problems, but want to make sure. I know I need an advertisement on every page.

    Second, I will be using a MySQL database to save the player information. Any suggestions in keeping down SQL traffic would be of GREAT help. Also, how much MySQL traffic is considered not bad and how much are we allowed? Is this part of hour web page bandwidth? Or is Databases treated differently? X10Hosting haves been so great, I want to make sure I am as good to them as they have been with me.

    I am also thinking about putting some of my ads on the page, if allowed, if the game becomes popular. I will probably start with a link to x10Hosting and try to gain referrals, but, possibly adds Google ads or similar later. Is this allowed? Are there any good advertisements plans that are recommended? Also, how many adds are considered uncomfortable? I don't want too many ads, the page after all is to be a good game, not for ads.

    Any advice/help will be greatly appreciated.

    Your friend,
    Scott

  2. #2
    legendphil is offline x10 Sophmore legendphil is an unknown quantity at this point
    Join Date
    Aug 2007
    Posts
    152

    Re: New PHP Game site

    hao!

    you must be some kind of a genius! what type of game will it be? are you working with a team? if you can afford you can sign-up for a development package in x10hosting. I don't know the features of that package but that seems well for your endeavor (the limited offer thingy makes me think its really awesome).

    I think you can save bandwidth by compressing php I saw it from a manual before I kinda forgot the details <again>. Anyways there's always http://php.net for studying php deeper.

    SQL traffic... hmm... I wonder.

    regardless of the type of account, your ads are allowed (for me this is an eye-catching feature I saw before I signed up)
    Last edited by legendphil; 10-15-2007 at 10:37 AM.
    LEGENDMKII
    still beginning (or re-beginning if that's a word)...
    http://legendphil.net
    http://legendphil.co.cc

  3. #3
    sclewin's Avatar
    sclewin is offline x10Hosting Member sclewin is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Ontario
    Posts
    88

    Re: New PHP Game site

    Quote Originally Posted by legendphil View Post
    hao!

    you must be some kind of a genius! what type of game will it be? are you working with a team?


    You must be thinking of a much bigger game than I am I am thinking of a simple text based game that is fun to play. I have no team, just any advice I can find from good helpful people.

    Your friend,
    Scott

  4. #4
    flinx is offline x10Hosting Member flinx is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    68

    Re: New PHP Game site

    Quote Originally Posted by legendphil View Post
    I think you can save bandwidth by compressing php
    Compressing PHP or not has nothing to do with bandwith, but with how much space the scripts occupy. But usually it's not the scripts that occupy a lot of space. It's the DB, and files (images, music, that kind of stuff).

    Bandwith also isn't consumed so much by the HTML code (a result from the PHP script) the server sends to the client, but by the size and quantity of the images present in the page, and by the size and quantity of the files your users can download.

  5. #5
    sclewin's Avatar
    sclewin is offline x10Hosting Member sclewin is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Ontario
    Posts
    88

    Re: New PHP Game site

    Quote Originally Posted by flinx View Post
    Compressing PHP or not has nothing to do with bandwidth, but with how much space the scripts occupy. But usually it's not the scripts that occupy a lot of space. It's the DB, and files (images, music, that kind of stuff).
    Okay, I'm not worried about space. I'm not going to have any videos or music on the site and only enough pictures to make the site look good, but not too many. The amount of space x10 gives is overkill for what I want .

    I'm just worried about too much MySQL DB activity. For instance, I am going to need a page that displays all the players in the game and some public statistics about those players. The only way I can think about doing this is having a loop that goes through the list of players and take the information. The big problem with that is that there will be one Query per player every time someone enters that page. So, if I have 100 players that would be 100 Queries every time that page is loaded. That sounds like a lot of traffic to me, but I don't know for sure as it is all only text.

    Your friend,
    Scott

  6. #6
    flinx is offline x10Hosting Member flinx is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    68

    Re: New PHP Game site

    Don't know about the max DB load or max queries per minute or whatever.
    But if you want to show info about all users you only need 1 query, that returns a result set with multiple rows (1 for each user). Your loop will go through the result set.

    Read the PHP manual for more info

  7. #7
    sclewin's Avatar
    sclewin is offline x10Hosting Member sclewin is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Ontario
    Posts
    88

    Re: New PHP Game site

    Quote Originally Posted by flinx View Post
    Don't know about the max DB load or max queries per minute or whatever.
    But if you want to show info about all users you only need 1 query, that returns a result set with multiple rows (1 for each user). Your loop will go through the result set.
    I see, stupid me . I was thinking a was doing a query when I was using mysqli_fetch_array. I'm learning

    Thank you for your help, I made sure to give you some reputation.
    Your friend, Scott

    Sent to you from a Linux computer using Kubuntu Version 8.04


    http://sgaming.org

  8. #8
    mattura's Avatar
    mattura is offline x10 Elder mattura is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    563

    Re: New PHP Game site

    I would warn that you are letting yourself in for a LOT of work, even for a simple game!
    I tried this a while ago, a very simple pirate/sailing game, with stats in database, fighting various sea creatures, collecting gold and upgrading your ship.
    It took me a week (at home) just to program the registration, log in and security php (plus a mini dice game that saves the position of the player's counter in the db). And now I have that bit working, I'm not so motivated to write the actual game, so it exists as I left it. You can fight a hell of a lot of jellyfish and seahorses, but you never improve your stats!!
    Some day I might carry on!

    Edit:
    I too was worried about database traffic, but it seems to be fine (although it hasn't been tested with lots of players at once). However it seems to need more than 1 query per person, depending on where they are in the game. Don't tell me I can do it with just one, I have spent a lot of time thinking about it and I believe in my situation, I have done the best thing.
    Last edited by mattura; 10-17-2007 at 04:42 AM.

  9. #9
    sclewin's Avatar
    sclewin is offline x10Hosting Member sclewin is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Ontario
    Posts
    88

    Re: New PHP Game site

    Quote Originally Posted by mattura View Post
    I would warn that you are letting yourself in for a LOT of work, even for a simple game!
    Thank you for the warning . I have put together and run several PBEM games in the past, so I have gone through similar work before. What I have learned is to start extreamly simple and then add a little at a time. This helps you get overworked slower and if I do becomes boared of the project I will have a complete game; it just won't have all the features I originally planned on.

    You can fight a hell of a lot of jellyfish and seahorses, but you never improve your stats!!
    Some day I might carry on!
    Hopefully you will some day.


    However it seems to need more than 1 query per person, depending on where they are in the game. Don't tell me I can do it with just one, I have spent a lot of time thinking about it and I believe in my situation, I have done the best thing.
    I'm pretty sure he meant you only needed one query to display a list of players, not to run the game. I know I will need a query for every action the player takes as I will check the players login/password.
    Your friend, Scott

    Sent to you from a Linux computer using Kubuntu Version 8.04


    http://sgaming.org

  10. #10
    flinx is offline x10Hosting Member flinx is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    68

    Re: New PHP Game site

    Quote Originally Posted by sclewin View Post
    I'm pretty sure he meant you only needed one query to display a list of players, not to run the game.
    Exactly. And thx for the rep. :cool:

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Ever Been Suspended For Using PHP?
    By dragoneye_xp in forum Off Topic
    Replies: 26
    Last Post: 08-16-2009, 07:17 PM
  2. Struggling to get my site off the ground
    By IIN Operator in forum Scripts & 3rd Party Apps
    Replies: 5
    Last Post: 03-20-2009, 01:06 PM
  3. x10 PHP Game
    By Corey in forum News and Announcements
    Replies: 21
    Last Post: 10-18-2006, 05:42 PM
  4. PHP Easter Eggs
    By dragoneye_xp in forum Off Topic
    Replies: 3
    Last Post: 06-14-2006, 05:48 PM
  5. [REQ] PHP Game Browser and More! 1,000 points or more!
    By cyberxzt in forum The Marketplace
    Replies: 2
    Last Post: 06-06-2006, 05:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers