-- genuary #28 2023
-- generative poetry
-- by carson kompon
nouns=split"s𝘢𝘭𝘢𝘮𝘪,a𝘳𝘵𝘪𝘴𝘵,g𝘢𝘮𝘦𝘳,m𝘶𝘴𝘪𝘤𝘪𝘢𝘯,t𝘰𝘢𝘥,w𝘪𝘨,d𝘰𝘨,c𝘰𝘯𝘵𝘳𝘰𝘭𝘭𝘦𝘳,c𝘢𝘵,웃,b𝘰𝘺,g𝘪𝘳𝘭,t𝘳𝘪𝘢𝘯𝘨𝘭𝘦,p𝘰𝘳𝘵𝘢𝘭,g𝘢𝘮𝘦 c𝘢𝘳𝘵𝘳𝘪𝘥𝘨𝘦,pico-8 c𝘢𝘳𝘵,3d p𝘳𝘪𝘯𝘵𝘦𝘳,t𝘸𝘪𝘵𝘵𝘦𝘳 u𝘴𝘦𝘳,g𝘢𝘮𝘦 d𝘦𝘷𝘦𝘭𝘰𝘱𝘦𝘳,a𝘯𝘪𝘮𝘢𝘵𝘳𝘰𝘯𝘪𝘤,i𝘥𝘪𝘰𝘵,s𝘢𝘯𝘥𝘸𝘪𝘤𝘩,w𝘳𝘪𝘯𝘬𝘭𝘦,d𝘪𝘯𝘨𝘭𝘦𝘣𝘦𝘳𝘳𝘺,p𝘪𝘻𝘻𝘢,w𝘦𝘦𝘥,r𝘰𝘣𝘰𝘵,g𝘦𝘯𝘦𝘳𝘢𝘵𝘪𝘷𝘦 a𝘳𝘵 p𝘪𝘦𝘤𝘦"
verbs=split"𝘳𝘢𝘯,𝘬𝘪𝘭𝘭𝘦𝘥,𝘤𝘰𝘰𝘬𝘦𝘥,𝘴𝘵𝘢𝘣𝘣𝘦𝘥,𝘵𝘳𝘢𝘱𝘱𝘦𝘥,𝘩𝘢𝘳𝘢𝘴𝘴𝘦𝘥,𝘣𝘶𝘳𝘪𝘦𝘥,𝘮𝘦𝘥𝘪𝘤𝘢𝘵𝘦𝘥,𝘱𝘭𝘢𝘺𝘦𝘥,𝘴𝘯𝘰𝘰𝘱𝘦𝘥,𝘱𝘰𝘬𝘦𝘥,𝘴𝘬𝘦𝘵𝘤𝘩𝘦𝘥,𝘵𝘢𝘶𝘯𝘵𝘦𝘥,𝘴𝘤𝘩𝘦𝘥𝘶𝘭𝘦𝘥,𝘦𝘹𝘱𝘭𝘰𝘥𝘦𝘥"
adjectives=split"𝘣𝘦𝘢𝘶𝘵𝘪𝘧𝘶𝘭,𝘺𝘶𝘮𝘮𝘺,𝘴𝘰𝘧𝘵,𝘷𝘪𝘣𝘳𝘢𝘯𝘵,𝘩𝘰𝘵,𝘸𝘪𝘭𝘥,𝘥𝘦𝘢𝘥,𝘨𝘰𝘥𝘢𝘸𝘧𝘶𝘭,𝘴𝘪𝘤𝘬,𝘴𝘭𝘪𝘮𝘺,𝘷𝘪𝘰𝘭𝘦𝘯𝘵,8-𝘣𝘪𝘵,𝘮𝘢𝘨𝘪𝘤𝘢𝘭,𝘴𝘵𝘶𝘱𝘪𝘥,𝘪𝘯𝘴𝘢𝘯𝘦,𝘧𝘪𝘭𝘵𝘩𝘺,𝘥𝘪𝘴𝘨𝘶𝘴𝘵𝘪𝘯𝘨,𝘯𝘢𝘬𝘦𝘥,𝘩𝘢𝘶𝘯𝘵𝘪𝘯𝘨,𝘷𝘦𝘯𝘨𝘦𝘧𝘶𝘭,𝘤𝘰𝘯𝘧𝘶𝘴𝘦𝘥,𝘢𝘳𝘳𝘰𝘨𝘢𝘯𝘵,𝘴𝘭𝘦𝘦𝘱𝘺"
adverbs=split"𝘴𝘭𝘰𝘸𝘭𝘺,𝘴𝘰𝘮𝘣𝘦𝘳𝘭𝘺,𝘱𝘢𝘴𝘴𝘪𝘰𝘯𝘢𝘵𝘦𝘭𝘺,𝘢𝘸𝘬𝘸𝘢𝘳𝘥𝘭𝘺,𝘣𝘭𝘪𝘯𝘥𝘭𝘺,𝘪𝘮𝘮𝘦𝘥𝘪𝘢𝘵𝘦𝘭𝘺,𝘩𝘦𝘭𝘱𝘧𝘶𝘭𝘭𝘺,𝘨𝘳𝘢𝘤𝘦𝘧𝘶𝘭𝘭𝘺,𝘨𝘦𝘯𝘦𝘳𝘰𝘶𝘴𝘭𝘺,𝘨𝘦𝘯𝘦𝘳𝘢𝘭𝘭𝘺,𝘧𝘳𝘪𝘨𝘩𝘵𝘧𝘶𝘭𝘭𝘺,𝘤𝘰𝘳𝘳𝘦𝘤𝘵𝘭𝘺,𝘤𝘰𝘮𝘮𝘰𝘯𝘭𝘺,𝘥𝘦𝘭𝘪𝘣𝘦𝘳𝘢𝘵𝘦𝘭𝘺,𝘧𝘳𝘢𝘯𝘬𝘭𝘺,𝘧𝘢𝘮𝘰𝘶𝘴𝘭𝘺,𝘦𝘲𝘶𝘢𝘭𝘭𝘺,𝘦𝘯𝘵𝘩𝘶𝘴𝘪𝘢𝘴𝘵𝘪𝘤𝘢𝘭𝘭𝘺,𝘤𝘳𝘶𝘦𝘭𝘭𝘺,𝘥𝘢𝘪𝘯𝘵𝘪𝘭𝘺,𝘣𝘳𝘰𝘢𝘥𝘭𝘺,𝘤𝘢𝘳𝘦𝘭𝘦𝘴𝘴𝘭𝘺,𝘤𝘢𝘶𝘵𝘪𝘰𝘶𝘴𝘭𝘺,𝘤𝘭𝘦𝘢𝘳𝘭𝘺"
preposition=split"𝘶𝘱,𝘪𝘯𝘵𝘰,𝘰𝘯,𝘥𝘰𝘸𝘯,𝘣𝘦𝘭𝘰𝘸,𝘢𝘣𝘰𝘷𝘦,𝘶𝘱𝘰𝘯,𝘢𝘤𝘳𝘰𝘴𝘴,𝘵𝘰𝘸𝘢𝘳𝘥𝘴,𝘵𝘩𝘰𝘶𝘨𝘩,𝘸𝘪𝘵𝘩,𝘸𝘪𝘵𝘩𝘰𝘶𝘵,𝘪𝘯𝘴𝘵𝘦𝘢𝘥,𝘦𝘹𝘤𝘦𝘱𝘵,𝘢𝘮𝘰𝘯𝘨,𝘴𝘪𝘯𝘤𝘦,𝘣𝘦𝘵𝘸𝘦𝘦𝘯"
function noun() return rnd(nouns) end
function verb() return rnd(verbs) end
function adj() return rnd(adjectives) end
function adv() return rnd(adverbs) end
function pre() return rnd(preposition) end
function generate()
typ=rnd(3)\1
txt=""
if typ==0 then
txt="t𝘩𝘦 "
if(rnd()>.1)txt=txt .. adj() .. " "
txt=txt .. noun() .. " " .. adv() .. " " ..
verb() .. " 𝘣𝘦𝘤𝘢𝘶𝘴𝘦 𝘴𝘰𝘮𝘦 " ..
noun() .. " " .. adv() .. " " ..
verb() .. " " .. pre() .. " 𝘢 " ..
adj() .. " " .. noun()
if rnd()>.4 then
txt=txt .. " 𝘸𝘩𝘪𝘤𝘩 𝘮𝘢𝘥𝘦 𝘢 " ..
adj() .. ", " .. adj() .. " " ..
noun()
end
elseif typ==1 then
txt="t𝘩𝘦 "
if(rnd()>.1)txt=txt .. adj() .. " "
txt=txt .. noun() .. " "
if(rnd()>.1)txt=txt .. adv() .. " "
txt=txt .. verb()
elseif typ==2 then
txt="t𝘩𝘦 "
if(rnd()>.1)txt=txt .. adj() .. " "
txt=txt .. noun() .. " 𝘰𝘧 " ..
noun() .. " 𝘪𝘴 𝘵𝘩𝘦 "
typ2=rnd(2)\1
if typ2==0 then
if rnd()>.1 then
txt=txt .. adj() .. " "
if(rnd()>.1)txt=txt .. "𝘢𝘯𝘥 " .. adj() .. " "
end
txt=txt .. noun() .. " 𝘰𝘧 " ..
noun()
else
if(rnd()>.1)txt=txt .. adv() .. " "
txt=txt .. verb()
if rnd()>.5 then
txt=txt .. " 𝘰𝘳 "
if(rnd()>.1)txt=txt .. adv() .. " "
txt=txt .. verb()
end
end
end
return txt .. "."
end
function print_wrap(str,w,x,y)
retstr=""
lines=split(str,"\n")
for i=1,#lines do
linelen=0
words=split(lines[i]," ")
for k=1,#words do
wrd=tostr(words[k])
if linelen+#wrd>w then
retstr=retstr.."\n"
linelen=0
end
retstr=retstr..wrd.." "
linelen+=#wrd+1
end
retstr=retstr.."\n"
end
print(retstr,x,y)
end
text=""
textto=generate()
timer=0
cls()
::_::
if timer<0 then
for i=1,1000 do
circfill(rnd(128),rnd(128),1,0)
end
timer+=1/30
else
cls()
color(7)
if #text<#textto then
local char=textto[#text+1]
text=text..char
if(char~=" ")sfx(0)
else
timer+=1/30
end
print_wrap(text,26,2,2)
end
flip()
if timer>3 then
sfx(1)
timer=-1
text=""
textto=generate()
end
goto _