Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411367 Posts in 69352 Topics- by 58404 Members - Latest Member: Green Matrix

April 13, 2024, 06:09:36 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
  Show Posts
Pages: 1 ... 71 72 [73] 74 75 ... 80
1441  Developer / Technical / Re: Flash: Including files in SWFs on: February 25, 2009, 09:06:35 AM
Unless of course you are saying that this process in itself is too time consuming, in which case i'm not sure there is a faster alternative.

It's fine for small projects, but presumably you can see why it wouldn't appeal with several hundred images and rising!

You could probably write a JSFL script (if you're using the Flash IDE) to do this for you (based on some external data source).

Thanks - sounds like a good idea.
1442  Developer / Technical / Re: Flash: Including files in SWFs on: February 25, 2009, 01:56:23 AM
One possibility might be to write a simple program that takes a list of files and writes a .as file embedding them all.

This is basically equivalent to the "dummy classes" approach, though. In fact it's slightly worse since it would then also require me to write a selector function to pull out the particular XML file I wanted.

Quote
You could also make the whole thing as a document class for use in the Flash authoring environment. You could still do basically everything with code that way, but would still be able to build a library and access it. Of course, you'd need Flash.

I have Flash CS3. Can you elaborate on this plan, please? It sounds promising, but I don't have the faintest idea what you're referring to! Huh?
1443  Developer / Technical / Flash: Including files in SWFs on: February 25, 2009, 01:11:28 AM
I'm currently working on a large Flash project and have run into an irritating problem. My software currently has two deployment paths:

1) Using Adobe AIR to build a desktop application.
2) Running from a website using dynamic loading of assets.

Both of these work well and do exactly what I need them to do.

The problem is that I want to add a new deployment path:

3) Entire application as a self-contained SWF.

This is causing problems because there doesn't seem to be any practical way to build the project assets into the SWF.

I can add graphics and audio to the Library, but in order to access them from ActionScript I seemingly need to export each asset individually. With literally hundreds of images and audio clips involved this is unacceptably time-consuming.

Even more problematically, there doesn't seem to be any way to include .xml files in the SWF as Library elements. The only way I can find to get data in at all is to create dummy ActionScript classes to wrap each XML file. This is about as elegant as an elephant in a leotard.

Does anyone know of any way to do this stuff? Failing that, anyone got any cunning workarounds?
1444  Developer / Technical / Re: Rinku & Increpare (and more?) Learn Flash on: February 23, 2009, 12:23:33 PM
Can I have a function that returns a function?

Yes. And more generally since Function is a class you can do anything with functions that you can do with objects.

Your example I would write like this:

Code:
public function functionMaker(limit:int):Function {
 var testFn:Function = function(value:int):Boolean {
  return(value > limit);
 }
 return(testFn);
}
1445  Developer / Technical / Re: Action Game Maker? on: February 23, 2009, 09:20:58 AM
Size is about 57MB (for three games, which seems a bit hefty to me, how is that supposed to be distributed by Flash?)

Whilst most Flash games are played in the browser over the internet that doesn't need to be the case. 57MB is no problem for a Flash game provided it's installed to your hard drive.
1446  Developer / Technical / Re: Rinku & Increpare (and more?) Learn Flash on: February 23, 2009, 02:28:17 AM
bateleur: forEach.

Well yes, that's my point. We don't need the stupid version of map they've written because it's a few lines of code to reimplement it (using either for each or just about any other means of iteration).
1447  Developer / Technical / Re: Rinku & Increpare (and more?) Learn Flash on: February 22, 2009, 08:54:22 AM
Wow I hadn't seen the map command before... that one's really interesting.

But unfortunately rather badly designed.

What with Flash having closures in it would be easy to get an array result if you wanted it anyway, like this:

Code:
function mapThis(someArray:Array,someFunction:Function):Array {
  var localArray:Array = new Array();
  var toReturnArray:Function = function(n:Number):Number {
   localArray.push(someFunction(n));
  }
  someArray.map(toReturnArray);
  return(localArray);
 }

...but the way they've implemented it you can't stop it from creating a new array if you're mapping just for side effects. (Which in an imperative language you often are. But of course 'map' originates from functional languages.)
1448  Developer / Technical / Re: The grumpy old programmer room on: February 22, 2009, 08:43:32 AM
What is the general consensus on tabs in code?

There is no consensus and like increpare says it's a can of worms.

