Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411262 Posts in 69320 Topics- by 58379 Members - Latest Member: bob1029

March 26, 2024, 03:26:34 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
  Show Posts
Pages: 1 ... 75 76 [77] 78 79 80
1521  Developer / Technical / Re: Actionscript 3: Assistance required on: November 20, 2008, 09:09:10 AM
I've got a little problem with defining a constant (or generally just a variable) that every class in the project is supposed to access.

The approach you seem to be attempting works like this:

* Make your constant a public static field of some class (say "Global") and then access it as "some.package.path.Global.myFieldName".
* As above, but use "import some.package.path.Global" to allow you to use the shorter "Global.myFieldName" to refer to it.
1522  Developer / Technical / Re: A Few Questions About Flash on: November 19, 2008, 12:32:52 PM
So in essence it's recommended to work with bitmap graphics instead of vector graphics?

I've not used vector graphics in ways that really push the performance limits, so I'm uncertain exactly how much that would slow you down. As far as I can tell the vector performance isn't bad, though.
1523  Developer / Technical / Re: A Few Questions About Flash on: November 19, 2008, 03:30:18 AM
I'm quite amazed how massive the difference seems to be when you just do 100 tweens in AS2 and 100 tweens in AS3 using the standard Adobe tweening class.

That's because Adobe's class isn't very good!

But then, it's not really for programmers. To get the best from Flash you want to:

* Use BitmapData wherever possible (and avoid re-rendering things which haven't changed between frames).
* Use Matrix for transformations. Pre-compute and cache where possible.
* Avoid spreading graphical data across too many layers if you don't really need all the clever compositing.

About the only 2D game I can think of which wouldn't run smoothly in Flash is Goo.
1524  Developer / Technical / Re: A Few Questions About Flash on: November 13, 2008, 10:35:01 AM
Basically, Flash gives you the ability to do stuff that is computationally expensive. If you want. And it's really useful, but too many people abuse it by doing it constantly without realizing it.

Yup, I see this all the time.

I'm becoming increasingly tempted to write a Flash demo that just renders loads and loads of smoothly animated stuff at once for no other reason than to show how fast it is.

I suspect there's also a large element of mythology about it. Because early versions of Flash were slow, people assume without checking that AS3 is the same. (Same as the way some people never updated their perspective on Java after good JIT compilers appeared.)
1525  Developer / Design / Re: The games you designed as a child (image heavy) on: November 08, 2008, 08:32:36 AM

"THE LEGEND OF CRYSTALIS"... isn't that the subtitle for Final Fantasy XIII? Did Squeenix buy the rights off you then?

Also, I love "ring, does what?".
1526  Player / General / Re: The TIGForums Twenty 2008! on: November 08, 2008, 04:55:22 AM
1.  [60] Dynasty Tactics 2 (PS2)
2.  [40] Lemmings (Amiga)
3.  [20] Micro Machines V3 (PS)
4.  [20] Super Street Fighter II (arcade)
5.  [20] Armadillo Run (PC)
6.  [15] Super Bust-a-Move (PS2)
7.  [10] Final Fight (arcade)
8.  [10] Soul Calibur II (PS2)
9.  [10] Diablo II (PC)
10. [5] Portal (PC)

(Some of the above were multiplatform - I've listed the version I played in case not all versions were identical.)
1527  Developer / Technical / Re: What are the differences between C++ and C# on: November 06, 2008, 05:13:44 AM
There are many benefits to c++ over c# & vice versa. You will never make use of any of them.

Ooh, now that's a rather controversial claim, sir!

If nothing else, C# is garbage collected, which make a HUGE difference to novice and expert alike for any program more complex than "Hello, World".

And as for C++, the main motivation is portability. This might seem like something a novice would never use, but as soon as you decide to buy a Mac as your next machine, you'll suddenly care a lot.
1528  Developer / Design / 3D on: November 05, 2008, 01:10:10 AM
Ishi> Very nice style!

toastie>  Shocked Impressive! Beer!
1529  Developer / Technical / Re: What are the differences between C++ and C# on: November 04, 2008, 03:14:38 AM
I am trying to decide which one to learn and use what are the pros and cons of each one

C# is a better language, but C++ is way more important and useful in the real world.

If you don't mind programs taking forever to write and crashing a lot, C++ is definitely the right choice. :D
1530  Developer / Technical / Re: Animating bosses made from multiple objects on: November 01, 2008, 02:25:09 AM
I've been doing this kind of stuff with my current project. The solution I adopted involved describing everything in terms of "poses". A pose is a bit like a keyframe, but doesn't necessarily have to correspond to anything visual. So for example:

Code:
<pose name="punch_right">
 <apply pose="face_angry"/>
 <set joint="right_elbow" value="0.0"/>
 <set joint="right_shoulder" value="90.0"/>
 <apply pose="leftarm_close"/>
</pose>

A few things to note about this: First, "face_angry" is an instruction to use a different face bitmap, it won't change the relative positions of anything. Second, the lack of leg directives in the above pose means that the legs will carry on doing whatever they were doing before when this pose is applied. This greatly reduces the amount of animating work required in some cases (although it does make things less convenient for your project's artists). Thirdly, as with many animation systems the joints will ease onto the given values, not snap there.

I want to add some control over easing patterns and stuff like that, but haven't got round to it yet.

(And the reason it uses XML is to save me development time, not because it's necessarily a good choice.)
1531  Developer / Technical / Re: Actionscript 3: Assistance required on: October 30, 2008, 03:47:23 PM
Anyone know if there is a way to convert a string into an object reference?

Isaac's advice is good, but just in case you're curious... In the specific case of tiles defined in your SWF's Library, you can do stuff like this:

Code:
var classObject:Class = getDefinitionByName("Tile" + number) as Class;
var myTile:DisplayObject = (new classObject() as DisplayObject);

That assumes your classes for the tile symbols in your library are called "Tile1", "Tile2" etc. and that they have zero-argument constructors.

This is sometimes the neatest way to pull large quantities of stuff out of the Library in a purely programmatic way.

(Disclaimer: Code section above written from memory and not tested!)
1532  Developer / Technical / Re: Lag issue on flash on: October 27, 2008, 09:21:09 AM
Just a quick note: If you're using Flash CS3 / Actionscript 3 / Flash 9 or later versions you really shouldn't be able to see any lag with something so trivial.

The advice you've been given regarding pre-rendering to BitmapData is all good, but you might also want to look into why things are going slowly, because they really shouldn't be.
1533  Developer / Technical / Re: Beta testing tips? on: October 26, 2008, 09:40:49 AM
"Luckily" for us, there's so many glaring errors in our game that anyone who looks at it for five minutes can give us two days work debugging.  :D

Oh, that's not just you! Indeed, if any game goes into testing and isn't full of bugs I'd be tempted to argue that it means testing started too late (you don't want to be in a situation where testers are complaining about gameplay and you can't fix it because you're out of money and have to release in a week).
1534  Developer / Technical / Re: Actionscript 3: Assistance required on: October 25, 2008, 01:11:35 AM
I don't see what exactly is the difference between having a single array and an array of arrays?

That's not the point. The point is you write a class to encapsulate whichever you choose. (The only reason I'd pick a single array is for efficiency, but it really doesn't matter much.)
1535  Developer / Technical / Re: Productivity increasing tools on: October 24, 2008, 05:14:11 AM
...and you are the right person to write it down, aren't you?

Shocked

Did I just poke a bear without realising it or something?

I have a really hard time believing you've never spent hours at a VDU or playing a console game without a break because it was so engrossing.

Indeed, as you surmise, I've done both.

What I haven't done is harm my productivity by doing so. This is the point I was making - though apparently not very well: that different programmers face different obstacles to productivity. One of the advantages of being self-employed now is that I've been able to experiment with work patterns without pressure from anyone else. And in fact the way I'm most productive is with unbroken work periods of around 90-120 minutes separated by long breaks of 15+ minutes.

Which is why I was amused by people proposing multiple different sets of tools which would mess up my work patterns.

I think the psychology of it is interesting precisely because it doesn't seem to be as simple as you're implying.
1536  Developer / Technical / Re: Actionscript 3: Assistance required on: October 24, 2008, 05:01:30 AM
All I want to do is to have a multidimensional array x,y

Just a quick note about this: one of the reasons you won't find much documentation on this is because it runs somewhat contrary to the philosophy of the language. You're thinking like a C programmer!

If you want a multi-dimensional array, write an object to encapsulate it. All you need is a one-dimensional array and set/get functions which do the sums for you.

Using raw arrays for non-trivial things is messy for several reasons:

1) They evade type checking (so do all general purpose containers, but for most apps you know what you're storing and can type get/set functions accordingly).
2) They aren't bounds checked, so bad accesses cause horrible bugs.
3) Efficiency concerns (though not in your case). In low-level languages, "array" implies something very different. These objects are actually a sparse version of Java's 'Vector'.

