Arcade Prehacks

Results 1 to 10 of 40
Like Tree3Likes

Thread: [GAME] Let's create

Hybrid View

  1. #1
    Super Moderator ZuckeR's Avatar
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    1,775
    Work and other hobbies kept me occupied a bit from working on the game. I am a lazy guy that gets easily distracted Anyways, here is a little update.

    High numbers
    As the value of the hacks/clicks probably will go up to quite a high number i added a way to format high numbers neatly. It is fairly simple and works with an array of names which can be expanded if needed at some point. Right now numbers up to 10^75 are supported but can easily be added by simply including more names in the array.

    The game and the formatting function work with the Number type of AS3 which supports numbers as high as 1.79E+308 (IEEE-754, double-precision). It should be no problem to truncate the values with higher numbers as rounding errors will occur anyways.

    Have a look at the original commented code here:
    Code:
    private var _numberFormatter:NumberFormatter;
    private var _numberWords:Vector.<String> = Vector.<String>(["Billion", "Trillion", "Quadrillion", "Quintillion", "Sextillion", "Septillion", "Octillion", "Nonillion", "Decillion", "Undecillion", "Duodecillion", "Tredecillion", "Quattuordecillion", "Quindecillion", "Sexdecillion", "Septendecillion", "Octodecillion", "Novemdecillion", "Vigintillion", "Unvigintillion", "Duovigintillion", "Tresvigintillion", "Quattuorvigintillion"]);
    
    /**
     * Format a number as string with words for numbers higher than 999,999,999.
     * 
     * Delimiters are of the US english type "," and "." as decimal mark.
     * Names are taken from: http://en.wikipedia.org/wiki/Names_of_large_numbers
     * 
     * @param	val	The number to format.
     * @return	Formatted string.
     */
    static public function numberWords(val:Number, fractionalDigits:int = 0):String
    {
    	// Set amount of decimal digits
    	_numberFormatter.fractionalDigits = fractionalDigits;
    
    	// Format number to include delimiters.
    	var txt:String = _numberFormatter.formatNumber(val);
    
    	// Add words for numbers of 1,000,000,000 and higher.
    	if (txt.length >= 13)
    	{
    		// Calculate the words array position.
    		var i:int = Math.floor( (txt.length - 13) / 4 );
    		i = i < 0 ? 0 : i;
    
    		// Check if a word for that number is available.
    		if (i < _numberWords.length)
    		{
    			// Extract the first 5-7 digits including the delimiter (1,000 - 999,999)
    			txt = txt.substr(0, 5 + (txt.length - 13) % 4) + " " + _numberWords[i];
    
    			// Replace the delimiter with decimal mark.
    			txt = txt.replace(",", ".");
    		}
    	}
    
    	// Return formatted text.
    	return txt;
    }
    The first helpers
    They look like ugly boxes (which they are) but they do work as they are supposed to. You can buy them which multiplies their price by 1.15 and adds an amount to HpS (Hacks per Second). They need a better look and names and their values like price and income are not final.

    Can you? Come up with some ideas for names of helpers that would fit the games theme? What should they cost and how much would they increase the HpS? Tell me your ideas and we will see which ideas might get into the game.

    No graphics
    I haven't added any graphics besides the computer which is the main button. The game looks pretty lame right now as i was focusing on getting the game to work.

    Can you? Tell me what the game should look like? What colors should the game be in? Create some graphics for the background, helpers, main button. Even if you just create some sketches to show us how you would like the game to look like.


    Try the new version here: HackClicker-2014.03.14.swf

  2. #2
    Senior Member ChaoticCHAOS99's Avatar
    Join Date
    Feb 2014
    Location
    MY WORLD!
    Posts
    305
    eeerrmm right how about hax being a name for one of them hex, bare (as in hack bar) kay(AS IN KEY HACKS) ..........

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •