Recent posts by truefire on Kongregate

Flag Post

Topic: Game Programming / Squeezing as much audio into a game

Note, this isn’t a Unity vs HTML5 vs Flash (vs Java vs Lua?) thread, so I’ll keep it short.

Unity?

No. At best, it’s an equivalent alternative to flash, certainly not better. As they are now, both are terrible abominations, but Flash is a terrible abomination that’s been around long enough to work out the really ugly issues.

HTML5?

Some day maybe. Today is not that day. The main issue is that web tech, due to it’s ubiqui…t… ub… universal-ness, is historically slow to progress, while something like a proprietary plugin doesn’t have the same issues holding it back.

Java?

Nope. Just nope. Java has a lot of problems and they’re not going anywhere. Ever loaded a Java app and had your browser crash with no explanation? Yeah, I thought so.

Lua?

“Lua?” indeed.

Really though, Lua is not something that works in browsers. It’s a scripting language that can easily be used server-side, but if you want Lua code running clientside, you’re going to have to use a Flash or Javascript (“HTML5” = Javascript) parser.

 
Flag Post

Topic: Game Programming / Squeezing as much audio into a game

Flash is really cool for UI stuff (<3 scaleform), but I really wish it would die as a means of making games

^this.

Although there’s no good alternative right now. I really wish NaCL had taken off. (No Unity is not a good alternative.)

 
Flag Post

Topic: Game Programming / Pointers On Cutting Code

I believe that is what truefire was getting at. Competent C++ and C# compilers automatically inline methods if it would increase performance.

Well, this is a thing sometimes. But even without the inlining, a function call in C++ is just a lot faster. Any function call can be done in two lines of bytecode. Even delegates.

 
Flag Post

Topic: Game Design / Drawing Quality Training

I would say 5 > 3 > 4 > 1 > 2 > 0.

For games, 3 > 1 > the rest is useless.

 
Flag Post

Topic: Game Programming / Pointers On Cutting Code

A, Definitely not…..though I wouldn’t worry in most cases. A few function calls won’t really make any difference…just, don’t do ~100,000 per frame.

This is true in flash (and some other languages), where function calls are obscenely slow. In lower-level languages like C++ however, function calls can be basically free.

 
Flag Post

Topic: Game Programming / Squeezing as much audio into a game

3) AAC does not work on Linux
bq. 1) AAC does not work in Firefox
bq. 2) OGG does not work in IE or Safari

Maybe natively in the browser, but this is for Flash. The Flash plugin is (more-or-less) standardized across browsers and OSes, so this isn’t really accurate. I have little experience with AAC, but I know last time I tried (a year or two ago, mind you), OGG was not natively supported in flash. I did manage to find a half-complete OGG parser for flash on the internet a few years ago and spent about a week getting it to work.* If anyone’s interested in that, I could maybe dig it up and post it.


*It was seriously some of the worst code I’ve ever seen, and that’s saying something. It didn’t help that the writer was apparently from France, so even the variables that weren’t 2 letters long weren’t in English. The killer for me was when I found a section of code that followed this pattern:

while (i < 2)
{
   while (i < 2)
   {
      while (i < 2)
      {
         //stuff
      }
   }
}
 
Flag Post

Topic: Game Programming / Any developers willing to help design a game?

Sent you a PM.

 
Flag Post

Topic: Game Programming / My passion for game development is wearing out

Originally posted by pugzy:
Originally posted by Aesica:
Originally posted by truefire:

Ever since I started working…

Stop working, obvious solution.

Unfortunately, doing so often causes the food, water, electricity, and shelter to start going away. Those are kind of important.

Only food, water, and shelter. :)

I agree, those aren’t very important. Electricity though…

 
Flag Post

Topic: Game Programming / My passion for game development is wearing out

Ever since I started working…

Stop working, obvious solution.

 
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.