BlueLight Wrote:Having big objects would make some stuff slow down but booleans take so little data that you should worry.
I mean some thing like big images
Just for example:
Just for example (i made a lot of mistakes when i made it so i can show them like samples now
):
1)This is the simple algoritm - it is much much more simple then my tank game - but it use 50 % of PC
2)When i make it smaller it eats less PC by half (25%)
3)My tank game eat 25% of PC - but its algoritms is much more heavyer.
http://ownerofsuccuby.narod.ru/news/flashnews/17.swf4)The base tank algoritms eats 8-10% of PC usage but it lugs some times.
http://ownerofsuccuby.narod.ru/news/flashnews/8.swf5)http://ownerofsuccuby.narod.ru/news/flashnews/14.swf - there are no algoritms - but when you start to move text it use 30% of PC
6)When the gotoandplay is used (you can see as cicle PC usage go UP):.
It is my test site so i test a lot of thingth there (i am lazy to remake it normally
- but some times like now they are useful).
Why do it lugs ? There are 4 reason - that i found.
Long long time ago i try to make all on timer - but timer in flash works like shit - so i remove it - all become beter.
Then when i go that way there are frame rate - if it is lesser then less lugs.
1)But what is interesting: my first example - very very easy code - but lugs like shit - why ?
The answer is simple. I use very big objects and then resixze them in smaller one. But why when i resize it to more smaller it starts worl better ?
Then smaller your object that you move are then less it lugs. If you move some thing big, even if it is not hard by animation - it starts lug.
2) 3 - i use very heavy animation of tanks and objects. Tank have real size like 400*400 or 500*500 but its size in game is 60*60 or some thing like that.
If i will use picture 60 * 60 it will be lesser lugs but i found it in the internet and did not change, then i resized it so many times that it is not so simple to remake it better now - when image is resized in 10 differents objects some problem with coordinates starts =(
3) 4- has the same algoritms as 3 but very light animation - why do it lugs on some window resolution ? The answer is simpl - i resized it many times in different components. If you have image for example with with and height 7*7 and resize it to size 4*4 in your object and then make the window of your browser make it to resize to 3*3 - it starts lugs again (i thing becouse it start to round its proportion in pixels by the browser window or some problems when it try to calculate x and y).
The latest version of my algoritms that i made for some thing like LoK game (it was in progress but i have problems with time now) - i moove big objects / move heavy algoritms and animations - but it works faster then the base LoK2 version and all my other projects - why is it so ?
4) Each time you use redrawing your object you use PC. I did not make my 1-3 mistakes. And i redraw each object once - like i show in the *.fla (Zip files i post earlyer). Lok 2 as2 version try to redraw each object by more (i do not know 12 or 24 frames per second it is - all my stuf is 24 per second) 12 (or 24) times per second - when it try to understand what kind of armoris on. It is good when you use 1 characters - but as you can see there where a lot of games in internet based on LoK2 version - so when there where more then 2-3 character each made on that algoritm it start lugs.
If you redraw object it will stay in that fraim until it will be removed from 1 or more frames on your movie. If it was on 1/2/3/4/5 frames and it will be removed in 6 and apears in 7 - you have to redraw it again becouse it will go to and play 1 st frame automatically.
So all that code you can put on the first frame and even if you will forgot to redraw it directly it can make it by itself.
When you need to change gear you can make function on confirm button that will redraw your character to new armor or gotoand play 1st frame of it - where it will be the function that will redraw it by go to and stop ("xArmor") frame.
Sorry for my bad english again.