*sigh* 000webhost don't let you run browser games?
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: *sigh* 000webhost don't let you run browser games?
Running crons is one of the things that you will get you noticed by a free host in the bat of an eye. However, you can even have some more simple multiplayer games that use no more resources per page load than a simple e-commerce website. However, once you start to involve crons, it becomes a problem for oversellers very fast (like Noctrine said). Then your resource usage is not fluctuating with normal usage patterns like everyone else's site, and oversellers depend on your site having downtime.
The indelible lord of tl;dr
Re: *sigh* 000webhost don't let you run browser games?
I'll keep that in mind! I'm not really clued into crons anyway, so any events that happen would be me sitting at the database, manually changing it ("oh crap, the GM is online!"). I'm half taking advice given to me here - I will graduate to a paid host latter, but to start off I'm using a free one. I think it'll work out, given spiritwebbs account.
Fight Cycle : My latest Browser game WIP
Driftwurld : My Browser Game WIP
Philosopher Gamer : My Blog
Driftwurld : My Browser Game WIP
Philosopher Gamer : My Blog
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: *sigh* 000webhost don't let you run browser games?
Ahhh ok. Some games go buck wild with crons and have 5 of them running every two seconds
That would fly for maybe 5 minutes on a free host.
The indelible lord of tl;dr
Re: *sigh* 000webhost don't let you run browser games?
No fear of that from me! Crons are strange, unknown magic to me right now! And I get your point, thanks 
Currently I'm looking at the connect.php and this line
I'm guessing I need to change these details, but I'm not sure what to? Here's some info I could find from my panel...
And I'm not sure where to find localhost? Also is the final empty entry there (the "") a password space?
Thanks!
Currently I'm looking at the connect.php and this line
Code: Select all
$db = mysql_connect("localhost","root","") or die("Could not connect to db");Would that go where root is? The '/home/a2890094'?Home Root /home/a2890094
And I'm not sure where to find localhost? Also is the final empty entry there (the "") a password space?
Thanks!
Fight Cycle : My latest Browser game WIP
Driftwurld : My Browser Game WIP
Philosopher Gamer : My Blog
Driftwurld : My Browser Game WIP
Philosopher Gamer : My Blog
- SpiritWebb
- Posts: 3107
- Joined: Sun Jul 12, 2009 11:25 pm
Re: *sigh* 000webhost don't let you run browser games?
To find your localhost on 000webhost, make sure your at your cPanel, and click on the MySQL option and you should see the following:
Your root and password will be:
The ******* part, yours will show and be in bold. This is what you will change localhost to.MySQL databases are required by many web applications including bulletin boards, content management systems, and others. To use MySQL, you need to create database and user, which will be automatically assigned to this database. Click for phpMyAdmin when database is created.
Important: MySQL Host for any database in this account is **********, do not use localhost!
Create new database and user
Your root and password will be:
Where you choose your username, you will have some account number attached. (Example: a1828374_) You will put that weird identification number along with the underscore and the username you chose for your root. Then, you will enter your password as normal!MySQL database name:
*********
MySQL user name:
*********
Password for MySQL user:
Enter password again:
Keep in mind, your only allowed 2 databases, and they shut one of mine down for "Over excess use of database tables.""localhost" is the server, "root" is the username and "" is the password. When using localhost, you can setup a username and password, but if you do not wish to, you can simply put "root" and no password "" and be fine. See above for instructions on replacing "localhost","root",""Code: Select all
$db = mysql_connect("localhost","root","") or die("Could not connect to db");
Re: *sigh* 000webhost don't let you run browser games?
Thanks, SpiritWebb! That really helps out as I was just guessing before! Got all that down - will do a test upload soon!
I'm just going to have one database.
Eye, they didn't really have a rule against making your own forum so they made up an excuseKeep in mind, your only allowed 2 databases, and they shut one of mine down for "Over excess use of database tables."
Fight Cycle : My latest Browser game WIP
Driftwurld : My Browser Game WIP
Philosopher Gamer : My Blog
Driftwurld : My Browser Game WIP
Philosopher Gamer : My Blog
Re: *sigh* 000webhost don't let you run browser games?
Annnnd just uploaded it and it seems to work!!!! Hawt! (though the first time I forgot to upload the login.php of all things!). Also the background doesn't seem to be working, though all other images are working?
background1.jpg is there. It works in wamp.
Anyway, I'll start up a showoff thread sometime soon - it's a small game, not a big one like halls makes. But I like it and it's a good base to build on.
Code: Select all
echo "<style>body {background: url('background1.jpg') 50% 0% repeat;}</style>";Anyway, I'll start up a showoff thread sometime soon - it's a small game, not a big one like halls makes. But I like it and it's a good base to build on.
Fight Cycle : My latest Browser game WIP
Driftwurld : My Browser Game WIP
Philosopher Gamer : My Blog
Driftwurld : My Browser Game WIP
Philosopher Gamer : My Blog
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: *sigh* 000webhost don't let you run browser games?
You need to add an attribute to your style tag:Callan S. wrote:Annnnd just uploaded it and it seems to work!!!! Hawt! (though the first time I forgot to upload the login.php of all things!). Also the background doesn't seem to be working, though all other images are working?
background1.jpg is there. It works in wamp.Code: Select all
echo "<style>body {background: url('background1.jpg') 50% 0% repeat;}</style>";
Anyway, I'll start up a showoff thread sometime soon - it's a small game, not a big one like halls makes. But I like it and it's a good base to build on.
Code: Select all
<style type="text/css">.....</style>The indelible lord of tl;dr
Re: *sigh* 000webhost don't let you run browser games?
Thanks, but doesn't seem to make a difference - basically I want to have a thin graphic in the background which is repeated across the screen, basically the same effect as in the early urban realms videos. As said, it worked in wamp. But really all the big stuff worked, ie the actual game, so I'm pleased with that!
Fight Cycle : My latest Browser game WIP
Driftwurld : My Browser Game WIP
Philosopher Gamer : My Blog
Driftwurld : My Browser Game WIP
Philosopher Gamer : My Blog
Re: *sigh* 000webhost don't let you run browser games?
I'm using
I'm pretty bad at CSS as well but I thought I'd throw up what I had working. I dunno how much different the "-image" makes Are your images right in the main folder or do you have them in a separate images folder like I do?
Code: Select all
background-image:url(images/background.png);

