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

How To Make a Custom Boot Screen

Started by BaconHawk101, 08 March 2013 - 02:18 PM
BaconHawk101 #1
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!
tesla1889 #2
Posted 08 March 2013 - 03:25 PM
thank god you didnt put any fake loading screens
Cranium #3
Posted 08 March 2013 - 03:54 PM
thank god you didnt put any fake loading screens
Don't hate.
Dlcruz129 #4
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.
tesla1889 #5
Posted 08 March 2013 - 08:21 PM
Don't hate.
im complimenting him
sjkeegs #6
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
BaconHawk101 #7
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/>
BaconHawk101 #8
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.
theoriginalbit #9
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.
BaconHawk101 #10
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
DerDuden #11
Posted 14 March 2013 - 12:10 PM
That's cool man
gonna try this out =)
LBPHacker #12
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…
theoriginalbit #13
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.
Engineer #14
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
LBPHacker #15
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**…
Spongy141 #16
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()
Dlcruz129 #17
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.