This is a single player RPG where the player will interact with NPCs to solve quests. It is not online.
I've developed a website in PHP before where I saved my own data in a database, and loaded the images to the page via MySQL and PHP.
For a RPG, how would this process be? In my mind... I will try:
- At the RPG menu, have a user login screen. Handle this with a traditional PHP session.
- Once the user logs in, load their stats from the database.
What I'm confused about is:
Loading text data is okay I suppose... but how can I load objects that were on the screen in the correct locations at the time of the save? Can this be handled through the database?
Kind of like:
/** * Load a character and all related items and skills. * Do this when the user logs in. You can save the data in a session or * reload it every time the user makes a new request */ $Character = Character::model()->with('items, skills')->find( 'username:=username', array('username' => 'demo') );
Any tips for loading appropriate data per user profile?