Yeodan Posted March 24, 2009 Share Posted March 24, 2009 I just started learning more advanced PHP / HTML / Javascript I'm planning on making a text based browser game and I have some problems getting started. Should I use frames? I want a toolbar on the left that keeps the player updated and has all the required links in it. It should only updated when the player changes page though. For example a link named Mailbox, this link should change color if the user has a new mail. Is this possible / adviced to do with frames? I might want an hourly income. I have really no idea how to get started on this, could you point me in the right direction? Link to comment https://forums.phpfreaks.com/topic/150898-some-basic-easy-to-answer-questions/ Share on other sites More sharing options...
Yesideez Posted March 24, 2009 Share Posted March 24, 2009 No need to use frames. Frames were used to have a nice fancy menu and to prevent having to duplicate the HTML for it over loads of pages. With PHP you can write your menu/whatever once and include it wherever you need it. Link to comment https://forums.phpfreaks.com/topic/150898-some-basic-easy-to-answer-questions/#findComment-792717 Share on other sites More sharing options...
Yesideez Posted March 24, 2009 Share Posted March 24, 2009 As for the game itself - this is something you'll need to give a bit of planning before you start coding. What type of game? Will it have missions? Can players be killed? How can they be killed? Will players have to use a separate email for every account? (if they die) Will a monetary system be involved? If so, what currency? If the game is played in real time what extras will you include to prevent boredom? I can think of many, many, many more questions. Link to comment https://forums.phpfreaks.com/topic/150898-some-basic-easy-to-answer-questions/#findComment-792722 Share on other sites More sharing options...
Yesideez Posted March 24, 2009 Share Posted March 24, 2009 Another thing - you're going to want to make sure you add security from the start. I've seen a few online mafia type games vanish because of MySQL injection, running PHP scripts at times they shouldn't be run and more. Link to comment https://forums.phpfreaks.com/topic/150898-some-basic-easy-to-answer-questions/#findComment-792723 Share on other sites More sharing options...
Yeodan Posted March 24, 2009 Author Share Posted March 24, 2009 What about the hourly income? Wich language / function(s) will I use for that? Can I even program it into my website? Link to comment https://forums.phpfreaks.com/topic/150898-some-basic-easy-to-answer-questions/#findComment-792724 Share on other sites More sharing options...
kickstart Posted March 24, 2009 Share Posted March 24, 2009 Hi Frames save sending some data out repeatedly, although you can do the same using Ajax and only refreshing the area of the page containing the data. Hourly income could be done from a hourly job, but you may not have access to set up regular jobs on your server. As such you might want to update peoples cash from the hourly income when someone does something. For example, have a standard header part of the script that is common to all / most options (can do security, etc). In here update a table containing when the last hourly job was run if it was more than an hour ago and check the number of records updated. 99% of the time no rows were updated so you don't have to do anything, If a row was updated then it means it was an hour or more since the hourly income was last processed, so loop around all the players and update their cash based on their hourly income. All the best Keith Link to comment https://forums.phpfreaks.com/topic/150898-some-basic-easy-to-answer-questions/#findComment-792743 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.