Recent posts by BrainStormer on Kongregate

Subscribe to Recent posts by BrainStormer on Kongregate

avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Lost Magic / access denied

Hi. That was a temporary issue. Everything is allright now. Sorry for the inconvenience caused.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Lost Magic / Server merge issues.

Hi.

We are currently working hard and tirelessly to make it allright. Here’s what’s going on recently…

Newly added items to the Auction House should work and display correctly.
Location images have been translated.
Jewellery recipes have been recovered.
Library and Events’ images have been fixed.
Characters’ ‘Extra’ parameters’ names have been translated.

Chat Achievement notifications in wrong language are currently being fixed.
Wrong language in mail letters is also being fixed.

Please reequip belt items for them to work correctly.

We are sorry for any current inconsistencies, but don’t you worry, everything will be fine.

Thank you.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / displayList enigma

Put every tile into some array and then sort it by the ‘y’ property.

tilesArray.sortOn("y", Array.NUMERIC);
for each(var tile:Tile in tilesArray) {
  addChild(tile);
}

Something like this. Not the ‘techy’ way, but convenient. Does this help?

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / Adobe Air Application Quitting Automatically

Does targeting release mode solve this issue?

I didn’t quite catch of what you said. What is a targeting release mode?

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / Adobe Air Application Quitting Automatically

I have experienced such problems several times before. The solution for me turned out to be a very strange one: comment out all the trace calls. Or delete them. I didn’t research this issue further though and don’t know whether this is your case too.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / Is it possible to "inherit" an interface from a type?

Originally posted by skyboy:

Originally posted by BrainStormer:

I have a strong opinion, and you’ll never convince me otherwise

well, that’s a stupid stance to have on anything.

And that is your strong opinion on which I am not going to convince you otherwise. Anyway, I’m sorry, didn’t intend to say anything rude.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / Fullscreen resolution

In most modern-day videogames (non-flash) you can change the fullscreen resolution.

As far as I know there is yet no way to change the Flash Player’s output fullscreen nor windowed resolution. You can use blitting to make the output look like it should be at a lower resolution, but technically it will still “feed” your monitor with all the pixels for it’s current resolution. Say pixel doubling will make four adjacent pixels show the same color, so visually it will look like half the resolution, but it’s still four smaller pixels, not one big one. And I don’t know whether or not will you get any performance boost that way.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / Is it possible to "inherit" an interface from a type?

I have a strong opinion, and you’ll never convince me otherwise, that only the programmer that does the task decides which tools to use and which way to use them for that task. If you know how to use a factory and you feel comfortable and convenient with it then use it as long as it makes the job done the better way. Yes, if it is a spice rack then maybe you need just a hammer, but if your task is to build a Boeing and you are going to do it all with hammers, well then, you’re screwed.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / Is it possible to "inherit" an interface from a type?

I don’t know any more decent IDE than the latest FDT. Flash builder doesn’t do a bunch of critical things, so does not FlashDevelop.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / Is it possible to "inherit" an interface from a type?

i’m pretty sure it came about when people began using complex objects in pools; good intentions gone corporate

The reason here is much simpler. It’s not even a Factory Pattern actually, just a convenient name for the class which requests and receives broadly typed objects and then returns them. The whole thing is to eliminate any class dependencies between the object recepient (where I put that image) and the object’s class (the GenericImage itself) so I don’t have to wait about a minute for the IDE to rebuild the project each time after I make a tiny edit and press CTRL+S (which is meant to be done often). If nothing depends directly on the edited class then only that class gets rebuilt. Also cuts time during incremental compilation. It has nothing to do with patterns or coding habits, just a workaround for a silly problem.

Thanks, everyone!

PS: Sorry for my English.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / Is it possible to "inherit" an interface from a type?

It is extended. But in the construction

var image:IGenericImage = Factory.produceGenericImage();

the ‘image’ variable is of IGenericImage (interface) type, not just GenericImage. So I cannot addChild the ‘image’ because the interface IGenericImage is not a Sprite nor can it extend Sprite unfortunately.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / Is it possible to "inherit" an interface from a type?

Hi.

var image:IGenericImage = Factory.produceGenericImage();
image.load(IMAGES_PATH + model.image + ".jpg");
addChild(image as Sprite);

IGenericImage is an interface.
Here I cannot just addChild(image) because it’s type is not known (except it’s an Object), but in fact it is a Sprite. So I have to cast it as a Sprite everywhere. Also I’ll have to define a heap of other methods (like get x, set x, get y, set y, eight methods for all the rotations etc) in the interface.

Isn’t there a way to like inherit an interface from say the Sprite type?

Thank you.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / How to make a game scrollpane to scroll but the browser window to not?

Sounds good, but I didn’t quite catch this:

will allow you to catch and dispose of the events before they’re passed on to the browser

