8 posts
Location
My Computer
Posted 08 March 2013 - 03:18 PM
Hello and welcome to this topic. I'll be showing you how to make a custom boot screen.
Here is the code:
term.clear()
term.setCursorPos(1,1)
print("Computer ID: " .. os.getComputerID())
print("Welcome back, <YourNameHere>!")
print("---------------------------------------------------")
So what this does is clear your screen, and set the cursor position at the top left corner. Then it prints your Computer ID which can be used for rednet purposes I believe. After that it prints a simple welcome message. Finally, it makes a line thing for looks so it looks nice. =P Thats pretty much it!
404 posts
Location
St. Petersburg
Posted 08 March 2013 - 03:25 PM
thank god you didnt put any fake loading screens
3790 posts
Location
Lincoln, Nebraska
Posted 08 March 2013 - 03:54 PM
thank god you didnt put any fake loading screens
Don't hate.
1619 posts
Posted 08 March 2013 - 06:12 PM
Not much of a tutorial and more of a snippet of code, but not bad for someone new to the mod.
404 posts
Location
St. Petersburg
Posted 08 March 2013 - 08:21 PM
Don't hate.
im complimenting him
75 posts
Posted 09 March 2013 - 03:31 AM
I have a Hello program that I put on most of my computers that just outputs basic ID information. Two additional things that it does is print out the label, and if it's a turtle it prints out the fuel level.
print("My Computer ID is "..os.getComputerID())
print("My Name is "..os.getComputerLabel())
if turtle then
print("My Fuel level is "..turtle.getFuelLevel())
end
8 posts
Location
My Computer
Posted 09 March 2013 - 02:44 PM
Not much of a tutorial and more of a snippet of code, but not bad for someone new to the mod.
:P/>
8 posts
Location
My Computer
Posted 09 March 2013 - 02:45 PM
thank god you didnt put any fake loading screens
I don't know how anyways…besides that would be lame.
7508 posts
Location
Australia
Posted 09 March 2013 - 03:04 PM
I don't know how anyways…besides that would be lame.
Fake loading screens are indeed lame. there are too many 'loading bar apis' that are just full of sleep commands, so annoying, actually I think I've still got the only real-time loading bar api.
8 posts
Location
My Computer
Posted 09 March 2013 - 06:24 PM
I don't know how anyways…besides that would be lame.
Fake loading screens are indeed lame. there are too many 'loading bar apis' that are just full of sleep commands, so annoying, actually I think I've still got the only real-time loading bar api.
Never got a fake loading screen, it sounds extra lame, so yea….thanks for the feedback! =P
4 posts
Posted 14 March 2013 - 12:10 PM
That's cool man
gonna try this out =)
758 posts
Location
Budapest, Hungary
Posted 15 March 2013 - 05:03 AM
I don't know how anyways…besides that would be lame.
Fake loading screens are indeed lame. there are too many 'loading bar apis' that are just full of sleep commands, so annoying, actually I think I've still got the only real-time loading bar api.
About those nasty progress bars… Even my OS, Backslash uses a "loading progress bar" or whatever, but it's because of the 136 kilobytes of code to load - Anyways, it only lasts for 0.3 seconds or so…
But come on! Found this a bit ago:
print("Loading...")
sleep(0.5)
print("Loaded")
Tableflipped when read that two days ago…
7508 posts
Location
Australia
Posted 15 March 2013 - 05:34 AM
-snip-
Exactly thats what I'm talking about. Ok if you genuinely have stuff to load, then use a loading bar to show your progress, but never have a fake bar or use sleeps in the process.
1522 posts
Location
The Netherlands
Posted 15 March 2013 - 11:22 AM
If you really really want a want an progress bar you dont have anything to load use sleep that lasts for max 0.5 seconds. But I hate those too.. Just because it just doesnt have a purpose
758 posts
Location
Budapest, Hungary
Posted 15 March 2013 - 09:39 PM
If you really really want a want an progress bar you dont have anything to load use sleep that lasts for max 0.5 seconds. But I hate those too.. Just because it just doesnt have a purpose
OK, but don't dare term.write("Loading") then…
Now quit this argument about fake progress bars cuz Lqyqd's gonna kick our a**…
645 posts
Location
'Merica
Posted 17 March 2013 - 06:45 AM
… thats not really a boot loading screen, and most people already know how to do term.clear() … but I think how do to a real loading screen it would be
Feel free to correct me on what ever I did wrong, but I'm pretty sure this would be a real boot screen…
function boot_logo()
term.clear()
local boot = {
term.setBackgroundColor(colors.blue),
sleep(5)
}
for i = 1, #boot do
while false do
print(" ")
break
end
end
print("Loading CraftOS, please wait...")
term.setCursorPos(1,19)
textutils.slowPrint("_-_-/>_-_-/>_-_-/>_-_-/>_-_-/>_-_-/>_-_-/>_-_")
end
boot_logo()
1619 posts
Posted 17 March 2013 - 06:56 AM
… thats not really a boot loading screen, and most people already know how to do term.clear() … but I think how do to a real loading screen it would be
Feel free to correct me on what ever I did wrong, but I'm pretty sure this would be a real boot screen…
function boot_logo()
term.clear()
local boot = {
term.setBackgroundColor(colors.blue),
sleep(5)
}
for i = 1, #boot do
while false do
print(" ")
break
end
end
print("Loading CraftOS, please wait...")
term.setCursorPos(1,19)
textutils.slowPrint("_-_-/>/>_-_-/>/>_-_-/>/>_-_-/>/>_-_-/>/>_-_-/>/>_-_-/>/>_-_")
end
boot_logo()
No boot screen should ever have sleep in it. It just wastes the users' time. If you genuinely have stuff to load, let it load, but don't use sleep.