jackmcnally Posted September 27, 2011 Share Posted September 27, 2011 Hi Guys, I appreciate your help! What I am doing is making a Choose Your Own Adventure Game and what I would like to do is the following. Record the moves of the person Put those moves on a page telling them their - say - 5 latest games Record the time it took them to complete the adventure Record that in a High Score database I know that I will need to employ the use of MYSQL databases and PHP, but I'm a total noob! Any help would be greatly appreciated! ~ Jack Quote Link to comment https://forums.phpfreaks.com/topic/247948-record-last-moves/ Share on other sites More sharing options...
jackmcnally Posted September 27, 2011 Author Share Posted September 27, 2011 To further clarify, the moves will be like as follows SELECTION A >> SELECTION B >> SELECTION A >> SELECTION A >> SELECTION B >> SELECTION A >> DEAD Quote Link to comment https://forums.phpfreaks.com/topic/247948-record-last-moves/#findComment-1273216 Share on other sites More sharing options...
ManiacDan Posted September 27, 2011 Share Posted September 27, 2011 There's not much general purpose design help we can give you other than "learn PHP and SQL." You should have a table for the users (make them sign in) [minimum fields: ID, username] A table for the adventure as a whole [Minimum fields: ID, title, description] A table for every step of the adventure [Minimum fields: ID, description, choiceAText, choiceAStepID, choiceBText, choiceBStepID (the choices should really be their own table, but I'm keeping it simple)] A table that contains a userID, an adventureStepID, and the choice they made at that step. [Minimum fields: UserId, AdventureStepId, timestamp, NextStepChosen] When they make a choice, insert a row into the last table, then load the step that they chose and display it. When you want to show their history, select from the choices they made ordered by the timestamp of the choices. You can JOIN to the steps table to get the text of each choice and then display their adventure in story mode. -Dan Quote Link to comment https://forums.phpfreaks.com/topic/247948-record-last-moves/#findComment-1273225 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.