| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: May 2008
Posts: 248
![]() ![]() | |
| | |
| | #2 (permalink) |
| NamePros Member Join Date: Sep 2006
Posts: 99
![]() ![]() | I would probably have another table, one with the rooms and one for "connections". Have the room id, a numeric direction 0-7 (0 for north, 1 for ne, 2 for east, etc), and the room it's connecting to. If you're really clever, you have have only 1 entry in the database (eg, room 1 --> north --> room 2 would imply room 2 --> south --> room 1), or just have both entries in there. Index by the room ids and throw in a few joins, you're good to go. Bruce |
| | |
| | THREAD STARTER #3 (permalink) |
| NamePros Regular Join Date: May 2008
Posts: 248
![]() ![]() | Thanks Thanks for the reply. I'm having trouble seeing how doing it that way is very different from the way I'm doing it now, though. Also, I understand that joins are supposed to be very resource heavy? I just realized another problem. It's actually the same problem but I wasn't thinking that it would affect me without intermediate directions for some reason. The rooms are connected in text-adventure-game style. Unfortunately, they need to be connected more like a map. That is, when I add rooms, nearby rooms need to automatically connect to them with the proper directions. THAT is the real problem.
__________________ Are you tired of viruses and popups? Use Firefox! |
| | |
![]() |
| Tags |
| games, mysql, php, rooms |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Online Game Programming (I offer) | Darkfire001 | For Sale / Advertising Board | 14 | 04-09-2005 12:59 PM |
| Dream Machine | Unknown | The Break Room | 9 | 12-28-2004 04:18 PM |
| WordGames.us For Sale | Dillpup | Domains For Sale - Make Offer | 2 | 07-07-2004 02:53 PM |
| Not Sure? PlayGames.us | Monsterman | Domain Appraisals | 4 | 06-10-2004 01:30 PM |
| PotterGame.com | Tassos | Domain Appraisals | 11 | 07-11-2003 11:08 AM |