PDA

View Full Version : mmorpg , please dear god...


subwayheaven
2008.05.09, 10:06 PM
Ok, my name id dave :)

Its 2:45am here and im typing as fast as i can so please excuse very bad spelling.

Im 16, started game design at 13, made 2 games, "fish's adventure 1/2" the second one was done in code.

They both took me a year. (on my own)

Im gonna try mmorpg , a small text bassed one , I have (so far) 2 other people who will help (I dont think they really will help much though)

I have latest version of php , mysql and apatche , Php files dont work as im unsure on how to use them , im unsure if the configuration files are correct however they are as they came with the install so....

What else do I need?

I own a *paid* freewebs account (www.360freakz.com) ...could I use this for testing? (other than localhost)

how does the process work? Do i make a html page with links that go to pages with both html and php code that *somehow* connects to a database (Where would this have to be?) that edits varibles and then displays them back on the now loaded html/php page?

Ughh...so sleeeppy...


Please get back to me (reply here), if you write in detail ill get back to you woth even MORE detail.. ;)

Thanks for reading.

Goodnight!

:\

kodex
2008.05.10, 02:39 AM
One if you are too tired to type properly it can wait till morning. Please slow down when you type also, it is for our benefit not yours.

Second the project you are talking about is massive if you do not have the basic concepts of web based programming yet then you may need to step back from it for a few years. You will need some form of web based programming and some form of database I suggest that you research them throughly.

Third this is a MACINTOSH programming forum. You will have much better luck at a web programming forum.

Sorry if I appear short but we get way to many people in here trying to take on projects way beyond their ability. Start small and work up. You have two games under your belt it is time to go slightly more complex, not time to go to the hardest possible idea.

subwayheaven
2008.05.10, 02:01 PM
Ok, Im awake.

I was researching all of this and finished 3:15am.

Web programming? Yeah, Im new, I Know basic HTML, CSS and XML.

However PHP doesn't seem that difficult to me. As it seems very simular to HMTL (Just extended).

I also have thought about doing this for years. Just never got far.

The mysql database seems fair enough, Ive made a basic one to *hopefully* record users that register on a website.

However Im stuck at getting PHP files to be executed on my apache server.

It simply opens a new a new page with the code written on it.

Anyway, Do you think its possible to make the most smallist basic form of mmorpg?

I did start small and work up, Im not gonna go for something amazing, good, or even adverage. I'm hopping to make a HTML page that uses the server-side language known as PHP to first of all DO SOMETHING.

All I see, and I mean all I see. Everywhere on the internet is a, "Don't bother, too hard" attitude.

I can clearly understand why. But no one really goes into detail why.

Ok, I wanna start up small, but please say where I have to go in the long run.

Its as if everyone has lost all hope.

Please dont get me wrong, Im not another "Runescape is my idea, how many weeks is it gonna take?"

I spent 2 years making the most basic of all games. And now I want to start to learn the core languages, programs, skills needed to get me on my way.

So , please give me some advice on what to learn , what to do , what to expect and above all , What I should be aiming for.

Cheers

Dave.

AndyKorth
2008.05.10, 02:06 PM
I looked at freeweb's webpage, and they don't say anywhere that they support php... so they probably don't. I'm not sure which hosting plan you paid for, but none of them look sufficient for any kind of web application. Does freeweb host your mysql database?

Duane
2008.05.10, 02:35 PM
take a gander at google's App Engine—you can write the code in python, which is a lot less of a headache than php, and you can develop the app on your own computer while you wait for an account. Plus, then you don't need to worry about maintaining database and account crap, google does that for you.

Plus, it's free! :D