(In case you're curious, it's the blurb at the top of Adobe's Array docs which tells you how to do multidimensional Arrays.)
1537  Developer / Technical / Re: Productivity increasing tools on: October 23, 2008, 09:03:47 AM
Install Workrave and take regular breaks to keep fresh. On your break, drink water, stretch, look out the window, or go for a quick walk.

It's very interesting to me how people are recommending tools both for taking breaks and for keeping breaks short. Are people really not disciplined enough to achieve a good work pattern without automated aid? Maybe someone needs to write a book on coding psychology?

The idea of drinking water during a break is weird to me, though. I always have water beside me whilst I'm working (and frequently something more caffeinated too). Is there some reason why you don't?
1538  Developer / Technical / Re: Productivity increasing tools on: October 22, 2008, 10:49:42 PM
Anyone else have any other things they've stumbled across recently that they think have given them a boost in terms of their productivity?

My top three productivity tips would be:

* Get a good editor. No, a good one. And then learn to use it properly.
* Automate everything. Make sure you have a convenient way to write quick scripts (not just for runtime, but also for automating your development processes).
* Keep notes external to your codebase. These days I use a Wiki, but even a notebook and a pencil will do fine.
1539  Developer / Technical / Re: The grumpy old programmer room on: October 17, 2008, 04:58:34 AM
I. Hate. EventListeners. In. AS3.

Not wishing to interrupt your righteous grumpiness, but is there anything I can help with? One gentleman to another, and all that. Gentleman
1540  Developer / Technical / Re: Actionscript 3: Assistance required on: October 17, 2008, 02:31:44 AM
The Flash debugger is crashing on me when I try to use it.

When you say "the" Flash debugger, what do you mean?

The Flash CS3 IDE's debugger (which I use) can be persuaded to crash if you output too many lines of trace in a short span of time. Other than that I'm not aware of any crash risks.

Or are you using something else?
Pages: 1 ... 75 76 [77] 78 79 80
Theme orange-lt created by panic