|
 |
|
 |
11-02-2003, 12:53 AM
|
#1 (permalink)
|
|
Registered User
Join Date: Jun 2003
Location: London, England
Posts: 29
|
Mini Games
I thought it would be a good idea to try and make some php mini-games, however the only mini-game I could think of that could be made is hangman. Does anyone else have any suggestions for php mini-games that would be possible? And, if you know any tutorials, that would make thing easier for me so I could see how these games work. Thanks,
|
|
|
11-03-2003, 11:41 AM
|
#2 (permalink)
|
|
Regular Contributor
Join Date: May 2002
Location: Alkmaar, the Netherlands
Posts: 167
|
tic tac toe 
connect 4 
go moku (connect 5  )
__________________
The specialty of the house? thats me (cheap as always)
|
|
|
11-03-2003, 02:02 PM
|
#3 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,505
|
__________________
Mike
|
|
|
11-04-2003, 09:55 AM
|
#4 (permalink)
|
|
Registered User
Join Date: Jun 2003
Location: London, England
Posts: 29
|
Ok Thanks. Hey SDE, I dont suppose your version of tic tac toe is open source? I wouldnt even upload it, i'd just like to see the way it's coded.
|
|
|
11-04-2003, 10:13 AM
|
#5 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,505
|
sure why not
i didn't really develop it for other people
to look at, so don't be too critical of my code
it's also specifically made to integrate with the vbulletin cookies and login information... so you might have to change some things around. at least you can see the logic though.
Here's the db schema:
Code:
CREATE TABLE `tictactoe` (
`game_id` int(10) unsigned NOT NULL auto_increment,
`p1_id` mediumint(8) unsigned NOT NULL default '0',
`p2_id` mediumint(8) unsigned NOT NULL default '0',
`turn` char(1) NOT NULL default 'x',
`start_time` int(14) NOT NULL default '0',
`end_time` datetime default NULL,
`winner` varchar(20) default NULL,
`a1` char(1) default NULL,
`a2` char(1) default NULL,
`a3` char(1) default NULL,
`b1` char(1) default NULL,
`b2` char(1) default NULL,
`b3` char(1) default NULL,
`c1` char(1) default NULL,
`c2` char(1) default NULL,
`c3` char(1) default NULL,
PRIMARY KEY (`game_id`)
) TYPE=MyISAM AUTO_INCREMENT=25 ;
__________________
Mike
|
|
|
11-04-2003, 10:15 AM
|
#6 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,505
|
haha, i was looking through the code just now .. that was coded a long time ago .. there's probably a few good ways to make the code a little more efficient. 
__________________
Mike
|
|
|
11-04-2003, 06:13 PM
|
#7 (permalink)
|
|
Registered User
Join Date: Sep 2003
Location: California
Posts: 26
|
How bout writting it in RPG
Just a thought lets try to write it in RPG.
The graphic part may set us back a bit but I'm
sure we can get the straight lines.
jimmy
|
|
|
11-04-2003, 06:35 PM
|
#8 (permalink)
|
|
Registered User
Join Date: Feb 2003
Location: Australia
Posts: 21
|
Who says an RPG has to be graphical?
Mmm... MUDs...
An anagram game would be pretty easy to make in PHP, what with there being a str_shuffle function and all...
|
|
|
11-05-2003, 01:13 PM
|
#9 (permalink)
|
|
Registered User
Join Date: Jun 2003
Location: London, England
Posts: 29
|
Actually i'll be honest with you, I do plan to make an RPG once I have my community up and running. I'll fill you guys in on all the details when they come in. Thanks very much sde for the coding, it'll come in very handy. It's ok that things could be more efficient, and that you have the login system on yours and stuff, cause I actually just wanted to see how such a game would work, and also I think I can probably base a few other games off this one, for example that boxes game, you know where you have to join the dots, and whoever gets the most boxes wins.
|
|
|
11-05-2003, 01:46 PM
|
#10 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,505
|
the RPG that jimmy's talking about is not role playing game, it's a programming language 
__________________
Mike
|
|
|
11-06-2003, 03:26 AM
|
#11 (permalink)
|
|
Registered User
Join Date: Jun 2003
Location: London, England
Posts: 29
|
Lol! Serious? Erm, what kind of programming language? What is it commonly used for?
|
|
|
11-06-2003, 06:31 AM
|
#12 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,505
|
IBM iSeries AS/400 =)
JimmyO is pretty darn good at it too.
__________________
Mike
|
|
|
11-06-2003, 06:37 AM
|
#13 (permalink)
|
|
Registered User
Join Date: Sep 2003
Location: California
Posts: 26
|
A dinosaur programmer
Okay....Yes it is a kind of language.
No graphics just those big ugly green screens.
Every time I try to leave and learn a real language they pull me back in  .
Jimmy
|
|
|
11-06-2003, 08:45 AM
|
#14 (permalink)
|
|
Registered User
Join Date: Jun 2003
Location: London, England
Posts: 29
|
Lol! Jimmy, can you show me a section of RPG coding please?
|
|
|
11-11-2003, 06:21 AM
|
#15 (permalink)
|
|
Registered User
Join Date: Sep 2003
Location: California
Posts: 26
|
you asked for it
Sorry I just drove From California to Illinois with a five year old.
(yes he is mine ;) )
This hunk reads a table with user info in it.
It then scans for a "," to seperate the first from last.
ex jimmy, octane.
Code:
C*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
/free
// Loop through all records of file
read file;
dow not %eof(file); // Process until end of file
if %error;
dsply 'Read error: process aborting.';
leave;
else;
pos = %scan (',': name);
if pos > 0;
firstname = %trimr(%subst(name:1:pos-1));
update file;
endif;
read file;
enddo;
/end-free
C*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -8. The time now is 10:11 AM.
|
Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
|
 |
|