PowerMacX
2008.05.10, 03:22 PM
If you have a Mac, start by downloading MAMP (http://www.mamp.info/en/index.php), it's a self contained package including Apache, MySQL & PHP (hence the MAMP name, the M being for "Mac") as well as simple management tools for starting and managing the server and the database.

If you are on a PC, try XAMPP (http://www.apachefriends.org/en/xampp-windows.html).

subwayheaven
2008.05.10, 04:47 PM
No php surport on freewebs? Damn...

At the momment my database isnt hosted on anything, its simply on my computer as I need a sever (apache) to try it out.

I have windows , and last night at 2:30pm I found "WAMP" (the windows version)

I never heard of XAMPP though...

I'll take a look - thanks.

Sorry Nayr, Ive gone this far with PHP and Mysql, so Im sticking with it ;)

Cheers guys!

subwayheaven
2008.05.10, 06:48 PM
First, im sorry for double posting , I no how the majority of admins hate the thing. But I coudn't find the "Edit" button anywhere...

I just fixed my PHP proplem, and am now working on gettting a better database to set it up.

Very happy at the momment , my 2 other buddys are doing the same and setting up there apache servers.

Is there anything im missing?

I can't help but thing I am...

FreakSoftware
2008.05.11, 06:22 PM
Is there anything im missing?

I can't help but thing I am...


Just proper spelling and grammar. Slow down. Proofread your post before you hit submit.

subwayheaven
2008.05.11, 08:38 PM
I'm a 16 year old with better things to do then spend my own time "spell checking" everything I post, as long as you guys can understand me, I dont really think its that important...

Thanks for the "nice comment" anyway.

FreakSoftware
2008.05.11, 08:51 PM
Yep. I'm a jerk. What do I care if people think poorly of - and are less inclined to help - you because you don't spend the extra 30 seconds to clean up your posts?

Hairball183
2008.05.11, 09:03 PM
I'm a 16 year old with better things to do then spend my own time "spell checking" everything I post, as long as you guys can understand me, I dont really think its that important...


:lol::lol:

I suggest you take FreakSoftware's advice. He's a smart guy.;)

Oh, and it is really hard to understand posts that have misspellings and incorrect grammar/punctuation. It will save us 30 seconds trying to comprehend your meaning if you spend 30 seconds with a spell checker.

subwayheaven
2008.05.11, 09:41 PM
Did my previous post have any grammer/misspellings?

And if it did, Sorry if you had to "decode" it, but i'm doing my best.

Now, back to topic?

Thanks.

OneSadCookie
2008.05.11, 09:49 PM
*grammar :p

Hairball183
2008.05.11, 10:56 PM
Did my previous post have any grammer/misspellings?

And if it did, Sorry if you had to "decode" it, but i'm doing my best.

Now, back to topic?

Thanks.

Sorry if I sounded rude or anything, but here is a doctored version of your original post:

Ok, my name is dave

Its 2:45am here and i'm typing as fast as I can so please excuse very bad spelling.

I'm 16, started game design at 13, made 2 games; "fish's adventure 1/2". The second one was done in code.

They both took me a year(on my own).

I'm gonna' try a mmorpg; a small text based one. I have (so far) 2 other people who will help (I dont think they really will help much though).

I have the latest version of php, mysql, and apache. Php files don't work as I'm unsure on how to use them – I'm unsure if the configuration files are correct; however they are as they came with the install....

What else do I need?

I own a *paid* freewebs account (www.360freakz.com) ...could I use this for testing? (other than localhost)

How does the process work? Do I make an html page with links that go to pages with both html and php code that *somehow* connects to a database (Where would this have to be?) that edits varibles and then displays them back on the now loaded html/php page?

Ughh...so sleeeppy...


Please get back to me (reply here); if you write in detail I'll get back to you with even MORE detail..

Thanks for reading.

Goodnight!




And I'm sure there's problems that I introduced, plus problems that I didn't catch. Anyway, I'll stop now…

-LG

Shivers
2008.05.12, 01:11 PM
SubwayHeaven, here's what you need to do:

Find some PHP-able hosting; hosting locally is fine. If you have a bit to spend, dreamhost.com (http://www.dreamhost.com) packages can be had for almost nothing and will serve you fine for now.
Do a couple basic PHP tutorials. Not the really exciting stuff quite yet, but even basic stuff is pretty exciting with PHP because you (if you get a host) can show off to your friends.
Design and develop a smaller project on your own (without tutorials). This should be something simpler than an mmorpg. Maybe a simple blog-- that sort of thing.


At that point, you'll have enough of an understanding of web development that you'll be able to come up with the next step yourself. You're right, though; a basic web mmorpg is not out of your grasp.

If you need more help, send me a PM or email, and we can chat about it.

kodex
2008.05.12, 05:14 PM
On Shivers' note, this is by far the best tutorial PHP I have found to date http://devzone.zend.com/node/view/id/627

Ohh and if you are 16 and have much better things to do besides check your post for basic spelling/grammar issues then perhaps you don't have the time to learn how to code. Try not to be rude to people who are giving you free advice you will get a lot further in life.

Shivers
2008.05.12, 07:59 PM
That Zend tutorial looks pretty swell. If it starts to get boring, take a break and use what you've already learned to create a little project of your own.

Don't stress out about the spelling stuff too much. I, like many people here, prefer nice grammar, &c, but realise that this preference is at odds with much of the internet. Consider it a "when in Rome" sort of thing.

subwayheaven
2008.05.12, 10:08 PM
Good good, point taken. :)

