This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Micheal Pearce's profile picture

Steam Launcher: Manage Your Games With Ease [W.i.p.]

Started by Micheal Pearce, 23 July 2013 - 02:59 PM
Micheal Pearce #1
Posted 23 July 2013 - 04:59 PM
Hello welcome to what will be Steam Launcher it is still in W.I.P. but i want to get it out there for game devs to hopefully user some of this stuff in there games

Video:
[media]http://www.youtube.com/watch?v=OPEHXVt5AU0&feature=youtu.be[/media]

here is the function for the Achievement unlock it will stop your game to run it so maybe put it at the end or code around it or something, it will not work right now unless you have the steam launcher installed it will return a error unless you have it installed if you would like to get/help with SteamLauncher for Dev purposes please send me a message

for game dev put this code where you want the ach to pop-up

if lusername == null then

else 
aunlock(name,p)
end


function aunlock(name,p)
if lusername == null then

else
achunlock = false
user.totalp = user.totalp + p
local save = textutils.serialize(user)
file = fs.open("SteamGames/"..lusername.."/stats","w")
file.writeLine(save)
file.close()
local a = "Achievement unlocked"
if #name > 20 then
  x = #name + 2
else
  x = 24
end
ani = 0
repeat
  if ani == 1  then
   term.setCursorPos(1,1)
   for i = 1,x do
	term.setBackgroundColor(colors.yellow)
	write(" ")
   end
  elseif ani == 2 then
   term.setCursorPos(1,1)
   for i = 1,x do
	term.setBackgroundColor(colors.lightGray)
	write(" ")
   end
   term.setCursorPos(2,1)
   write(p.."p")
   term.setCursorPos(1,2)
   for i = 1,x do
	term.setBackgroundColor(colors.yellow)
	write(" ")
   end
  elseif ani == 3 then
   term.setCursorPos(1,1)
   for i = 1,x do
	term.setBackgroundColor(colors.lightGray)
	write(" ")
   end
   term.setCursorPos(2,1)
   write(name)
   term.setCursorPos(1,2)
   for i = 1,x do
	term.setBackgroundColor(colors.lightGray)
	write(" ")
   end
   term.setCursorPos(2,2)
   write(p.."p")
   term.setCursorPos(1,3)
   for i = 1,x do
	term.setBackgroundColor(colors.yellow)
	write(" ")
   end
  elseif ani == 4 then
   term.setCursorPos(1,1)
   for i = 1,x do
	term.setBackgroundColor(colors.lightGray)
	write(" ")
   end
   term.setCursorPos(2,1)
   write("Achievement unlocked")
   term.setCursorPos(1,2)
   for i = 1,x do
	term.setBackgroundColor(colors.lightGray)
	write(" ")
   end
   term.setCursorPos(2,2)
   write(name)
   term.setCursorPos(1,3)
   for i = 1,x do
	term.setBackgroundColor(colors.lightGray)
	write(" ")
   end
   term.setCursorPos(2,3)
   write(p.."p")
   term.setCursorPos(1,4)
   for i = 1,x do
	term.setBackgroundColor(colors.yellow)
	write(" ")
   end
  end
  sleep(.1)
  ani = ani + 1
until ani == 5
ani2 = 0
sleep(3)
repeat
  if ani2 == 1 then
   term.setCursorPos(1,4)
   for i =1,x do
	term.setBackgroundColor(colors.black)
	write(" ")
   end
   term.setCursorPos(1,3)
   for i = 1,x do
	term.setBackgroundColor(colors.yellow)
	write(" ")
   end
   term.setCursorPos(1,2)
   for i = 1,x do
	term.setBackgroundColor(colors.lightGray)
	write(" ")
   end
   term.setCursorPos(1,1)
   for i = 1,x do
	term.setBackgroundColor(colors.lightGray)
	write(" ")
   end
   term.setCursorPos(2,1)
   write(name)
   term.setCursorPos(2,2)
   write(p.."p")
  elseif ani2 == 2 then
   term.setCursorPos(1,3)
   for i = 1,x do
	term.setBackgroundColor(colors.black)
	write(" ")
   end
   term.setCursorPos(1,2)
   for i = 1,x do
	term.setBackgroundColor(colors.yellow)
	write(" ")
   end
   term.setCursorPos(1,1)
   for i = 1,x do
	term.setBackgroundColor(colors.lightGray)
	write(" ")
   end
   term.setCursorPos(2,1)
   write(p.."p")
  elseif ani2 == 3 then
   term.setCursorPos(1,2)
   for i = 1,x do
	term.setBackgroundColor(colors.black)
	write(" ")
   end
   term.setCursorPos(1,1)
   for i = 1,x do
	term.setBackgroundColor(colors.yellow)
	write(" ")
   end
  elseif ani2 == 4 then
   term.setCursorPos(1,1)
   for i =1,x do
	term.setBackgroundColor(colors.black)
	write(" ")
   end
  end
  sleep(.1)
  ani2 = ani2 + 1
