|
-
one BAD mutha FK'er
[question] how to make game run efficiently
i'm designing an art-based isometric game, it's rpg style where the character goes from room to room. i noticed certain rooms move really slow when the character enters them, some move quickly. i'm wondering if there's a certain method to adhere to to make things run smoother. i noticed there was a thread last week similar to this, saying which actionscripts tend to slow things down, but what about design? like is there a certain size the bg should be no bigger than? or should i avoid putting to many MCs on the root level?
i had one room with a layer that was partly transparent, that slowed down a lot, also a room with a moving MC (motion tween) that was super slow. what else should i avoid, or what are other options?
astrocalder
-
DOT-INVADER
well, you can find A LOT of optimization tricks in the... optimization tricks thread 
> http://www.flashkit.com/board/showth...0&pagenumber=1
and here's an useful resume of it:
> http://www.moor47.fsnet.co.uk/optimization.htm
-
one BAD mutha FK'er
i wonder if you could possibly elaborate on one of these, if you know it -
-Remove movieclips that are not onscreen
i think this would help me out, as that one room with the moving MC is slow as hell, and it doesn't even enter the frame until you reach a corner. the only thing is - how do i remove it? i mean, i know there's an action called "removemovieclip," but how do i use it with other actions to optimize that room?
astrocalder
thanks for the help by the way
-
DOT-INVADER
well, your movieClip is certainly inside flash (opposed to a movieClip that is waiting in the library to be attached on the stage)? in that case you should target it like that:
_root.nameMC.unloadMovie()
but beware, it will never reappear directly again (except if you go back to the frame where it is).
btw, do you mean that you have a huge MC waiting the player to reach the place xxx? so your MC is outside the screen, or something? you can also play with this.nameMC._visible = false
but in your case, you may try to call the MC as soon as you reach place xxx, maybe by attaching it from the library...?
anyway, if your MC is out of screen, it's maybe not the problem, and i assume your code is optimized enough if you ask for the visual part of your animation. maybe that MC that is out of screen has a whole lot of animations that are running "uselessly"?
-
one BAD mutha FK'er
it's set up so that the character stays centered, and the bg moves. in the bgMC are other MC's, some of which move in motion tweens. for example, in one room (bgMC) there is a cart on tracks, that goes across the room. it loops in a motion tween. it isn't visible unless you walk to that corner of the room. but the whole room moves really slow. so i'm wondering if i could tell that cart MC not to play until it enters the screen - although i don't know if that's the reason the bg is so slow.
it's hard to put all this in words, so i'm going to try to get a version up and running tonight or tomorrow. maybe it'll be more clear then.
astrocalder
-
in my mech game you move the same way, the player stayes in the middle and the bgmc moves. Some times it will go slow epecaly when i tried putting moveable a.i. then it was almost not playable. I to would like to know how to speed things up so i can put in other mechs to shoot at you.
http://gioakjoe.tk/game.htm
its my mech game 4050 still in the work pm if you have any coments about it
im tring to make lock on missiles if you have any ideas pm me
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|