EDIT: Yes...I found the "edit" button, anyway, Thanks a lot Shivers. I'll take your advice to heart and see what I can do.

Unfortunatly, my friends dont understand how big of a project this is going to be. I'm worried that they won't understand that it can't be something achieved overnight.

I have to admit though, they are focused on achieving something. One of the guys working with me (A guy named Calum) is devoting a huge amount of his time learning PHP and mySQL code.

And another guy named Harry (A good friend of mine) who pretty much motivates and guides us to this near impossible aim. He also funds the project (such as the server).

A proplem we are having now, is getting our server to connect to the mySQL database. Ive looked around for this infomation but I can't seem to find it anywhere...(Well...nowhere that seems to explain it well enough.)

If someone could give me a good link or maybe shead some light on this, I would be VERY gratefull.

Cheers.

Dave.

EDIT (Again): I looked at the link by the way. Very usefull. Nice theme aswell if you know what I mean. (Maybe it should be renamed to "Learning PHP with Neo").

kodex
2008.05.12, 10:54 PM
Connecting to a database

// set path of database file
$db = $_SERVER['DOCUMENT_ROOT']."/../library.db";

// open database file
$handle = mysql_open($db) or die("Could not open database");

wyrmmage
2008.05.12, 11:52 PM
you may want to take a look at www.tizag.com as well, which is a pretty good PHP tutorial website in my experience :)
-wyrmmage

Shivers
2008.05.13, 05:40 AM
Is this a local mysql db that you're having trouble connecting to?

subwayheaven
2008.05.13, 11:25 AM
A local mysql db. Connecting to files hosted on a local apache server.

Any advice?

:D

kodex
2008.05.13, 11:37 AM
I provided the answer in my last post to you.

subwayheaven
2008.05.13, 05:52 PM
Can you maybe explain how that code works and what needs to be replaced?

Thanks again.

Shivers
2008.05.13, 06:01 PM
As far as I can tell, Kodex's code is for SQLite-- I connect to my local MySQL database like this:


$host = 'localhost';
$user = 'root';
$pass = '';

$conn = mysql_connect($host,
$user, $pass) or die ('I have made a giant tiny mistake.');


I don't have any experience with WAMP though, so I don't know if this'll do you any good.

FreakSoftware
2008.05.13, 06:06 PM
As far as I can tell, Kodex's code is for SQLite

No, you don't use mysql_open to open an SQLite database. For that you use sqlite_open...


I connect to my local MySQL database like this:

There is more than one way to skin a cat. I'd rather do it by IP, like you, but there's nothing wrong with what Kodex posted.

Shivers
2008.05.13, 06:08 PM
Ahh, okay. I just wasn't familiar with Kodex's method. I suppose you learn something new every day, as the man says.

subwayheaven
2008.05.13, 08:17 PM
Okay, I'll look into it and get back to you.

subwayheaven
2008.05.15, 06:54 PM
Well first, sorry for taking so long, I have had a busy time.

I've tryed different forms of code, none of them work. I seriously don't understand why ether..

So far, I've chosen this as it seems the most simple and to the point.

<?php
$username = "your_name";
$password = "your_password";
$hostname = "localhost";

//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
echo "Connected to MySQL<br>";
?>

I understand the code, but it simply doesn't work. The page loads empty. I load the .php file into my apache directory. Then open the file. But nothing happens. It has the HTML tags around it so no proplem there. The code *should* echo "Connected to MySQL" (Or the other bad quote) but doesn't say a thing. Just a blank page.

Odviosuly I edited it so it became this...

<?php
$username = "root";
$password = "";
$hostname = "localhost";

//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
echo "Connected to MySQL<br>";
?>

I set no password. So I believe leaving it like that is defualt is "".

Any advice guys?

Cheers (Sorry for speling)

