GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 17-Jun-2008, 00:08
ruxd ruxd is offline
New Member
 
Join Date: Jun 2008
Posts: 1
ruxd is on a distinguished road

PHP Code for Battleship


Does anyone has the php code for Battleship game? I've tried to search on internet,but i haven't found it yet.. The most things i found is VB code.. huehue.. Need your all help .. plizz..^^
  #2  
Old 26-Mar-2009, 10:40
MisterChucker's Avatar
MisterChucker MisterChucker is offline
Junior Member
 
Join Date: Mar 2009
Location: Cyberspace, Earth
Posts: 53
MisterChucker is a jewel in the roughMisterChucker is a jewel in the roughMisterChucker is a jewel in the rough

Re: PHP Code for Battleship


Coding a Battleship game is a somewhat complex endeavor. It's the kind of thing someone might want to be paid for.

The game requires multiple components.

You would need a user interface. It would probably be written in HTML and CSS, but I suppose it could also be written with PHP-GTK (though I'm not familiar with that). An HTML interface would probably require some Javascript for user interaction.

Depending on the rules your game relies on, you might need a script to validate ship placement. According to Hoyle's rules, players get four ships (5, 3, 2, and 2 squares long) that can't touch each other and can be positioned horizontally, vertically, or diagonally.

If you're making a single-player game, you need some artificial intelligence.

If you're making a multi-player game, you probably don't want the players using the same computer screen or even the same computer, so you need a way to store ship placements and shots fired in a central location such as a database on a server.

Since your data is stored in a central location, you need a way to uniquely identify players. This can be done by giving each player a user name. Then you probably want users to have passwords to make it harder to cheat. These things require a login system. Additionally, you may want users to be able to register themselves.

You need a way for players to create games, join games, and see what games are available. It would be nice if players could see who else was on the site at a particular moment.

Other things that might add to the experience would be a chat system, sound effects, friends lists, avatars, a way to look back at completed games, etc.

This is not a complete list of things that need to be thought about, but it should give you some idea of the scope of such a project.
 
 

Recent GIDBlogReview: Gel laptop cooling pad by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to sort random access file? wmmccoy0910 C Programming Language 12 04-Sep-2006 04:40
Here it is again! 35% - 40% off For Life! my-e-space Web Hosting Advertisements & Offers 0 20-Apr-2006 15:48
Re: Porting code from C++ to PHP cable_guy_67 MySQL / PHP Forum 2 03-Aug-2005 18:19
Parsing PHP code that's stored in a database. JdS MySQL / PHP Forum 3 13-May-2004 10:15

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 23:53.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.