Original Post
Hey. I'm new to these boards so I'll try to keep my question as intelligent as possible, I don't want to get off to a bad start ;) First, this could be considered a game design question, but because it includes classes, I figured it would be better off here. Game ====== I'm putting together a small game just to test what I have learnt at Uni (Computer Science). Its going to be done in Flash using actionScript and will be of a basic RPG structure, think Final Fantasy 6 (but no where as big!) Problem ========= I am an advocate of design. I don't want to touch the code until I have everything fleshed out on paper first. I want to present you with a general design of the structure of classes, I just need some one to revise it before I go into more details. So basically some suggestions. My design =========== // Team Class : A class that will contain all the information for the // players team. Like who is in the party, what items are being carried // and where they are etc. Team Class | |->Party_Members [ Character ] //**Eg: = {"Chris", "Jim", "Frank"} | |->Items [ Item ] [ Qty ] //**Eg: = {{"Potion", 5}, {"HiPotion", 4}} | |->Weapons [ Weapon ] [ Qty ] | |->Armors [ Armor ] [ Qty ] | - | |->CurrentTeam [ ] //Eg: = {"Chris", "Frank"} | |->Time //Eg: = 5:40 | |->Money //Eg: = $3400 | |->Location //Eg: = "Map005" | \->Script //Eg: = "Script003" //Character Class : A class that pertains to each character in the game. // For example "Chris" is an character object. Character Class | |->Name //Eg "Chris" | |->Level //Eg Lvl44 | |->Exp //Eg 44,000pts | |->NextLevel //Eg 45,000pts | |->Status //Eg Poisoned | |->HP | |->MP | |->Weapon //Eg Sword | |->Armor //Eg Helmet | \->Various stats... Item Class | |->Name //Potion | |->Price | |->Consumable | |->HP //+100 | |->Percentage //100% Weapon and Armor are much the same, so I won't bore you with more details. But the basic structure is -"Team" has several "Characters" -"Team" has several "Items", "Weapons", "Armor" -Each "Character" has a "Weapon" and a "Armor" This might need explaining, so if you have questions ask. Thanks