How… erm… How do I dispose of them and not let them be passed on to the browser? Simple event.stopPropagation() won’t work, will it?

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / [solved] AS3 vs Java: How to make function references?

Ah, nice!
Your example solves two problems at once. Thanks a lot.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / [solved] AS3 vs Java: How to make function references?

Hi.

I have a list of possible incoming commands. When a command arrives I am NOT doing a switchcase to determine what function to execute. Instead I call a reference by name. Here:

package {
	public class SomeClass {
		private var hashMap:Object;

		public function SomeClass() {
			hashMap = new Object();
			hashMap[Command.INITIALIZE] = initialize;
			hashMap[Command.CHECK_NICKNAME] = checkNickName;
			hashMap[Command.UPDATE_MODEL] = updateModel;
		}

		public function processCommand(command:String):void {
			if(hashMap[command] is Function) {
				var functionHandle:Function = (hashMap[command] as Function);
				functionHandle();
			}
		}

		private function initialize():void {
			// some code here
		}

		private function checkNickName():void {
			// some code here
		}

		private function updateModel():void {
			// some code here
		}
	}
}
<pre>

Now, I have spent days looking for a way to do this in Java. And didn't find anything. Is there a way?

Thank you.
 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / How to make a game scrollpane to scroll but the browser window to not?

Hi.

Say a published game here on Kong has a scrollpane somewhere inside it. When I mouseover it and roll the mouse wheel the scrollpane scrolls but the whole browser window scrolls too. How to avoid window scrolling?

Thanks.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / How to make space between text paragraphs?

So no easy way…

OK, I believe I can handle it by using TLFTextField but I cannot get it to work. TLFTextField doesn’t seem to exist inside the FlexSDK as my IDE (FDT that is) cannot resolve it and cannot import it. UNLESS I add TLFTextField into my Assets.fla library and compile it to .swc file. Now I can import it and use in my code.

All well but Flash IDE yields a warning while compiling .swc file:
Warning: No libraries were linked as Runtime Shared Libraries (RSLs) because of your publish settings: Export SWC

and .swc file grows by almost 500KB. How should I use TLFTextField the correct way?

EDIT: And the final .swf file grows by 200KB

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / How to make space between text paragraphs?

The text is going to be marked and copy-pasted by users to somewhere. This way the paste will include extra line breaks, which is not good.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / How to make space between text paragraphs?

Hi.

A single TextField should be formatted to display some text paragraphs. There should be extra spaces between each paragraph but not between the text lines inside the paragraphs.

It should look like this:

I have tried:
- Leading. Yields spaces between ALL text lines, not only between paragraphs.
- HTML ‘p’ tag. No change.
- HTML ‘font’ tag with large ‘size’ style and a space character. Some weird results.
- HTML ‘span’ tag with a single large-fonted space. Same as above.
- ‘margin-top’ style. No result as it is not supported.

How should I do it?

Thank you.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / [solved] How to get an array of public variables?

Thanks, guys.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / [solved] How to get an array of public variables?

vesperbot, thanks, but it would yield only dynamic members but not the ones declared like public var something:int.

UnknownGuardian, thanks, but no, I was just using a wrong account to post :)

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / [solved] How to get an array of public variables?

Hi.

For now I do the following:

var typeDescription:XML = describeType(event.data);
var variablesList:Array = (typeDescription..variable.@name as XMLList).toXMLString().split("\n");

It does the trick but the ‘toXMLString().split(“\n”)’ doesn’t look like an optimal way to do it.

Is there a better way?

Thank you.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / flash player bug not allowing saved info?

We have run into a similar problem recently. What has to be saved didn’t get saved after you close your browser/tab. But I have found a simple workaround: use sol.flush() explicitly when you need to save something. The default behavior that should automatically flush SharedObjects after the browser is closed is not working now for some unknown reason.

PS: I did not research this problem nor do I know whether this is a bug or whatever.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / AIR application installation directory

I’ve been looking at this to understand how bitmap transparency works. I just realized you were the same person.

Hehe :) Yep, long time ago :)

The “subfolder” it will make can than be renamed to the name of your “example folder” if need be, and you get the same result.

The thing is that the application is going to be wrapped into a third-party installer which also has to install into a subfolder. So goes: first installer installs the application .air file along with other third-party files into the c:\exampleDir then launches the AIR application installer in silent mode with arguments /location c:\exampleDir. AIR installer then creates another subdir c:\exampleDir\exampleDir. If I instruct the AIR installer to install to c:, it displays the fatal error saying another application with the same name (directory) exists.

 
avatar for BrainStormer BrainStormer 451 posts
Flag Post

Topic: Game Programming / AIR application installation directory

Hi.

When I install my AIR application and choose to do it in say c:\exampleFolder\ it actually installs it in a subfolder c:\exampleFolder\MyGameName\

How do I tell it not to make a subfolder and install directly where I point at?

Thank you.