Recent posts by truefire on Kongregate

Flag Post

Topic: Game Programming / GiTD #42 - *Pirates*

So GitD rules are pretty ambiguous. Am I allowed to reuse old graphical assets? (I have some pirate-and-other-thing sprites I made a while back and never used.)

 
Flag Post

Topic: Game Design / New to game design...

A more positive way to look at it would be “your 11th game will maybe not suck.”

 
Flag Post

Topic: General Gaming / Idle Mine rant

Wow that rant went deep. Did not expect.

 
Flag Post

Topic: General Gaming / Roguelikes

Dungeon Crawl Stone Soup.

 
Flag Post

Topic: General Gaming / Hardest/Most Fun Boss Ever!

Sephiroth in KH is probably the hardest

My favorite of all time is the final fight in MGS4.

 
Flag Post

Topic: General Gaming / Game of the Year 2013.

I was going to reply, but then I realized I haven’t played anything good from 2013.

I’ll just say The Walking Dead (the Telltale one, not the one based on the TV show), even though that was late 2012.

E: Actually, Ni no Kuni was 2013, so that.

Special mention for MGS Legacy Collection, but that’s actually just a bunch of older games bundled together.

 
Flag Post

Topic: Game Programming / AS3 Tips and Tricks

Read everything here.

 
Flag Post

Topic: Game Programming / Fun with Math

It’s possible to use the PseudoRNG in a way that doesn’t have that problem though.

First, let’s map (x,y) to a single index via dovetailing. This can be done uniquely in a way that scales infinitely on both axes (for integers). It can even be done in a way that works if the numbers can be indefinitely negative as well.

The mapping looks like this:


0 1 3 6 10 15 21 …
2 4 7 11 16 22 …
5 8 12 17 23 …
9 13 18 24 …
14 19 25 …
20 26 …
27 …

This can be done as follows:

//map x,y to v uniquely in a way that scales infinitely.
v = 0;
for (i in 1...x) { v += i; }
for (i in 1...y) { v += x + 1 + i; }

Now, we can get the ‘random value’ for ANY x,y simply by re-seeding / resetting our PRNG and then calling next() v times. We’ve created an entirely deterministic pseudorandom mapping for the integer x,y plane.

So, now, when we’re determining our answer for (x,y), we can look at any other values we want, regardless of whether they’re going to be generated before or after this one. (For example, we might want to look at the random numbers of every cell within 8 pixels).

Interdependence can be an issue (if the result at (x,y) relies on result at (x+1,y+1) and the result at (x+1, y+1) relies on the result at (x,y)), but there are ways around that. (resolving in clusters, mathematical resolution of recurrences, etc). You can even impose arbitrary rules (breaking the appearance of randomness, though not necessarily in any human-detectable way) that make it a non-issue.

 
Flag Post

Topic: Game Programming / What is this I don't even?

So I googled around. Flash stores BitmapData color channels pre-multiplied by the alpha. It undoes this transformation before returning the result when you call getPixel32. It seems to be subject to rounding error (GJ Adobe)

 
Flag Post

Topic: Game Design / Job - Looking for an EXPERIENCED platform game level designer

This is over a year old. I doubt he’s still looking.

 
Flag Post

Topic: Game Programming / Fun with Math

What is the point of rule 4? I can easily adhere to it while totally breaking the spirit of it — since this function is deterministic, I can easily re-compute old values within the scope of the function.

 
Flag Post

Topic: Game Programming / What is this I don't even?

package 
{
	import flash.display.BitmapData;
	import flash.display.Sprite;
	
	public class Main extends Sprite 
	{
		
		public function Main():void 
		{
			var wat:BitmapData = new BitmapData(30, 30, true, 0x11FF4488);
			trace(wat.getPixel32(10, 10) - 0x11FF4488); //1791
			wat = new BitmapData(30, 30, true, 0x11000010);
			trace(wat.getPixel32(10, 10) - 0x11000010); //-1
			wat = new BitmapData(30, 30, true, 0x2000F000);
			trace(wat.getPixel32(10, 10) - 0x2000F000); //-256
			wat = new BitmapData(30, 30, true, 0x20000000);
			trace(wat.getPixel32(10, 10) - 0x20000000); //0
		}
		
	}
	
}

Why is this happening? (I did this in an entirely fresh project. The code above is the entire everything.)

I tested it in AS3 and in Haxe, in FP versions 10.1, 11.3, and 11.8, the behavior was the same every time.

 
Flag Post

Topic: Game Programming / (True === False) ???

If it just throws a warning, then strictly speaking, it does compile.

=== is the “strict equality” operator. It’s more-or-less the same as the regular equality operator ==. You can read details here.

true === false will always evaluate to false, for obvious reasons.

