   Game programming with OOP!
  I''m new to game programming and don''t use object-oriented programming too much either. Well, I''m working on a game in PHP - yes, it''s a web-based game like GangWars - and I''m a little curious about how to set things up. Here''s a brief outline of my code:I want to store a list of all weapons available to each faction (Humans, Aliens, and Robots) along with the weapons that they currently have. What would be the best way to go about something like this? 
  Anyone? ;  I'd strongly recommend a MySQL database for storing the actual weapons.WeaponID = Primary Key, Auto_IncrementWeaponName = Varchar(255)WeaponDamage = Small IntAvailableTo = Varchart(255) // Everyone, Human, AlienThen a simple query to find your list.SELECT * FROM WEAPONS_TABLE WHERE AvailableTo = $Player->CurrentRace();As for storing what the account currently has, just a simple list of WeaponIDs from the aforementioned WEAPONS_TABLE.   -- Also, you really shouldn't bump topics that are just over an hour old =P   [edited by - GroZZleR on February 14, 2004 6:30:16 PM]