until ani2 == 5
end
end
TheOddByte #2
Posted 23 July 2013 - 07:00 PM
Seems nice but detected already in the video that you mistyped 'Password' and wrote 'Passordw' or something, Like that it shows achievments like that :)/>
And good luck to you!
Micheal Pearce #3
Posted 23 July 2013 - 07:28 PM
Seems nice but detected already in the video that you mistyped 'Password' and wrote 'Passordw' or something, Like that it shows achievments like that :)/>
And good luck to you!
oh haha thanks for telling me that it would of never been seen by me, and thanks it took a bit to make it
Zudo #4
Posted 24 July 2013 - 01:26 AM
It looks nice, but the only code you have here is the achievement code.
Encreedem #5
Posted 24 July 2013 - 03:49 AM
I like the idea of this program but I hope that the part with the password was sarcastic because I could decrypt it in my head in less than 10 minutes :P/> .
Here's a small tip: You can use paintutils.drawPixel instead of calling the setCursorPos and write functions all the time. Apart from that, keep working on it! I would like to see more ^^
TheOddByte #6
Posted 24 July 2013 - 07:00 AM
Hey, Do you mind if I try to make my own version of this? I really loved the idea and would attempt to make something like this myself :)/>
joshmanisdabomb #7
Posted 24 July 2013 - 07:35 AM
It seems like a neat concept, but right now it seems poorly executed. Hopefully in later versions some stuff can be fixed.
Micheal Pearce #8
Posted 24 July 2013 - 03:09 PM
well like i said the full build is not complete i am still working on one people can use but i wanted to give out the achievement code so if people would like to add it too there games they can so it would be able to use that with the SteamLauncher the program is not done yet so there really isn't a way it could be 'poorly exexuted'
TheOddByte #9
Posted 24 July 2013 - 04:23 PM
well like i said the full build is not complete i am still working on one people can use but i wanted to give out the achievement code so if people would like to add it too there games they can so it would be able to use that with the SteamLauncher the program is not done yet so there really isn't a way it could be 'poorly exexuted'
You should update the achievement code so if someone would use it it checks if the program is runned from SteamLauncher or not so they don't have to create an extra version just for this, You could do something like using boolean values, And when you run the program through SteamLauncher it sets it to 'true' and if not it sets it to 'false' and then you can simply use that boolean value to check if the achievement code should be runned :)/>
Micheal Pearce #10
Posted 24 July 2013 - 06:55 PM
well like i said the full build is not complete i am still working on one people can use but i wanted to give out the achievement code so if people would like to add it too there games they can so it would be able to use that with the SteamLauncher the program is not done yet so there really isn't a way it could be 'poorly exexuted'
You should update the achievement code so if someone would use it it checks if the program is runned from SteamLauncher or not so they don't have to create an extra version just for this, You could do something like using boolean values, And when you run the program through SteamLauncher it sets it to 'true' and if not it sets it to 'false' and then you can simply use that boolean value to check if the achievement code should be runned :)/>

alright done should would i just updated here and have not tested it but this should work and i just remembered if you have the achievement in the game you will not need the function in your program you will only need the first code
Lyqyd #11
Posted 24 July 2013 - 07:55 PM
Thread closed. PM a moderator when you have code to post for the actual program and we'll unlock this.