Assuming flash has any kind of sanity to its design (I know, big assumption), false is stored internally as 0. null is probably stored as 0, or as some predefined memory address that’s guaranteed to have nothing in it (all memory addresses are >= 0). In either case, false < null evaluates to false, because 0 < 0 is false, and 0 < [positive number] is false. Derp. You get the idea though. (null = 0, probably)

It could also be that Adobe just randomly hard coded something like “everything is greater than null” into the comparison operators.

 
Flag Post

Topic: Game Programming / FlashDevelop's flawed Features

I have never had issues with auto-complete

I’ve had minor issues with weird builds (haxe + FD + obscure metaprogramming things, I get “InteractiveObject” recommended for “int”, which is not fun), or if I do something weird like rename the project file.

If only Visual Studio could be used as an AS3 IDE…

Yeah I love giving my entire RAM and CPU times five over to my IDE.

I don’t think I’ll ever find a better IDE than FlashDevelop.

A bit of an exaggeration maybe.

[all the crap cloa513 is saying]

You sound like an emacs guy. Go get emacs and stop complaining.

 
Flag Post

Topic: Game Programming / Show us a screenshot of what you're working on!

So, I’ve been working pretty hard on my project, and I’m pretty darn happy with my progress:

As promised, I toned down the bloom. Do you think I’m overdoing it on the dynamic shadows though?

 
Flag Post

Topic: Game Programming / Essential AS3 help again -- random "b"

You shouldn’t use try/catch for control flow

This is basically what I was saying. The other stuff was just me attempting to explain by example.

 
Flag Post

Topic: Game Programming / Essential AS3 help again -- random "b"

Worth noting: try/catch is really slow. It shouldn’t be relied on for the execution of your program. That is, try/catch should only be used to detect unknown errors, not as part of regular program flow.

For example, suppose you’ve got an array of length 10, and you allow the user to select 10 items to put in it. If the user selects 11, you plan to say “you can only select 10 items”. You should NOT do this by using a try/catch, and telling the user when you get an out-of-bounds exception. That’s part of the intended program flow, and should be dealt with via explicit logic. (something like if (selectedItems.length > 10) ... )

As a rule of thumb, catch block should be limited to cases where you can’t do explicit verification of an operation beforehand (like Disk IO in some platforms), or as a “Something went wrong and I don’t know what” panic button.

 
Flag Post

Topic: Game Programming / Show us a screenshot of what you're working on!

in my opinion, graphic is far from perfect.

I think this tutorial would be very helpful for you.

 
Flag Post

Topic: Game Design / Whatever you do, don't make THIS kind of game

you’d think that a first-person shooter developed by a “rock star” game designer would be a big hit for sure, but Daikatana just wasn’t.

It’s their fault for naming a shooter after a sword. A big sword. I want to chop things in half, not shoot stuff.

Games where you play a terrorist who targets innocent civilians

You mean Exploding Knife Sim?

Originally posted by Draco18s:
Originally posted by GameBuilder15:

Games that put you in the shoes of a guy who kills innocent people aren’t uncommon.

And normal people would classify this kind of person, in the real world, as a terrorist, no?

I am going to start telling people Skyrim is a game about terrorism. It’s basically true, and you know it.

 
Flag Post

Topic: Game Design / New Game design By My Best Friend

Why the avatar has to go through so much hardship and pain to kill himself is beyond me. I hear that slitting your wrists while in a tub of warm water is easier and much more pleasant.

I hear it makes a lousy game though.

 
Flag Post

Topic: Game Programming / Composing Game Audio?

That track you linked is probably a $10,000 track.

Possibly an understatement. TSFH is like the goto band for super-high-budget action movies. (They’ve done trailers for Pirates of the Carribean, The Dark Knight, and Harry Potter, to name a few.) They’ve also done music for games such as SW:TOR (aka the most expensive game ever created), Mass Effect 2&3, Resident Evil 6.

That particular song that was linked was used in Avatar: The Last Airbender (yeah, crap movie, still expensive), and Mass Effect 3.

See here for more.

 
Flag Post

Topic: Game Programming / as3 bubbling problem

Wrap your code in <pre> tags so we can read it.

public function sample():Void
{
	trace("this");
	trace("is");
	if (true)
	{
		trace("a sample");
	}
|
 
Flag Post

Topic: Game Programming / Show us a screenshot of what you're working on!

Everyone likes teleporter mazes, right?

Saffron city gym!

 
Flag Post

Topic: Game Programming / Show us a screenshot of what you're working on!

Personally I like his use of bloom.

I’m probably going to tone it down, it draws focus away from my solution to the halting problem in the background.

 
Flag Post

Topic: Game Programming / GiTD #35 Ten Seconds

Meh theme…

^ditto