Jump to content

Recommended Posts

Posted

Hi,

I am coding an internet browser game which is getting pretty big (code-wise). I just tried running the battle script for the game and added a timer for the execution time.

The battle PHP script takes about 0.5 to 1.0 seconds to execute while the other pages take 0.1 or less.

I am on a shared server (server 64) and wonder if scripts that take more than 1 second to execute will slow down the other websites on that server.

 

Also, does the server run several PHP scripts at once, or does it run one script at a time?

Posted

Hi.

 

The server is capable of running multiple scripts at once.

 

As for the server load, a script that takes 1 second to execute is not much by itself, unless your game will be played by a lot (hundreds or thousands) of visitors.

 

I'd say to give it a try and carefully monitor the server load while your game gets more players. This is not the best option, though, since a shared server (Assuming you're on a shared server) is used by more people and the loads could get higher if someone else is also using resource intensive web applications.

 

If possible, implement a maximum number of players (perhaps based on what you see from the server loads while people are playing).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...