It just surprised me a little that you know how to make money out of a game by putting ads in there, but not one of the most basic and fundamental aspects of Flash.
Just seemed slightly arse backwards.
Squize.
Printable View
It just surprised me a little that you know how to make money out of a game by putting ads in there, but not one of the most basic and fundamental aspects of Flash.
Just seemed slightly arse backwards.
Squize.
thats how things work these days ;)
just back on topic:
another way to reduce performance and save hassle with loading is to avoid components at all costs.
No mate, that's hands down genius.
Wish i'd done it that way, I'd have a fortune by now.... :mrpimp:
lol. it suprises me that that suprises you. because knowing that mochiads exist is far more basic knowledge than tween. because before i even knew actionscript existed i knew mochiads from games i played. and everyone knows ads make money, but not everyone knows what a tween is.
@renderhjs components are objects in objects right?
He doesn't know what components or tweens are. That's not arse backwards, that's just hardcore coding!
Rock on!
maybe he is using silverlight ^^
components are compiled movieclips with hidden code that are mainly designed for noobs and lazy persons to add interface elements and other functionality. But because of their somewhat hidden code you dont know how well its actually written - and by default it gets loaded before the very first frame so your average preloader wont catch it. Just nasty stuff
While a lot of these tricks can make a difference in flash, it does fall into the category of premature optimization. Here is a good post on why this isn't always a good thing:
http://blogs.msdn.com/shawnhar/archi...imization.aspx
Flash is at the point where this kind of optimization can make a difference, but you should still make sure you aren't spending all your time optimizing everything and making things hard to read.
readability certainly is very important but if you are writing lets say a 3d engine some little parts or classes need to be optimized alot otherwise performance might suffer alot for what you want.
In that way referencing is alos a good practices because it plits up complex math or hierarchies into local variables that are easier to reuse in the following lines. Often then a usefull local variable name can help alot
does it have to do with writing in frames of movieclips? because i dont do that.
it's nothing to do with composition, right?
Omniscient... You should change your name.
He would have to start a new account.
lol, do you really think im serious about my name?
im new to this stuff, i started learning about 2 weeks ago, so it's completely normal that i dont get everything.
but seriously, what are components?
@Omni - open your "components palette" (window>components) ... they're pre-built widgets you can drop into a project without worrying about the code.
@Everyone else - this is supposed to be a place to get help, quit being asses.
@neznein9 I'm sorry, I just though being called omniscient and asking lots of questions was a tad ironic. And funny.
@Omni - Forget components whilst you're still learning. You rarely ever need them for games.
neznein and omniscient, when somebody starts to ask stuff like tweens and components I seriously recommend they either: take the trouble of typing it into google or... I dunno... in the Flash help?
i did search. but there was nothing explaning what it is. but i guess i wont be needing them, atleast for now. so i'll ignore them. the point was that i was very glad when i learned about composition, and i thought they might be the same.
composition is not slow, right?
"everyone knows ads make money, but not everyone knows what a tween is."
touché, I can't fault that logic :)
Rather than asking general questions, what exactly is the game you're making mate ? Is there a demo anywhere you could post.
As has been touched on, all these little speed-ups people have offered up don't really count for that much in real life.
They're something to remember and to try and drop into your code, but if you're scrolling a 800x800 window then all the little tricks aren't going to make too big an impact.
So if you show the game it may even be a case that it runs ok for most people already. Don't fall into the trap of being really anal about things running as quickly as possible, things only need fixing if there's a problem.
Squize.
>>>So if you show the game it may even be a case that it runs ok for most people already. Don't fall into the trap of being really anal about things running as quickly as possible, things only need fixing if there's a problem.<<<
Word for Word my friend.
There are a lot of BitmapData tricks that you can roll out to speed up a slow scrolling game, but you need not dive into that if there really isn't a problem. Those tricks mean an engine re-design most of the time.
What the hell is composition?
(I've only been using Flash for 9 years, so cut me some slack with that question! :D )
Composition is using multiple class instances together (one class holds an instance of the other), it's the 'opposite' of inheritance where you combine the classes (one extends the other)...inheritance usually runs faster but requires a little more planning. Both are flexible in their own ways.