Recent posts by Nabb on Kongregate

Flag Post

Topic: General Gaming / Rebuild: Tips, Strategies, Etc

If you build your fort as a monitor aligned square, you have a smaller number tiles adjacent to your perimeter. For example:

/\/\/\
\/\/\/
/\/\/\
\/\/\/
/\/\/\
\/\/\/

This is a 13 square fort with 12 adjacent squares. If you build diamonds, a simple 3×3 will already have this many adjacent squares.

 
Flag Post

Topic: Kongregate / Look! It's a huge list with every game on kongregate on it!

Originally posted by UnknownGuardian:

It has the exact number of games the counter on the site has. It also has games rated lower than a 2, so therefore I am going to claim that everyone’s assumption that the counter only counted more than a 2.x or whatever is wrong, and Kong has exactly the number of games its counter states.

EDIT And writing a script to count the unique number of devs keeps timing out (> 15 sec to run), even when I remove as much info as I can from the xml file before parsing it…

$ wget -O- http://www.kongregate.com/sitemap.xml | sed '/games/!d;s=.*.com/games/\|/.*==g' | sort -u | wc -l

That wasn’t too hard, was it?

 
Flag Post

Topic: Game Programming / Minimum Cost / Maximum Profit Algorithm

Although Dijkstra’s algorithm and A* are available options, the data is a directed acyclic graph (description needs reworking but I assume it is) and a topological sort has already been performed on it. As a result, an asymptotically optimal algorithm taking advantage of the DAG’s topological ordering is available using the straightforward method that is dynamic programming.

 
Flag Post

Topic: Kongregate / New Kongregate Version: CR 2010.08.25

Originally posted by Vegard20:

So like when you write in the password-box the text is not visible? Like if you write pass123 it will look somewhat like: •••••••
???

Yes.

 
Flag Post

Topic: General Gaming / 60s to Save the Queen Speedrun

It’s a glitch – I had 37 before I found it though.

 
Flag Post

Topic: Kongregate / If (Recursion) {Recursion}; Badge

http://en.wikipedia.org/wiki/Tail_recursion

 
Flag Post

Topic: General Gaming / Manufactoria Walkthrough / Optimization Thread

Originally posted by Observer2:

Teachers 1:13 | 26
http://pleasingfungus.com/?lvl=21&code=y11:2f2;p12:2f3;y13:2f2;b13:3f2;c14:2f3;p14:3f3;y15:3f0;c13:13f0;c14:13f0;c12:4f2;c13:4f2;q13:5f3;c14:4f3;q14:5f3;c14:11f3;b12:5f1;c12:7f2;y12:8f1;c13:7f2;p13:8f3;c14:7f3;p14:8f3;c14:6f3;c14:9f3;c14:10f3;c14:12f3;

This is an invalid solution.

 
Flag Post

Topic: General Gaming / Manufactoria Walkthrough / Optimization Thread

Here are the times and lengths I have so far. As far as I am aware, all of my solutions will work correctly for all inputs (assuming the tape is infinite). All of my solutions were created independently, using cited times and lengths as benchmarks (:S indicates the existence of a faster/shorter solution in the thread)

  • Robotoast!
    • 0:02 | 3
  • Robocoffee!
    • 0:07 | 3
  • Robolamp!
    • 0:21 | 8
  • Robofish!
    • 0:17 | 4
  • Robobugs!
    • 0:25 | 11
  • Robocats!
    • 0:24 | 10
  • Robobears!
    • 0:39 | 15
  • RC Cars!
    • 0:08 | 7
  • Robocars!
    • 0:20 | 7
  • Robostilts!
    • 0:30 | 9
  • Milidogs!
    • 0:23 | 8
  • Soldiers!
    • 0:04 | 7
  • Robotanks!
    • 0:26 | 26
  • Robospies!
    • 0:17 | 8
  • Androids!
    • 0:15 | 12
  • Robo-children!
    • 0:24 | 21
  • Police!
    • 3:00 | 43 (:S)
  • Judiciary!
    • 3:20 | 64 (:S)
  • Politicians!
    • 0:13 | 26
  • Academics!
    • 3:20 | 27
  • Engineers!
    • 1:07 | 25
  • Roborockets!
    • 0:12 | 7
  • Roboplanes!
    • 0:14 | 7
  • Rocket planes!
    • 1:04 | 17
  • Seraphim!
    • 0:36 | 23

(hopefully there are no typos)

 
Flag Post

Topic: Game Programming / Code Jam Round 1

The simple solution to C: http://codepad.org/qIdDQ7o2

 
Flag Post

Topic: Game Programming / A cool sort I made

I’d like to point out, even though this thread has moved past the topic, that a function can be in a linear superposition of the quantum states both O(N² log N) and O(N³). Also the function specified is O(N³).

 
Flag Post

