![]() |
|
#1
|
|||
|
|||
PHP Code for BattleshipDoes 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
|
||||
|
||||
Re: PHP Code for BattleshipCoding 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 GIDBlog
Review: Gel laptop cooling pad by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
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