kodex
2008.05.15, 07:06 PM
Everything looks like it should work to me, the only thing I can think of is that your server is not setup properly.

FreakSoftware
2008.05.15, 07:28 PM
If you see nothing, it most likely means you have a syntax error on the page and the php warnings and errors are suppressed so it's not showing anything. That code on its own doesn't have any syntax errors though.

subwayheaven
2008.05.15, 07:48 PM
Ok, here is some more infomation as it looks like you guys are gonna need it.

Would this have anything to do with any config files? Like the PHP, MYSQL or Apache .ini files?

I have a "wampserver" by the way. And this is the one connected. As the "Apache2.2" server reports an error message when I try to connect.

Oh, Guys, does all this stuff work on windows vista? My 2 friends are having problems...:blush:

If needed, I'll post the config files so you can take a look...

Cheers again.

Dave.

FreakSoftware
2008.05.15, 08:05 PM
In the php.ini file is a setting for the error reporting level. More or less you want to turn them on:

error_reporting = E_ALL
display_errors = On

Check php.net for the documentation to find out if you want to do something different.

subwayheaven
2008.05.15, 09:20 PM
All are turned on and correct.

Anything else?

:)

Shivers
2008.05.15, 09:23 PM
Your PHP is within <? ?>'s?

AndyKorth
2008.05.15, 11:14 PM
Make a page called phpinfo.php. Inside it put:

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>

Now, visit that webpage. You're probably doing this part correctly, but you must view it as "http://localhost/whatever/phpInfo.php".

If you view it as a file, the php will not be interpreted.

FreakSoftware
2008.05.15, 11:16 PM
It's supposed to be, Shivers...

subway: Is there any other code in the page?

subwayheaven
2008.05.16, 04:07 AM
<html>
<body>

<?php
$username = "root";
$password = "";
$hostname = "localhost";

//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
echo "Connected to MySQL<br>";
?>

</body>
</html>

OneSadCookie
2008.05.16, 04:18 AM
delete the first three lines and the last three lines

subwayheaven
2008.05.16, 12:02 PM
Still doesn't work/change anything.

Any other ideas?

EDIT: When I load apache it says at the bootom of the app. (Win32 (PHP 5.2)) when I highlight the "Apache2.2" server. But only says "Win32" on the wamp server...

Good this be the source of the proplem?

kodex
2008.05.16, 12:04 PM
The only explanation at this point is your database is not setup/configured correctly. Reread the setup instructions for it.

subwayheaven
2008.05.16, 12:26 PM
Do you think the best idea is to uninstall everything and re-install it?

And anything about if windows vista works with this?

Hairball183
2008.05.16, 12:58 PM
This is a Mac forum, so if people seem a wee bit unresponsive, that would be why.

AndyKorth
2008.05.16, 02:30 PM
And anything about if windows vista works with this?

In my experience of using windows vista every day for 8 hours a day is that very few things work well with windows vista. People on the Macintosh Game Developers' Community in general won't be able to help with vista related problems. I have set up php and apache on windows before, maybe 3 years ago, and it was a big pain.

FreakSoftware
2008.05.16, 02:50 PM
Earlier I thought you said the source code of the loaded page was empty, but no I see that you just said the "page" is empty. When you load your page in the browser, look at the source code. What do you see?

Also, there's no reason you need to delete the html tags, like OneSadCookie said. I'm not sure what his train of thought was, but it's perfectly fine (and expected) to have them.

subwayheaven
2008.05.16, 03:49 PM
Spelling error. (but now I see that you)

Sorry, but you really did just make my day. ;):lol:

I mean the loaded page displays nothing.

The source is...Well...What do you know. Nothing ether.

This I presume is pretty bad.

Hairball183
2008.05.16, 04:19 PM
Spelling error. (but now I see that you)

Sorry, but you really did just make my day. ;):lol:

It's fun picking on people isn't it? Surrender to the dark side!:lol:

FreakSoftware
2008.05.16, 04:29 PM
Go to the #php IRC room on irc.freenode.net, join a mailing list http://www.php.net/mailing-lists.php, or go to any of the bajillion php forums on the web. If it's not syntax error and the warnings aren't suppressed then it sounds like something wonky with your setup and you're not going to find your answer here. You're much better off asking php people rather than Mac game developers why you Windows PHP setup isn't working properly.