Topic: Game Programming / A cool sort I made

O(n2.5) is uncool though. (I have no mathematical backing for this claim, feel free to investigate yourself.)

 
Flag Post

Topic: Game Programming / Code Jam Round 1

Originally posted by Jabor:

Since I consider using a language designed for golfing to be cheating:

perl -nE 'split;say"Case $.: O",($_[1]+1)%2**$_[0]?"FF":"N"'

49 characters, in a language designed for practical use rather than for golfing.

I consider using a language designed for golfing in golf legitimate, using command line options and not counting them cheating, and not outputting the correct output disqualification.

 
Flag Post

Topic: Game Programming / Code Jam Round 1

Originally posted by jonathanasdf:

that’s even longer because of the quotes.

Nabb, I don’t believe you… lemme see.

I can think of nine distinct ways to modify my solution to use “: O” separate from the FF and N without changing the number of bytes used.

edit) 528 ways xD

 
Flag Post

Topic: Game Programming / Code Jam Round 1

I have a 43 character solution.

 
Flag Post

Topic: Game Programming / Code Jam Round 1

Originally posted by jonathanasdf:

And Nabb, you lie.. you didn’t do them in 281 characters, or 100 characters, or 69 characters…. Unless your username for gcj is not Nabb.

I chose to submit java code because I couldn’t be bothered making a readme.

I will provide here my 100 character solution to B:

n%(;{' '%(;0:|;[{|\~:|-abs}/]0-(\{{.@\%.}do;}*.@1$%.{-}{\;}if\({}{;0}if}/]0:|;{"Case #"|):|@": "\n}/
 
Flag Post

Topic: Game Programming / Code Jam Round 1

I did problem C in 281 characters :| (and B in 100, and A in 69…)

 
Flag Post

Topic: Game Programming / Number delimiting

Maybe you should try having the function actually output correct values?

 
Flag Post

Topic: Game Programming / Number delimiting

I was referring to all of the code posted here.

Here’s an example of a partially optimised code that actually does work.

function n2 (num:Number, delimiter:String = ",", numCharGroup:Number = 3, decimalPrecision:int = 2):String {
	var fixed:String=num.toFixed(decimalPrecision);
	if (numCharGroup<=0)return fixed;
	decimalPrecision==0?decimalPrecision=-1:0;
	var len2:int = fixed.length - decimalPrecision - 2 - numCharGroup-(num<0?1:0);
	if (numCharGroup==1&&num>1)len2++;
	var count:int = ((len2) % numCharGroup)+1+(num<0?1:0);
	if (len2<0)return fixed;
	len2+=num<0?1:-1;
	var out:String=fixed.substr(0,count)+delimiter;
	if (len2<20+numCharGroup<<1) {
		while (count <= len2) {
			out+=fixed.substr(count,numCharGroup);
			out+=delimiter;
			count+=numCharGroup;
		}
		return out + fixed.substr(-decimalPrecision-1-numCharGroup);
	}
	while (count < 20) {
		out+=fixed.substr(count,numCharGroup);
		out+=delimiter;
		count+=numCharGroup;
	}
	var ze:String=fixed.substr(count,numCharGroup)+delimiter;
	var n:Number=int((len2-count)/numCharGroup)+1;
	while (n > 0) {
		if (n&1) {
			out+=ze;
			n--;
		}
		ze+=ze;
		n/=2;
	}
	return out + fixed.substr(-decimalPrecision-1-numCharGroup);
}
 
Flag Post

Topic: Game Programming / Number delimiting

Did anyone notice none of the code posted here works?

 
Flag Post

Topic: Game Programming / PHP and unique user ID

You’re probably looking for this

 
Flag Post

Topic: Kongregate / Blue Avatar Week

Originally posted by Gevock:

Cool, blue avatar week.

-_______________________________-

 
Flag Post

Topic: General Gaming / Perfect Balance 2 Walkthrough

geez.

 
Flag Post

Topic: Game Programming / Kongregate Longest Lasting Game Contest

Since this topic already exists…

(from the official rules)

By entering this Contest, you (and if a minor, your parent or legal guardian) represents, warrants, and agrees that your Entry: (i) is original and was created solely by you

(from the FAQ)

(i.e. either one of the game developers or the game sponsor)

Is collaboration permitted?

 
Flag Post

Topic: Kongregate Multiplayer Games / [Heroes of Gaia] Objects following map scroll

Weird glitch, I have a water wheel, and a couple of other things following the map scroll. Not sure how, but I had visited the water wheel prior to this happening. It stopped upon entering and exiting my castle.

 
Flag Post

Topic: General Gaming / Clockwords (Walkthrough)

Originally posted by Darth_Sirov:

I’m just finding the word penetration quite the most amusing one, from such a wordy list.

It was totally plural.