About how many blocks can you get on screen before the lag/framerate is noticeable?
I save my code on microsoft Word and estimate lag based on how much room it takes on the page. I try to keep it at 3/4 of a page if I want it absolutely clean, with zero lag. That's about 70 pieces - pretty small really. I start getting slight lag at 100 which becomes noticeable at 120 pieces (one page). From 130 to 150 lag becomes pronounced and affects game play.
The ways of CtC are quite mysterious though. It was observed more than once in CtC1 that complex movement (in flip type levels) played out differently on different people's computers. However, I don't think (not 100% sure) that lag would be affected by different CPUs etc.
It will help to clarify the lag situation if we can get some consensus between different people's experience, so let's break it down.
Here are 70 standard pieces. I don't reckon the size of pieces makes a difference, just the number of them (right?).
70:
{"t":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"l":["tg","mg","bg","wc","id"],"r":["rw","rwc","rs","rsc","ri","ric","rb","rbc","rfb","rpb","rrb","rf","rl","rr","ra","rp"],"n":"","c":["bit,135,595,1,1,0","bit,140,600,1,1,0","bit,145,605,1,1,0","bit,150,610,1,1,0","bit,155,615,1,1,0","bit,160,620,1,1,0","bit,165,625,1,1,0","bit,170,630,1,1,0","bit,175,629.9,1,1,0","bit,180,630,1,1,0","bit,275,595,1,1,0","bit,280,600,1,1,0","bit,285,605,1,1,0","bit,290,610,1,1,0","bit,295,615,1,1,0","bit,300,620,1,1,0","bit,305,625,1,1,0","bit,310,630,1,1,0","bit,315,630,1,1,0","bit,320,630,1,1,0","bit,380,590,1,1,0","bit,385,595,1,1,0","bit,390,600,1,1,0","bit,395,605,1,1,0","bit,400,610,1,1,0","bit,405,615,1,1,0","bit,410,620,1,1,0","bit,415,625,1,1,0","bit,420,625,1,1,0","bit,425,625,1,1,0","bit,485,590,1,1,0","bit,490,595,1,1,0","bit,495,600,1,1,0","bit,500,605,1,1,0","bit,505,610,1,1,0","bit,510,615,1,1,0","bit,515,620,1,1,0","bit,520,625,1,1,0","bit,525,625,1,1,0","bit,530,625,1,1,0","bit,590,595,1,1,0","bit,595,600,1,1,0","bit,600,605,1,1,0","bit,605,610,1,1,0","bit,610,615,1,1,0","bit,615,620,1,1,0","bit,620,625,1,1,0","bit,625,630,1,1,0","bit,630,630,1,1,0","bit,635,630,1,1,0","bit,705,595,1,1,0","bit,710,600,1,1,0","bit,715,605,1,1,0","bit,720,610,1,1,0","bit,725,615,1,1,0","bit,730,620,1,1,0","bit,735,625,1,1,0","bit,740,630,1,1,0","bit,745,630,1,1,0","bit,750,630,1,1,0","bit,820,590,1,1,0","bit,825,595,1,1,0","bit,830,600,1,1,0","bit,835,605,1,1,0","bit,840,610,1,1,0","bit,845,615,1,1,0","bit,850,620,1,1,0","bit,855,625,1,1,0","bit,860,625,1,1,0","bit,865,625,1,1,0"],"o":-1,"
":""}
Clean and clear, the trebuchet swings fluidly without any hitches.
Here's 120:
{"t":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"l":["tg","mg","bg","wc","id"],"r":["rw","rwc","rs","rsc","ri","ric","rb","rbc","rfb","rpb","rrb","rf","rl","rr","ra","rp"],"n":"","c":["bit,135,595,1,1,0","bit,140,600,1,1,0","bit,145,605,1,1,0","bit,150,610,1,1,0","bit,155,615,1,1,0","bit,160,620,1,1,0","bit,165,625,1,1,0","bit,170,630,1,1,0","bit,175,629.9,1,1,0","bit,180,630,1,1,0","bit,275,595,1,1,0","bit,280,600,1,1,0","bit,285,605,1,1,0","bit,290,610,1,1,0","bit,295,615,1,1,0","bit,300,620,1,1,0","bit,305,625,1,1,0","bit,310,630,1,1,0","bit,315,630,1,1,0","bit,320,630,1,1,0","bit,380,590,1,1,0","bit,385,595,1,1,0","bit,390,600,1,1,0","bit,395,605,1,1,0","bit,400,610,1,1,0","bit,405,615,1,1,0","bit,410,620,1,1,0","bit,415,625,1,1,0","bit,420,625,1,1,0","bit,425,625,1,1,0","bit,485,590,1,1,0","bit,490,595,1,1,0","bit,495,600,1,1,0","bit,500,605,1,1,0","bit,505,610,1,1,0","bit,510,615,1,1,0","bit,515,620,1,1,0","bit,520,625,1,1,0","bit,525,625,1,1,0","bit,530,625,1,1,0","bit,590,595,1,1,0","bit,595,600,1,1,0","bit,600,605,1,1,0","bit,605,610,1,1,0","bit,610,615,1,1,0","bit,615,620,1,1,0","bit,620,625,1,1,0","bit,625,630,1,1,0","bit,630,630,1,1,0","bit,635,630,1,1,0","bit,705,595,1,1,0","bit,710,600,1,1,0","bit,715,605,1,1,0","bit,720,610,1,1,0","bit,725,615,1,1,0","bit,730,620,1,1,0","bit,735,625,1,1,0","bit,740,630,1,1,0","bit,745,630,1,1,0","bit,750,630,1,1,0","bit,820,590,1,1,0","bit,825,595,1,1,0","bit,830,600,1,1,0","bit,835,605,1,1,0","bit,840,610,1,1,0","bit,845,615,1,1,0","bit,850,620,1,1,0","bit,855,625,1,1,0","bit,860,625,1,1,0","bit,865,625,1,1,0","bit,130,390,1,1,0","bit,135,395,1,1,0","bit,140,400,1,1,0","bit,145,405,1,1,0","bit,150,410,1,1,0","bit,155,415,1,1,0","bit,160,420,1,1,0","bit,165,425,1,1,0","bit,170,425,1,1,0","bit,175,425,1,1,0","bit,280,380,1,1,0","bit,285,385,1,1,0","bit,290,390,1,1,0","bit,295,395,1,1,0","bit,300,400,1,1,0","bit,305,405,1,1,0","bit,310,410,1,1,0","bit,315,415,1,1,0","bit,320,415,1,1,0","bit,325,415,1,1,0","bit,410,375,1,1,0","bit,415,380,1,1,0","bit,420,385,1,1,0","bit,425,390,1,1,0","bit,430,395,1,1,0","bit,435,400,1,1,0","bit,440,405,1,1,0","bit,445,410,1,1,0","bit,450,410,1,1,0","bit,455,410,1,1,0","bit,540,375,1,1,0","bit,545,380,1,1,0","bit,550,385,1,1,0","bit,555,390,1,1,0","bit,560,395,1,1,0","bit,565,400,1,1,0","bit,570,405,1,1,0","bit,575,410,1,1,0","bit,580,410,1,1,0","bit,585,410,1,1,0","bit,665,380,1,1,0","bit,670,385,1,1,0","bit,675,390,1,1,0","bit,680,395,1,1,0","bit,685,400,1,1,0","bit,690,405,1,1,0","bit,695,410,1,1,0","bit,700,415,1,1,0","bit,705,415,1,1,0","bit,710,415,1,1,0"],"o":-1,"
":""}
This is the lag threshold. At this awkward stage lag isn't very noticeable, but it's there and is already causing unpredictable 'hitches' in the trebuchet arc. The speed of the trebuchet isn't consistent making it a pain to aim.
150 pieces:
{"t":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"l":["tg","mg","bg","wc","id"],"r":["rw","rwc","rs","rsc","ri","ric","rb","rbc","rfb","rpb","rrb","rf","rl","rr","ra","rp"],"n":"","c":["bit,135,595,1,1,0","bit,140,600,1,1,0","bit,145,605,1,1,0","bit,150,610,1,1,0","bit,155,615,1,1,0","bit,160,620,1,1,0","bit,165,625,1,1,0","bit,170,630,1,1,0","bit,175,629.9,1,1,0","bit,180,630,1,1,0","bit,275,595,1,1,0","bit,280,600,1,1,0","bit,285,605,1,1,0","bit,290,610,1,1,0","bit,295,615,1,1,0","bit,300,620,1,1,0","bit,305,625,1,1,0","bit,310,630,1,1,0","bit,315,630,1,1,0","bit,320,630,1,1,0","bit,380,590,1,1,0","bit,385,595,1,1,0","bit,390,600,1,1,0","bit,395,605,1,1,0","bit,400,610,1,1,0","bit,405,615,1,1,0","bit,410,620,1,1,0","bit,415,625,1,1,0","bit,420,625,1,1,0","bit,425,625,1,1,0","bit,485,590,1,1,0","bit,490,595,1,1,0","bit,495,600,1,1,0","bit,500,605,1,1,0","bit,505,610,1,1,0","bit,510,615,1,1,0","bit,515,620,1,1,0","bit,520,625,1,1,0","bit,525,625,1,1,0","bit,530,625,1,1,0","bit,590,595,1,1,0","bit,595,600,1,1,0","bit,600,605,1,1,0","bit,605,610,1,1,0","bit,610,615,1,1,0","bit,615,620,1,1,0","bit,620,625,1,1,0","bit,625,630,1,1,0","bit,630,630,1,1,0","bit,635,630,1,1,0","bit,705,595,1,1,0","bit,710,600,1,1,0","bit,715,605,1,1,0","bit,720,610,1,1,0","bit,725,615,1,1,0","bit,730,620,1,1,0","bit,735,625,1,1,0","bit,740,630,1,1,0","bit,745,630,1,1,0","bit,750,630,1,1,0","bit,820,590,1,1,0","bit,825,595,1,1,0","bit,830,600,1,1,0","bit,835,605,1,1,0","bit,840,610,1,1,0","bit,845,615,1,1,0","bit,850,620,1,1,0","bit,855,625,1,1,0","bit,860,625,1,1,0","bit,865,625,1,1,0","bit,130,390,1,1,0","bit,135,395,1,1,0","bit,140,400,1,1,0","bit,145,405,1,1,0","bit,150,410,1,1,0","bit,155,415,1,1,0","bit,160,420,1,1,0","bit,165,425,1,1,0","bit,170,425,1,1,0","bit,175,425,1,1,0","bit,280,380,1,1,0","bit,285,385,1,1,0","bit,290,390,1,1,0","bit,295,395,1,1,0","bit,300,400,1,1,0","bit,305,405,1,1,0","bit,310,410,1,1,0","bit,315,415,1,1,0","bit,320,415,1,1,0","bit,325,415,1,1,0","bit,410,375,1,1,0","bit,415,380,1,1,0","bit,420,385,1,1,0","bit,425,390,1,1,0","bit,430,395,1,1,0","bit,435,400,1,1,0","bit,440,405,1,1,0","bit,445,410,1,1,0","bit,450,410,1,1,0","bit,455,410,1,1,0","bit,540,375,1,1,0","bit,545,380,1,1,0","bit,550,385,1,1,0","bit,555,390,1,1,0","bit,560,395,1,1,0","bit,565,400,1,1,0","bit,570,405,1,1,0","bit,575,410,1,1,0","bit,580,410,1,1,0","bit,585,410,1,1,0","bit,665,380,1,1,0","bit,670,385,1,1,0","bit,675,390,1,1,0","bit,680,395,1,1,0","bit,685,400,1,1,0","bit,690,405,1,1,0","bit,695,410,1,1,0","bit,700,415,1,1,0","bit,705,415,1,1,0","bit,710,415,1,1,0","bit,800,385,1,1,0","bit,805,390,1,1,0","bit,810,395,1,1,0","bit,815,400,1,1,0","bit,820,405,1,1,0","bit,825,410,1,1,0","bit,830,415,1,1,0","bit,835,420,1,1,0","bit,840,420,1,1,0","bit,845,420,1,1,0","bit,125,185,1,1,0","bit,130,190,1,1,0","bit,135,195,1,1,0","bit,140,200,1,1,0","bit,145,205,1,1,0","bit,150,210,1,1,0","bit,155,215,1,1,0","bit,160,220,1,1,0","bit,165,220,1,1,0","bit,170,220,1,1,0","bit,275,190,1,1,0","bit,280,195,1,1,0","bit,285,200,1,1,0","bit,290,205,1,1,0","bit,295,210,1,1,0","bit,300,215,1,1,0","bit,305,220,1,1,0","bit,310,225,1,1,0","bit,315,225,1,1,0","bit,320,225,1,1,0"],"o":-1,"
":""}
Now we have full lag; the trebuchet has slowed considerably, the player needs to adjust to the slower swing, slower refresh, as well as trebuchet hitches. My biggest castle is
Medieval MECH - at about 180 pieces I think it's just barely serviceable as a very easy one shot.
Us builders are always making bigger and more complex levels so, needless to say, the less lag the better. Now that I think about it though: if the trebuchet is not going to be fired manually then lag becomes less of an issue. Lag is mostly a problem when trying to time shot release. Without this I guess some lag would be more tolerable.
As you guys know posting a link that's just a bunch of pieces without any form or function is against the rule. Obviously I'm not trying to pass off the above as proper levels though, just trying to look into this lag business. Let's please keep similar examples in code to keep things clear.