Text based Browser Game; My Little Gangsters

Results 1 to 4 of 4
  1. #1
    Intelligent DoucheBag jur13n is offline
    MemberRank
    Jan 2008 Join Date
    Zwolle,Location
    1,946Posts

    Text based Browser Game; My Little Gangsters



    Well, 3 weeks ago I had a kind of "internship" within my study.
    Because we were with a team of 6 people who were more skilled than the teams before us.
    We finished our assignments for 3 weeks, in 2 days.

    So what did we have to do with the other 13 days.
    They split us up in 2 teams.

    and we had to create a text based browser game.

    My team (My little Gangsters) came up with an idea to create a mafia game with a My Little Pony theme.

    Well, we succeeded.

    After 13 days of hard working on our code, we won.

    Our Positive points;
    - Gameplay
    - PvP
    - Security (They couldn't get into anything)
    - Uniqueness

    Screenshot:
    Spoiler:






    Live gameplay:
    http://mlg.jurienhamaker.net


    Features:
    - Login/Register system (Obviously)
    - Register checks by jquery and registering itself by AJAX/PHP
    - Bad ass Login sound by me.

    - Missions
    - Fail/Succes rate calculated by level, weapons etc.
    - if you fail another calculation will be run to get you in jail (more details later)
    - Rewards on win.
    - Energy and HP consumption (all done in the database)
    - Add-able in database.

    - Hookers
    - They earn money for you on a time base.
    - Add-able through database

    - Jails
    - Add-able in database
    - Break out chance, also calculated by level, weapons etc.
    - Payout bill, so you can pay yourself out of the jail.

    - Auto level up system
    - Reach max exp for your level, Level-up
    - Level-Table editable in the database (more levels can be added)
    - random bonus on attack/defence

    - Ranking
    - based on money
    - based on level
    - based on kills
    - based on K/D Ratio

    - Member list
    - Full list of members

    - Profile page
    - editable
    - custom signature.

    - Change password
    - self explaining

    - Money transactions
    - view your money transacionts
    - Bought items/hookers etc
    - Hooker payouts
    - Mission rewards
    - Transactions from other players
    - Transactions to pank/account (more explanation later on)

    - Items
    - View the items you've bought
    - equip the items for stat boost

    - Messages
    - Private message system, self explaining

    - Hospital
    - Buy HP/Energy Packs
    - Buy Stat bonusses
    - Sit out your hospital time
    - If hp reaches 0, you will automatically go to the hospital
    - Time will be calculated by level.

    - Shop
    - Buy Weapons/Armor

    - Battle System
    - Min-level 5
    - Max level difference is 2 levels (Opponent must also be level 5)
    - Heavy calculations for succes rate
    - Heavy calculations for reward
    - You earn the other persons Pollars on his account..

    - Live chat
    - Chat through database
    - auto delete old messages after 24 hours

    - Bank
    - auto interest earnings every hour

    - Custom password encryption
    - This is decided by HARDWARE, use passwordcreator.php to create a password after a server/hardware change
    Spoiler:
    Code:
    	function encrypt($string)
    	{
    		return hash('tiger160,3', md5(sha1(md5($string))));
    	}


    - Secured
    Spoiler:
    Code:
    	if($_SERVER['REQUEST_METHOD'] == 'POST')
    	{
    		if(!empty($_POST))
    		{
    			foreach($_POST as $key=>$value)
    			{
    				if (strpos($value,'./') !== false) {
    				    die("What are you trying to do?");
    				}
    
    
    	
    					//xxs prevention
    					if(!is_numeric($value))
    					{
    						$value = htmlentities($value, ENT_QUOTES);
    					}
    
    					//real escape anti sql
    					$value = mysql_real_escape_string($value);
    					
    					$_POST[$key] = $value;
    	
    			}
    		}
    	}
    	
    	if(isset($_GET))
    	{
    		foreach($_GET as $key=>$value)
    		{
    			if (strpos($value,'./') !== false) {
    				   die("What are you trying to do?");
    			}
    
    			//xxs prevention value
    			if(!is_numeric($value))
    			{
    				$value = htmlentities($value, ENT_QUOTES);
    			}
    
    
    			//real escape anti sql
    			$value = mysql_real_escape_string($value);
    			
    			$_GET[$key] = $value;
    		}
    	}



    Stuff that need explanation:

    - Pollars
    - Your currency in cash, Pony Dollars

    - Pank
    - The pony bank, your money on the bank (always safe)


    Set up:

    1. Install a web server with PHP 5.3 or higher
    2. Install a mysql server
    3. Drop the files into your web server
    4. Run the sql in the DOCS folder on your mysql (phpmyadmin or w/e you like)
    5. Edit _func_database.php to your own info.

    More editable things:
    - Missions (DB)
    - Hookers (DB)
    - Level Table (DB)
    - Items (DB)
    - Characters (images)
    - Jails (DB)
    - Hospital Items (DB)

    Source:
    Download here.
    password: RaGEZoNE!

    Don't mind the messy code, I can code OOP, but my teammates can't code for shit. Honestly..
    Documents are dutch, rest is English.
    Last edited by jur13n; 18-06-13 at 10:18 PM.


  2. #2
    hi academic is offline
    MemberRank
    Jun 2010 Join Date
    AustraliaLocation
    484Posts

    Re: Text based Browser Game; My Little Gangsters

    The password encryption function you're using is not efficient and rather silly. You are receiving no added security, and I believe you're increasing the risk of collisions. It would probably be more secure just using a salt, with a sha1 hash.

  3. #3
    Account Upgraded | Title Enabled! thegim is offline
    MemberRank
    Nov 2011 Join Date
    257Posts

    Re: Text based Browser Game; My Little Gangsters

    Wow this is awesome,

  4. #4
    Enthusiast Wee Ric is offline
    MemberRank
    May 2013 Join Date
    37Posts

    Re: Text based Browser Game; My Little Gangsters

    can anyone do facebook login for this



Advertisement