Jump to content

PhpNewb314

New Members
  • Posts

    2
  • Joined

  • Last visited

PhpNewb314's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I thought that was probably the best way. Thank-you for confirming this, Josh!
  2. I wonder how I can execute an action which has x% chance of happening, for instance a 31% chance of happening. How would I do that? I was thinking of using rand() to generate a number between 1 and 100 and if it is <= 50 (or whatever the percentage is, since that is going to vary based on the rank of the individual and hopefully fluctuate within ranks) then it is successful and if it is >50 then it isn't successful. This is just a preliminary idea and is definitely going to get more complex since I need to vary the percentage depending on rank and even slight fluctuation within rank (it is a game) but I was wondering about the best way to do this aspect of it. Is this the best way or is there a more efficient (or more elegant) way? Thanks for any advice!
  3. Hey guys, I've been writing small PHP scripts for some time now but I haven't been able to find use for a lot of the functions (such as the MySQL functions) because I was only doing small scripts. It's because of this that I've decided to design a game, a text based RPG as my first big project to learn about some of these functions which are not really used in smaller scripts. I'm registering here since I imagine I will have numerous problems with this and I'm hoping for some help but also I would like advice on the best way to do things since there is just about always more than one. I want the end project to be functional, sure but I would also like to make it as efficient as possible. I chose the text based RPG because there is a lot of different things that need to be done: the login system, including registration and user management etc. (which is a big job in itself making sure everything is secure and efficient - at least for me); social functions such as messages, players online, searching for player profiles and so on; actual game features, particularly the implementation of a ranking system, through the use of XP which is fairly daunting to me at the moment for reasons I'll make clear later and more. I think that is probably enough about me, I posted this to introduce myself to everyone here and just to say hi, so hi!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.