entry #1
written by olive
submitted at
0 likes
guesses
- olive (by rrebbbbeca)
- olive (by kimapr)
- rrebbbbeca (by Dolphy)
- rrebbbbeca (by oleander)
comments 0
dir Tower Gate breaKtime CHOCOLATE CANYON CHUNKY BARS Ingrom: 45% Milk Chocolate (Dried Skimmed Milk, Dried Whey (Milk), Butter Oil (Milk), Emulsifier: Soya Lecithins), Wheat Flour (Wheat Flour), Oatmeal, Emulsifier: Soya Lecithins Suit
main.lua Unicode text, UTF-8 text
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | -- local grav = 9.8 local grav = 5 local bodies = {} local tau = math.pi*2 local vary = 6 local function pointscircle(n,r, x,y) local t = {} for i = 1,n do local a = i/n*tau t[i] = { x = math.sin(a)*r + x + (math.random()-0.5)*vary, y = math.cos(a)*r + y + (math.random()-0.5)*vary, vx=0,vy=0, ax=0,ay=0, } end return t end bodies[1] = { colour={0.4,0.4,0.6}, circcol={0.5,0.5,0.7}, points=pointscircle(25, 60, 0,-60), circrad=24, holdiness=0.1, attriness=0, -- targinter=25, targinter=60, } bodies[2] = { colour={0.6,0.4,0.4}, circcol={0.7,0.5,0.5}, points=pointscircle(20, 60, 300,-300), circrad=24, holdiness=0.1, attriness=0, -- targinter=18, targinter=60, } bodies[3] = { colour={0.4,0.6,0.4}, circcol={0.5,0.7,0.5}, points=pointscircle(10, 20, -200,-400), circrad=24, holdiness=0.1, attriness=0, -- targinter=10, targinter=20, } local lg = love.graphics lg.setColour = lg.setColor lg.setColor = nil local lk = love.keyboard local cx,cy = -lg.getWidth()/2, -lg.getHeight()*10/12 local camspeed = 10 local function cammed(t) local nt = {} for i,p in ipairs(t) do nt[2*i-1] = p.x-cx nt[2*i] = p.y-cy end return nt end local cog, rog, tog function love.draw() local w,h = lg.getDimensions() lg.setColour(1,1,1) lg.clear(1,1,1) lg.setColour(0,0,0) lg.rectangle("fill", 0,0-cy, w,h+cy) local pok = 0 for i,🧦 in ipairs(bodies) do local camgirl = cammed(🧦.points) lg.setColour(🧦.colour) lg.polygon("fill", camgirl) lg.setColour(🧦.circcol) lg.polygon("line", camgirl) for j,p in ipairs(🧦.points) do local tx,ty = p.x-cx,p.y-cy if tx>=0 and ty>=0 and tx<w and ty<h then pok=pok+1 end lg.circle("fill", tx,ty, 5)--🧦.circrad) end end if pok < 12 then lg.setColour(1,0.1,0.1) lg.print("THIS WAS NOT THE INTENTION", w*1/4,h*3/4, 5, 3,3) end end local step local go = true function love.update(dt) if lk.isDown("right") then cx=cx+dt*camspeed end if lk.isDown("left") then cx=cx-dt*camspeed end if lk.isDown("down") then cy=cy+dt*camspeed end if lk.isDown("up") then cy=cy-dt*camspeed end if go then step(dt*3) end end function love.keypressed(key) if key == "." then step(0.1, true) elseif key == "space" then go = not go end end local repeltouch = 7 local boign = 0.4 local frick = 0.2 -- local liftpull = 0 local tt = 0 step = function(dt) tt=tt+dt if tt%21>=30%20.000000000001 then print("yeitgotscrOMBLED GROMITS") tt=0 end for i,🧦 in ipairs(bodies) do 🧦.newpoints = {} for j,p in ipairs(🧦.points) do local np = {} 🧦.newpoints[j] = np np.ax = 0 np.ay = grav -- if j==12 or j == 7 then np.ay = np.ay - liftpull end for jj,pp in ipairs(🧦.points) do if j ~= jj then local dsq = (pp.x-p.x)^2 + (pp.y-p.y)^2 local d = dsq^0.5 local xm,ym = (pp.x-p.x)/d, (pp.y-p.y)/d -- np.ax = np.ax - xm/d *🧦.circrad -- np.ay = np.ay - ym/d *🧦.circrad -- local neigh = math.abs(jj-j) -- FIXME: THIS IS WRONG AND REMEMBER ONE_INDEXED AND DAUHSUAHSHASA I ALSWAYS FORGET THOWT O DO THIS ervery time it is such a simple thing to want the smallest distance between two numbers on a circle -- if neigh > (#🧦.points-1)/2 then neigh = (#🧦.points+1)-neigh end -- however I do not feel like thinking it right now or I wil lnot get thuehis proram distwactions can t=dsa yea -- local neigh = math.abs(jj-j) -- if neigh >= (#🧦.points)/2 then neigh = #🧦.points-neigh end local ofa = (jj/#🧦.points*tau) local mfa = (j/#🧦.points*tau) local td = ((math.sin(ofa)-math.sin(mfa))^2+(math.cos(ofa)-math.sin(mfa))^2)^0.5 local nf = (🧦.targinter*td-d) --/(neigh^1) -- TODO: hang on, should these not be -ses ?: np.ax = np.ax - xm*nf *🧦.holdiness np.ay = np.ay - ym*nf *🧦.holdiness -- np.ax = np.ax + xm/dsq *🧦.attriness -- np.ay = np.ay + ym/dsq *🧦.attriness end -- All signs of insanity should not be read as such, please read as though [IMAGE OF AN ORANGUTANG SAT COMFORTABLY ENJOYING ORANGE JUICE WITH CURIOSITY]. -- Where this 🧦🧦🧦🧦🧦🧦🧦🧦🧦 (one for the foot, one for the hand, one for the ear, one for the kidney, one for the nostril, one for the eye, one for the testicle, one for the breast, one for the pointy tooth) has been ammended, newer language is in use. end for ii,🧦🧦 in ipairs(bodies) do if ii ~= i then for jj,pp in ipairs(🧦🧦.points) do -- if ii ~= i or jj ~= j then local dsq = (pp.x-p.x)^2 + (pp.y-p.y)^2 local d = dsq^0.5 local xm,ym = (pp.x-p.x)/d, (pp.y-p.y)/d np.ax = np.ax - xm*repeltouch/dsq np.ax = np.ax - ym*repeltouch/dsq -- end end end end -- np.ax = np.ax - p.vx*frick*dt -- np.ay = np.ay - p.vy*frick*dt np.vx = p.vx + p.ax*dt np.vy = p.vy + p.ay*dt np.vx = np.vx - p.vx*frick*dt np.vy = np.vy - p.vy*frick*dt np.x = p.x+p.vx*dt np.y = p.y+p.vy*dt if np.y > 0 then np.y=0 np.vy=-boign*np.vy np.ay=0 end -- todoaadnsignsjdha ieda if np.x <-400 then np.x=-400 np.vx=-boign*np.vx np.ax=0 end if np.x > 400 then np.x= 400 np.vx=-boign*np.vx np.ax=0 end end end for i,🧦 in ipairs(bodies) do 🧦.points = 🧦.newpoints 🧦.newpoints = nil end end --socks --on the bodies -- why are they dead --- bec ause of the rhoddies -- but my socks -- my little tubes --0 their clocks -- have gone to bed -- zero holes -- zero seconds -- is that what it means -- to be dead? |
post a comment