Want to make a web based game?

Look no further

  • (7 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »

98 Replies - 88368 Views - Last Post: 24 December 2010 - 10:37 PM Rate Topic: ****- 6 Votes

#31 freylast  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 11-August 08

Re: Want to make a web based game?

Posted 11 August 2008 - 04:03 AM

hi,i make simple RPG php game,but i confuse about quest...
can you help me what i must do first?like table that i must make or else
thanks...
( sorry my english bad :) )
Was This Post Helpful? 0
  • +
  • -

#32 kiwi2  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 8
  • View blog
  • Posts: 178
  • Joined: 16-September 08

Re: Want to make a web based game?

Posted 16 September 2008 - 04:59 AM

For beginners here is a simple webgame called catch-a-thief.
If u r serious about game development this kind of game is a good place to start.
<?php
include "thiefcss.php";
?>
<div id='ca'>
<?php
$img = "";
$mess ="";
$array = array("Jewellery_Store" , "Art_Gallery" , "Bank" , "Museum" , "Trade_Show");
$thifee = array("Prison" , "Little_Old_Ladies_House");
$new = array_merge($array, $thifee);
if (!isset ($_GET['thief']) )
{
$img ='beg.jpg';
$guess = '0';
$mess = "<h4>The thief moves around quickly see if you can either catch him or put him behind bars, if you manage to pick the same location as the thief, you catch him, if he lands in prison you win, but if he gets into the little old ladies house you lose</h4>";
shuffle($array);
$thief = $array['0'];
echo "$thief";
}
else if (isset($_GET['thief']) )
{
if ($_GET['thief'] == $_GET['yourpick'])
{
$img ='caught.jpg';
$mess = "<a href='catchthief.php'>You have caught the thief,play again</a><br />";
}
else if ($_GET['thief'] == 'Prison')
{
$img ='cops.jpg';
$mess ="<h2>You Have put the thief behind bars, you win</h2><a href='catchthief.php'>Play again!!<a/><br />";
}
else if ($_GET['thief'] == 'Little_Old_Ladies_House')
{
$img ='beg.jpg';
$mess ="<H2>The Thief is in the Little Old Ladies House, you lose</h2><a href='catchthief.php'>Play again!!<a/><br />";
}
else

{
echo "<b>Thief's present location $_GET[thief]<br />";
$img = 'beg.jpg';
$mess = "The thief is on the move your time is running out";

$array = array("Jewellery_Store" , "Art_Gallery" , "Bank" , "Museum" , "Trade_Show");
$thifee = array("Prison" , "Little_Old_Ladies_House");
$new = array_merge($array, $thifee);
shuffle($new);
$thief = $new['0'];
$yourpick = $_GET['yourpick'];
}
}

$guess = (int) $_GET['guess'];
$guess++;
echo "$guess<br />";
if ($_GET['guess'] < 6)
{
echo "$mess<br />";
echo "<img src='$img' /><br />";

echo "<form action='catchthief.php' method='get'>Thiefs Location<br /><input type='hidden' name='thief' value='$thief' /><br />Your Locatiin<br /><input type='text' name='location' value='$yourpick' /><br />Guess where the the thief will be next<br /><input type='radio' name='yourpick' value='Jewellery_Store' />Jewellery Store<br />
<input type='radio' name='yourpick' value='Art_Gallery' />Art Gallery<br />
<input type='radio' name='yourpick' value='Bank' />Bank<br />
<input type='radio' name='yourpick' value='Trade_Show' />Trade Show<br />
<input type='radio' name='yourpick' value='Museum' />Museum<br /><input type='hidden' value='$guess' name='guess' /><input type='submit' value='catch thief' />";
}
else
{
echo "<img src='$img'/><br />";
echo "$mess<br />";
echo "<a href='catchthief.php'>Play Again</a><br />";
echo "<b>Game Over</b>";
}
?>
</div>
Was This Post Helpful? 0
  • +
  • -

#33 edu2004eu  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 81
  • Joined: 27-August 07

Re: Want to make a web based game?

Posted 17 September 2008 - 04:07 AM

