angle = 0 function love.load() love.graphics.setFont(love.graphics.newFont(23)) end function love.update(dt) angle = (angle + dt*2) % (2 * math.pi) x, y = 400 + math.cos(angle)*100, 300 + math.sin(angle)*100 end function love.draw() love.graphics.print("Hail Eris!", x, y,angle) end
tfw u've modded firefox too much for live2d engine to run ;( very cool project nonetheless admindude
function love.draw() love.graphics.print("XD", 400, 300) end
>>648 That's a shame. It is rather specific and resource-heavy code, so I'm not that surprised. >>650 It werks! I'm hoping this weird little feature will result in some creative posts.
>>648 I'm in the same boat at the moment, but look forward to checking back later. Very cool indeed.
point = {0,0} function xorshift(i) x = point[i] x = x ^ (x <<< 5) x = x ^ (x >>> 8) point[i] = x end function love.update() xorshift(0) xorshift(1) end function love.graphics.draw() love.graphics.print("XD",point[0] % 1000, point[1] % 1000) end
How can I use this to crash unsuspecting cabbages' computers?
>>656 lmao the delete post function still exists if you feel you're spamming
ok sorry I can't figure out this fucking programming languegage
>>660 but lua is the easiest language ever
kdo=love.keyboard.isDown function love.load() SPEED=250 StartPos={x=250,y=250,width=50,height=50} bullets={} end function love.draw() love.graphics.setColor(1,0,0) for i,v in pairs(bullets) do love.graphics.circle("fill",v.x,v.y,4,4) end love.graphics.setColor(1,1,1) love.graphics.print("Left click to fire towards the mouse.",50,50) love.graphics.rectangle("line",StartPos.x,StartPos.y,StartPos.width,StartPos.height) end function love.update(dt) c=math.ceil(dt) if(kdo("w")) then StartPos.y=StartPos.y-c end if(kdo("a")) then StartPos.x=StartPos.x-c end if(kdo("s")) then StartPos.y=StartPos.y+c end if(kdo("d")) then StartPos.x=StartPos.x+c end if love.mouse.isDown(1) then local startX=StartPos.x+StartPos.width/2 local startY=StartPos.y+StartPos.height/2 local targetX, targetY = love.mouse.getPosition() local angle = math.atan2((targetY-startY),(targetX-startX)) newbullet={x=startX,y=startY,angle=angle} table.insert(bullets,newbullet) end for i,v in pairs(bullets) do local Dx = SPEED*math.cos(v.angle) local Dy = SPEED*math.sin(v.angle) v.x=v.x+(Dx*dt) v.y=v.y+(Dy*dt) if v.x>love.graphics.getWidth() or v.y>love.graphics.getHeight() or v.x<0 or v.y<0 then table.remove(bullets,i) end end end
>>664 shoot with mouse move with wasd
>>654 make something that uses a lot of CPU power
>>666 ominous digits considering the question that was posed
-- To the extent possible under law, the author(s) have dedicated all -- copyright and related and neighboring rights to this software to -- the public domain worldwide. This software is distributed without -- any warranty. amplitude = 1 phase = 0 function drawPentagon(side, w, h) love.graphics.push() love.graphics.translate(w / 2, h / 2) height = (side / 2) / math.tan(math.pi/5) for i = 0, 4 do love.graphics.line(-side / 2, height, side / 2, height) love.graphics.rotate(2 * math.pi / 5) end love.graphics.pop() end function drawApple(s) love.graphics.push() love.graphics.translate(s/2, s/2) love.graphics.circle("line", 0, 0, s/4) love.graphics.line(0, -s/4, 0, -3*s/8) love.graphics.ellipse("line", s/4-s/8, -3*s/8, s/8, s/16) love.graphics.pop() end function love.load() love.graphics.setFont(love.graphics.newFont(23)) love.graphics.setColor(0xff / 0xff, 0xe6 / 0xff, 0xbf / 0xff, 0xff / 0xff) pentagon = love.graphics.newCanvas(100, 100) love.graphics.setCanvas(pentagon) drawPentagon(50, 100, 100) love.graphics.setCanvas() apple = love.graphics.newCanvas(100, 100) love.graphics.setCanvas(apple) drawApple(100) love.graphics.setCanvas() end function love.update(dt) phase = (phase + dt) % (2 * math.pi) amplitude = math.cos(phase) end function y(x) return math.sin(x * (2*math.pi)/800) * (amplitude * 300) + 300 end function love.draw() for x = 0, 800 do love.graphics.line(x, y(x), x+1, y(x+1)) end love.graphics.setBlendMode("alpha", "premultiplied") love.graphics.draw(pentagon, 200, amplitude * 200 + 300, phase, 1, 1, 50, 50) love.graphics.draw(apple, 600, - amplitude * 200 + 300, phase, 1, 1, 50, 50) end
-- This program is presented without warranty, real or imagined. -- All rights reversed, all lefts reserved. function love.load() snd = love.sound.newSoundData(10000, 44100, 16, 1) for i=0, snd:getSampleCount() - 1 do snd:setSample(i, math.sin(2*math.pi*i/(44100/523))) end src = love.audio.newSource(snd) end function love.update(dt) if not src:isPlaying() then love.audio.play(src) end end function love.draw() love.graphics.print("Hail Eris!",0,0,0,10) end
pr = love.graphics.print function love.draw() pr("clipboard: " .. love.system.getClipboardText(),10,10) pr("OS: " .. love.system.getOS(),10,30) state = love.system.getPowerInfo() pr("power: " .. state,10,50) pr("processor count: " .. love.system.getProcessorCount(),10,70) love.system.vibrate(10000) love.system.setClipboardText("lol u suck") major, minor, revision, codename = love.getVersion( ) pr("love version: " .. major .. " " .. minor .. " " .. revision .. " " .. codename,10,170) end
Hello, has admin reinvented Flash?
It doesn't work for me. Some shit about security perdolicy.
>>688 rip. for me it works even on my phone. it should just werk on normal firefox or chrome
>>689 > it should just werk on normal firefox or chrome With XUL?
>>690 I don't even know what XUL is. here is the code https://erischan.org/js/retardedloverunner.js and here's what it's based on https://github.com/schellingb/LoveWebBuilder
l=love lm=l.mouse m=math lg=l.graphics kb=l.keyboard.isDown p=pairs function l.load() S=250 Sp={x=250,y=250,w=50,h=50} b={} end function l.draw() lg.setColor(1,0,0) for i,v in p(b) do lg.circle("fill",v.x,v.y,4,4) end lg.setColor(1,1,1) lg.rectangle("line",Sp.x,Sp.y,Sp.w,Sp.h) end function l.update(d) c=m.ceil(d) if kb("w") then Sp.y=Sp.y-c end if kb("a") then Sp.x=Sp.x-c end if kb("s") then Sp.y=Sp.y+c end if kb("d") then Sp.x=Sp.x+c end if lm.isDown(1) then local sX=Sp.x+Sp.w/2 local sY=Sp.y+Sp.h/2 local tX,tY=lm.getPosition() local an=m.atan2(tY-sY,tX-sX) nb={x=sX,y=sY,an=an} b[#b+1]=nb end for i,v in p(b) do local Dx = S*m.cos(v.an) local Dy = S*m.sin(v.an) v.x=v.x+(Dx*d) v.y=v.y+(Dy*d) if v.x>lg.getWidth() or v.y>lg.getHeight() or v.x<0 or v.y<0 then table.remove(b,i) end end end
>>691 > I don't even know what XUL is. It is a subsystem Firefox running plugins.
>>693 of Firefox *fix*
>>693 the subsystem *another fix*
It's kinda sad that it seems a bunch of people can't get it to work. Dunno if i should get rid of it. It's very clunky. I did know a lot of erischan's userbase is rather privacy/security focused in their setup, so having a javascript-heavy application is a bit of a wager lol
>>696 >>687
>>696 No, leave it, it's something new at least.
>>696 I like it. I was meaning to write some more posts but I am short on time.
>>697 >>687 I don't think so. The code is open for all to read bar obfuscation. And obfuscation will be necessary considering the amount of words in one post is limited. So it's a very shitty version of flash. I might consider adding future features like automatically adding attached files of the post to the application's temporary virtual hard drive. >>698 >>699 I'll leave it in for now then. The code is just horrible so i'm embarrassed of that.
>>696 I'm >>648 , I did actually get it to work pretty easily. Just had to enable WebGL. Main thing is I can't figure out how love2d works lol. might as well leave it even if nobody uses it, we can use it to confuse greyfaces that wander in
-- (K) 3188, Anonymous -- All rites reversed function love.load() shader = love.graphics.newShader( [[ uniform float t; vec4 effect(vec4 color, Image tex, vec2 texture_coords, vec2 screen_coords) { return vec4(sin(t), cos(t), 1-sin(t), 1.0); } ]], [[ vec4 position ( mat4 transform_projection, vec4 vertex_position ) { return vertex_position; } ]] ) love.graphics.setShader(shader) fullscreentri = love.graphics.newMesh( { {-1,-1, 0,0}, {-1,3, 0,2}, {3,-1, 2,0} } ) t=0 end function love.update(dt) t = (t+dt) end function love.draw() shader:send("t", t) love.graphics.draw(fullscreentri); end
>>704 I have a feeling this is either a love2d version issue or a shader version issue. WebGL shaders might be limited
function love.load() if(love.threads == nil) then error("threads not working") end end
There's the issue. This love.js wasn't compiled with threads.
>>707 JavaScript doesn't have threads
>>708 Shaders rely on threads, and threads do not work in your browser unless SharedArrayBuffers is enabled, which by default it is not due to security concerns.
Don't worry, we could include your program in the zine and readers can then type it in, like in the good old days. Your work was not in vain.
-- (K) 3188, Anonymous -- All rites reversed function love.load() shader = love.graphics.newShader( [[ uniform float t; vec4 effect(vec4 color, Image tex, vec2 texture_coords, vec2 screen_coords) { return vec4(0.0, (sin(t)+1.0)/2.0, (cos(t)+1.0)/2.0, 1.0); } ]], [[ vec4 position ( mat4 transform_projection, vec4 vertex_position ) { return vertex_position; } ]] ) love.graphics.setShader(shader) fullscreentri = love.graphics.newMesh( { {-1,-1, 0,0}, {-1,3, 0,2}, {3,-1, 2,0} } ) t=0 end function love.update(dt) t = (t+dt) end function love.draw() shader:send("t", t) love.graphics.draw(fullscreentri); end
>>716 >>715 well fuck me right up the ass i guess i was wrong. Love.js is a hackjob. I hope a more up-to-date version is compiled soon.
local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' function love.load() m64=[[TVRoZAAAAAYAAQACAeBNVHJrAAAAowD/WAQCAhgIAP9ZAgEAAP9RAw3fIwCweQAAwAAAsAdkAApAAFsAAF0AAP8hAQAAkEdBgSA+M1D/UQMNqiJHkD4ACUM7gQdHABBDAAlPSoEgQDiBF0AACUM4gQdPABBDAAn/UQMOFcUAkE5BgSA+OYEXPgAJQjkoTD9fTgAQQgACTAAHSkKBH/9RAw3fIwGQPjSBFz4ACUU+gQdKABBFAAH/LwBNVHJrAAAARwD/WQIBAAD/IQEAAJA3KQA7MYFvNwAAOwCBcTEsADougW8xAAA6AIFxMiwAOS6BbzIAADkAgXE2MgA8KoFvNgAAPAAB/y8A]] d64=dec(m64) data = love.filesystem.newFileData( d64, "name.mid" ) src = love.audio.newSource(data,"static") src:setLooping(true) src:play() end function dec(data) data = string.gsub(data, '[^'..b..'=]', '') return (data:gsub('.', function(x) if (x == '=') then return '' end local r,f='',(b:find(x)-1) for i=6,1,-1 do r=r..(f%2^i-f%2^(i-1)>0 and '1' or '0') end return r; end):gsub('%d%d%d?%d?%d?%d?%d?%d?', function(x) if (#x ~= 8) then return '' end local c=0 for i=1,8 do c=c+(x:sub(i,i)=='1' and 2^(8-i) or 0) end return string.char(c) end)) end
>>721 heh it wont stop even if you close it quality javascript