That said, your programmer friend is right and I will rip the head off anyone who uses tabs then urinate down the hole. In a friendly and constructive way, of course.
1449  Developer / Technical / Re: Rinku & Increpare (and more?) Learn Flash on: February 21, 2009, 12:27:59 AM
Ya but the thing about javascript extensions (if I'm not mistaken) is that the javascript has to be on the html page the swf is embedded on.

To say nothing of this:

Quote from: the article
Opera will not work

So they want to take one of the first decent portable environments we've ever had and break the portability? EPIC FAIL!

(But thanks to Markham for the link nonetheless.)
1450  Developer / Technical / Re: Rapid development on: February 19, 2009, 08:05:00 AM
I have tried to do this a little recently: I've tried to separate 'engine' and 'game', but usually I end up tinkering about with the engine code to make it game-specific

Which is fine. That's exactly how I work, just make sure you get the generic version working and save a copy somewhere before you add the game-specific hacks!
1451  Developer / Technical / Re: Peevish Peruses Python on: February 18, 2009, 11:30:41 PM
Unrelated: Peevish finds single grain of cooked rice stuck to neck, is confused.

I dunno, are you sure that's not a Python bug?
1452  Developer / Technical / Re: The bashful, dopey, sleepy, sneezy, and doc programmer room on: February 18, 2009, 01:26:12 PM
Ever program something that makes you feel bashful/dopey/sleepy or sneezy?

Or maybe you programmed something that makes you feel Snow White. That would be fun too. Tongue
1453  Developer / Technical / Re: Pathfinding happiness on: February 17, 2009, 07:06:15 AM
This app is nice!  Hand Thumbs Up LeftGrin

Actually, if red/blue is just distance-to-target, then you don't really need the red/blue channels since they're just going to be radial gradients

Unless I'm misunderstanding something, they're distance-as-walked, not the cartesian distance. Calculating them requires walking the maze.

Quote
Supporting moving obstacles (green channel, which is the interesting/complicated part) would require updating the distance field.

The green channel will be much easier to update than the others in a typical case.
1454  Developer / Design / Re: So what are you working on? on: February 15, 2009, 01:57:31 AM
I've been fiddling with Box2D in Flash

Good to see you got the helicopter working!  Hand Thumbs Up LeftGrin

Inspired by Hanna in a Choppa?
1455  Developer / Technical / Re: AS3 for Games on: February 15, 2009, 01:45:06 AM
This site seems like a very good idea. I hope to be able to contribute at some future point.  Beer!
1456  Developer / Technical / Re: The grumpy old programmer room on: February 15, 2009, 01:41:30 AM
Today I am grumpy about memory allocation failures.

At least that's what I assume I'm seeing... it's weird. Scaling a DisplayObject with a mask set (in Flash 9) where the mask has an alpha channel, I see the mask periodically (every half dozen scale ops or so) vanish when I haven't told it to. If I unset cacheAsBitmap then this doesn't happen... but of course that stops the alpha channel working. WTF
1457  Developer / Design / Re: So what are you working on? on: February 13, 2009, 06:10:31 AM
I assume he meant compositionally, not heroism-wise, in which case I agree

I rather like her pose as it is, actually. Disaffected slouch FTW! Tongue
1458  Developer / Technical / Re: The grumpy old programmer room on: February 12, 2009, 01:17:47 AM
Yeah, I hate any type of auto formatting in any type of writing program.

Seconded.

Fortunately in many cases the autoformatting can be disabled. One of the first commands I learned in emacs was the autoformat-and-related-junk disabling command M-x fundamental-mode. Makes the world a better place!

A related irritation is Tab characters in files. I have wasted many hours of my valuable time flaming the clowns who insist on using them. Apoplectic
1459  Developer / Technical / Re: Developing a point & click adventure in Flash on: February 11, 2009, 10:05:55 AM
So, am I barking up the wrong tree here?

Not at all. Your plan is a good one. Flash is well suited to your purposes and Actionscript 3 is a perfectly good modern language.

You will likely want to use something like Flash/Flex, but since I'm a CS3 user myself I'll leave it to people who actually use Flex to advise you on that.

Good luck with the game. I look forward to hearing more about it as you progress and eventually getting to play it! Beer!
1460  Developer / Technical / Re: Convert a game maker file for web on: February 11, 2009, 06:52:58 AM
i need to know if there's something that converts it for playing it in a browser

No, unfortunately not. You would have to program a new version of the game using Flash, Java or some other technology for which client-side plugins are widely installed.
Pages: 1 ... 71 72 [73] 74 75 ... 80
Theme orange-lt created by panic