For everybody who is looking for a good host for their games which has cron jobs, take a look at www.novahost.org. I used it for my game and it has a very good uptime, although it's free :D
(don't want to advertise, just helping out the people who are looking for a host.

And for anybody who is trying to start making a game, you have to plan it very carefully and preferrably use a CVS system, especially if you are working with other people. I made an OK game I would say, in almost a year... so be prepared for long nights of hard work and lots of coffee...
Was This Post Helpful? 0
  • +
  • -

#34 ghqwerty  Icon User is offline

  • if($spareTime > 0){ $this->writeCode(); }
  • member icon

Reputation: 40
  • View blog
  • Posts: 876
  • Joined: 08-August 08

Re: Want to make a web based game?

Posted 22 September 2008 - 01:14 PM

i just downloaded freemind

i would recommend people download this as its free and will be VERY helpful for planning out a game

its a mindmap system
Was This Post Helpful? 0
  • +
  • -

#35 Limitation  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 19
  • Joined: 27-September 08

Re: Want to make a web based game?

Posted 27 September 2008 - 12:12 PM

Hello everyone!
Well Im working on a text based games atm, I have got a WAMP Server (Includes MySQL, PHP, Apache etc) but I have encountered some problem and confused with the database on the MyAdmin part of local host. I have just been learning php for sometime and created a login script. It works fine, but I have no idea how to get it in the database and get it running (for practice) so I can continue further. I have tried loads of times but it shows an error (in the database) etc...

If you lot understood me lol, Help would be apreciated.

Thanks :D
Was This Post Helpful? 0
  • +
  • -

#36 Hary  Icon User is offline

  • D.I.C Regular

Reputation: 44
  • View blog
  • Posts: 427
  • Joined: 23-September 08

Re: Want to make a web based game?

Posted 28 September 2008 - 10:34 AM

View PostLimitation, on 27 Sep, 2008 - 12:12 PM, said:

I have tried loads of times but it shows an error (in the database) etc...


What commands did you use and what errors did you get? Without more information it is hard to tell what is wrong.

in PHP:
<?php
// we connect to example.com and port 3307
$link = mysql_connect('example.com:3307', 'mysql_user', 'mysql_password');
if (!$link) {
	die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);

// we connect to localhost at port 3307
$link = mysql_connect('127.0.0.1:3307', 'mysql_user', 'mysql_password');
if (!$link) {
	die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>



For more information, see the PHP Manual

Default user/password should be provided in the documentation, I guess it is root or admin and no password
Was This Post Helpful? 0
  • +
  • -

#37 kiwi2  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 8
  • View blog
  • Posts: 178
  • Joined: 16-September 08

Re: Want to make a web based game?

Posted 30 October 2008 - 04:31 AM

WARS OF CAQUSANDRA, mmorgp, has begun, I'll post the code as I go along, but I would love a little help, perhaps when it is finished a tutorial might be in it.

In the beginning when the world had only begun to learn, in the beginning when man had only begun to learn... survival was the key, .. survival of the fittest meant that unless you committed yourself to the art of living you would be left behind.
The old world has set its sights on conquering the blight of caqusandra, are you up to the challenge.

[code]
mysql table, please crit it, this is the basis for the game, good planning here will save a lot of time.

<?php
include "config.php";
$query = "CREATE TABLE multi(id SMALLINT(5)
UNSIGNED NOT NULL
AUTO_INCREMENT,
PRIMARY KEY(id), userp VARCHAR(10), password VARCHAR(19), loc TEXT, avatar TEXT, tokens VARCHAR(100), weapons VARCHAR(100), wars VARCHAR(50), position VARCHAR(50), hunt VARCHAR(50), loot VARCHAR(50), maps VARCHAR(100), strategy TEXT, bal VARCHAR(100), history TEXT, other1 TEXT, other2 TEXT, other3 VARCHAR(100), other4 VARCHAR(255), other5 VARCHAR(100), other6 VARCHAR(100))";
print "running query";
mysql_query($query, $link) or die
("CREATE TABLE error: " . mysql_error());
mysql_close($link);
?>[code]
Was This Post Helpful? 0
  • +
  • -

#38 laces12  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 69
  • Joined: 20-November 08

Re: Want to make a web based game?

Posted 21 November 2008 - 08:04 AM

would be interesting, but no code??
Was This Post Helpful? 0
  • +
  • -

#39 Clubwarzs  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 27-December 08

Re: Want to make a web based game?

Posted 27 December 2008 - 05:00 PM

Hello,

My name is Jeff. I am not sure if I am in the right area or not. But my question I wanted to out forth, was I have spent a good deal of 2 years learning everything from simple html to php, to css and now java. I find myself stuck alot of times because I have to work through errors on my own and sometimes it takes days if not weeks for me to figure them out. So what I wanted to know is there a site where I can go to test the codes in action prior to uploading to my site. Or if anyone can tell me how to use dreamweaver to test on local server before uploading.


thanks Jeff
Was This Post Helpful? 0
  • +
  • -

#40 Valek  Icon User is offline

  • The Real Skynet
  • member icon

Reputation: 514
  • View blog
  • Posts: 1,604
  • Joined: 08-November 08

Re: Want to make a web based game?

Posted 27 December 2008 - 11:41 PM

Try installing XAMPP.
Was This Post Helpful? 0
  • +
  • -

#41 Rechocto  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 50
  • Joined: 04-January 09

Re: Want to make a web based game?

Posted 04 January 2009 - 03:22 AM

I was without internet for 2 weeks (6 days of which I had free time) and managed to throw together a simple PHP turn-based game, I threw it up at http://thegame.no-ip.info for some people on an old forum to try out.. if enough people want me to, I'll release the source (sans my alpa/beta-phase sucky-arse forum I threw into it some weeks after making the game) along with a guide in writing it.

I guess I'll keep an eye on this thread, post here if you want me to do as I mentioned?

This post has been edited by Rechocto: 04 January 2009 - 03:23 AM

Was This Post Helpful? 0
  • +
  • -

#42 kiwi2  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 8
  • View blog
  • Posts: 178
  • Joined: 16-September 08

Re: Want to make a web based game?

Posted 15 January 2009 - 11:25 PM

nice keep it up, good to see someone doing something other than thinking about it!!
Was This Post Helpful? 0
  • +
  • -

#43 edu2004eu  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 81
  • Joined: 27-August 07

Re: Want to make a web based game?

Posted 17 January 2009 - 04:57 AM

I have also made a web based game (mafia/pimp game) since my first post in here. It turned out pretty good, but the attack feature is not implemented yet. If you want to see it click the link on my signature. If you like it and want to make a similar one and stumble upon problems, PM me, I may be able to help you (but only mafia/pimp style games, cause I don't know other games).
Was This Post Helpful? 0
  • +
  • -

#44 eliphas  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 20-January 09

Re: Want to make a web based game?

Posted 20 January 2009 - 03:04 AM

hello,
is there a place where i can find a good tutorial to create a mini map or even a grid map to make my character walking through it ?

thanks for your help,
eli
Was This Post Helpful? 0
  • +
  • -

#45 ValPaliy  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 12
  • View blog
  • Posts: 1,392
  • Joined: 06-December 07

Re: Want to make a web based game?

Posted 20 January 2009 - 03:47 AM

Thanks, snoj!
I am playing one, and thought about creating one in the future. Will read-in later on :)
Was This Post Helpful? 0
  • +
  • -

  • (7 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »