Knuckle Cracker

Knuckle Cracker => Support => Topic started by: Lord_Farin on July 09, 2011, 11:19:49 AM

Title: Integer overflow in emitter strength
Post by: Lord_Farin on July 09, 2011, 11:19:49 AM
In the impossible code maps forum, I spotted the map 'omnomnomnomnomn' which has 14 emitters, with a total strength exceeding the Java constant Integer.MAX_VALUE. This yields a negative average emitter strength. Just thought I should notify you.
Title: Re: Integer overflow in emitter strength
Post by: Echo51 on July 09, 2011, 12:10:24 PM
Hmm? the game is coded in flash, so i don't get how it would overflow the java constant.

also, i don't see any overflow happening in that specific map?
Title: Re: Integer overflow in emitter strength
Post by: mthw2vc on July 09, 2011, 12:14:25 PM
This is a known issue that occurs when the total intensity of all emitters on a code map exceeds 2 147 483 647. There are other scenarios in which you can overflow the data structure as well.
Title: Re: Integer overflow in emitter strength
Post by: Lord_Farin on July 09, 2011, 12:34:46 PM
Quote from: Echo51 on July 09, 2011, 12:10:24 PM
Hmm? the game is coded in flash, so i don't get how it would overflow the java constant.
I am sorry for the mixup. Probably Flash has the same maximal integer value.
Title: Re: Integer overflow in emitter strength
Post by: knucracker on July 09, 2011, 12:51:32 PM
This has been fixed in the current beta build and won't be a problem in the next game drop.
It is indeed an overflow of a signed integer type (and 'int' in AS3).
Title: Re: Integer overflow in emitter strength
Post by: cclloyd9785 on July 09, 2011, 05:19:02 PM
Are there any of these maps that are actually possible?  As in no surface emitter like the one he just posted?

I wanna kill a lot o creeper :P
Title: Re: Integer overflow in emitter strength
Post by: UpperKEES on July 09, 2011, 05:29:30 PM
Almost all maps are possible. Just have a look at the Code Map board (http://knucklecracker.com/forums/index.php?board=16.0).