function render(gc) drawHorizon(gc) local size,x,y,i,polygon for j=1,27do i=(j+lastCube-2)%27+1 size=cubesY[i]*cubesY[i]/1.5+8 x=(cubesX[i]-7-player)*20*(cubesY[i]*cubesY[i]/20+0.5)-size/2 y=cubesY[i]*cubesY[i]*2-152 polygon=rotate({x,y,x+size,y,x+size,y+size,x,y+size,x,y}) if cubesY[i]>1then gc:setColorRGB(color[1],color[2],color[3]) gc:fillPolygon(polygon) gc:setColorRGB(0,0,0) gc:drawPolyLine(polygon) end if cubesY[i]>7.5and cubesY[i]<8.5then if x<7and x+size>-7then on.escapeKey() end end end end
function rotate(p) local s,c=math.sin(rotation),math.cos(rotation) return {p[1]*c-p[2]*s+159,p[1]*s+p[2]*c+202,p[3]*c-p[4]*s+159,p[3]*s+p[4]*c+202,p[5]*c-p[6]*s+159,p[5]*s+p[6]*c+202,p[7]*c-p[8]*s+159,p[7]*s+p[8]*c+202,p[9]*c-p[10]*s+159,p[9]*s+p[10]*c+202} end
function updateCubes() local step=menu and0.06or speed for i=1,27do cubesY[i]=cubesY[i]+step if cubesY[i]>10then if score%1000<800then cubesX[i]=math.random(10,140)/10+player else cubesX[i]=math.random(10,140)/200+player+(i-1)%2*5+4.1 end cubesY[i]=1 lastCube=lastCube==1and27or lastCube-1 end end end
function updateMove() if moving then player=player+0.07*dir if math.abs(rotation)<0.1then rotation=rotation-0.005*dir end iftimer.getMilliSecCounter()-moveStart>=150then moving=false end else if math.abs(rotation)>0.005then rotation=rotation-0.005*rotation/math.abs(rotation) end end end
function drawPlayer(gc) ifnot menu then gc:drawImage(playerImg,149,192) end end
function drawHorizon(gc) local s,c=math.sin(rotation),math.cos(rotation) gc:setColorRGB(0,0,0) gc:drawLine(s*142-c*200+159,202-c*142-s*200,c*200+s*142+159,s*200-c*142+202) end
function drawMenu(gc) if menu then gc:setColorRGB(0,0,0) gc:setFont("sansserif","r",30) gc:drawString("CubeField",80,10,"top") gc:setFont("sansserif","b",12) gc:drawString("Press Enter",115,150,"top") local highscore=var.recall("highscore") ifnot highscore then var.store("highscore",0) highscore=0 end if score>highscore then var.store("highscore",score) document.markChanged() end local str="Score : "..tostring(score).." Highscore : "..tostring(highscore) gc:drawString(str,159-gc:getStringWidth(str)/2,100,"top") end end
function drawScore(gc) ifnot menu then gc:setColorRGB(0,0,0) gc:setFont("sansserif","r",12) gc:drawString(tostring(score),2,0,"top") if score%1000>950then gc:setFont("sansserif","r",30) gc:drawString("Speed Up !",80,10,"top") end end end
function levelUp() speed=speed+0.02 level=level+1 if (level-1)%5==0then color={225,170,0} elseif (level-1)%5==1then color={0,0,255} elseif (level-1)%5==2then color={100,100,100} elseif (level-1)%5==3then color={90,255,0} elseif (level-1)%5==4then color={255,255,255} end end
functionon.paint(gc) render(gc) drawPlayer(gc) drawMenu(gc) drawScore(gc) gc:setColorRGB(0,0,0) gc:setFont("sansserif","r",8) gc:drawString("Lua CubeField - Par Loic Pujet",10,200,"top") timer.start(0.01) end
functionon.timer() timer.stop() updateCubes() updateMove() ifnot menu then score=score+1 if score%1000==0then levelUp() end end platform.window:invalidate() end
functionon.escapeKey() menu=true end
functionon.enterKey() if menu then menu=false speed=0.08 moving=false score=0 level=1 color={225,170,0} for i=1,27do cubesY[i]=cubesY[i]-5 end end end
functionon.arrowLeft() ifnot menu then dir=-1 moving=true moveStart=timer.getMilliSecCounter() end end
functionon.arrowRight() ifnot menu then dir=1 moving=true moveStart=timer.getMilliSecCounter() end end
functionon.charIn(ch) if ch=="6"then on.arrowRight() elseif ch=="4"then on.arrowLeft() end end
I shall do so, may need to w8 a while though. and yes from DJ_O and DT, there is this gap oftentimes which should look passable, but instead the precision of moving left and right isn't great and BAM! game over.
Couldn't we change the name 'ground zero' into 'ground phoenix'? (since the major said he didnt really like 'ground zero' and a phoenix rises from its own ashes)
That's an awesome idea! +1
Oh I only just realised that the Freedom Tower was renamed One World Trade Center. meh, Freedom Tower sounds better.
Those who say that are likely to have not tried Opera. Sure, Opera has some minor page compatibility issues not present in other browsers but generally it's quite a nice browser. It's also the most customisable (user interface-wise) by far of all of the browsers as you can change each aspect of the interface even move the opera button and all toolbars without any extra addons. The rss features are nicely integreated into Opera MailThe reason it isn't so popular is because it used to cost money, and then be ad-sponsored, and finally I think in 2005 it became freeware. It has always been a niche browser with some special features that others don't have.
Chrome is fast becoming the most dominant browser, mainly because of its simple interface. an omnibar (no pun intended), automatic updating, and unique shaped tabs on top (was the first browser to do so) has caused many people to switch to Chrome even though they have used Firefox in the past. Though personally for me it still has some issues with Save As. Dialogue boxes it has a very nice, clean look.
Firefox has lost some ground recently due to issues for it taking too much ram and not responding quite often. This was during the late 3.6/4.0b6 onwards stage. I quit firefox at that time because of two issues. Aero would be disabled often, and also I would have a very annoying white pixel on the firefox button. I myself switched to chrome for fast simple browsing. However ever since the release of firefox 4 and onwards, firefox has gotten significantly faster and is catching up with chrome. Too bad chrome's market share is catching up with firefox http://gs.statcounter.com . Still it is the browser with the most addons, and there is going to be a new user interface from firefox 9 onwards called australis (search it on google!) and it looks awesome! Tablet - Friendly too! I might even switch to Firefox as my main browser if something better from the competition doesn't come out.
We all know about how bad IE used to be so I won't go into too much detail on that. However we must acknowledge that Microsoft has made a great effort in IE9. It's still not amazingly what we expected to be, but IE9 was mainly a catchup browser for Microsoft, and I feel that Microsoft is back in the race for browsers, with its minimalist interface, similar to Chrome's and with Internet Explorer 10 on the way I believe that Microsoft is heading in the right direction
Finally there's Apple Safari for windows. No significant updates have been provided for Safari in the last few years, and it is starting to fall behind with the other browsers. The iTunes style interface is still quite appealing, but may not be for those people who like Aero Glass. Still its good for those Apple fans who like the Safari on Mac feeling
Overall There is a great choice of browsers suited for particular people. They all have their own advantages and disadvantages. Even though I use Chrome mainly and Firefox sometimes, usually at the same time as Chrome (don't ask me, I just like to do that) other browsers are still viable options for your main browser/s. It took me a while too until I stopped criticizing IE so harshly. Hopefully I have given a brief (otherwise it would be a crazy article!) unbiased account of the 5 major browsers for those seeking one.
its quite simple actually. its whether a buffer is turned on or off (1 or 0). And Dispgraph, Dispgraphr, Dispgraphrr, will show 2 scale, 3 colour greyscale and 4 colour greyscale respectively.
ooh woops I forgot to even check it first. EDIT: I even posted on it
Big lol The way I learned most about programming languages was looking at other people's source code and taking parts or ideas from it and understanding the concepts of their programs.
Well I did the test again and I got 24400 words, higher than last time. Strange. I thought I was being more honest this time, selecting words that I actually knew a certain meaning of because the first time I chose some words I had a half-meaning of. I've gotten smarter!