Jump to content




How To Make a Custom Boot Screen


  • You cannot reply to this topic
16 replies to this topic

#1 BaconHawk101

  • Members
  • 9 posts
  • LocationMy 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!

#2 tesla1889

  • Members
  • 351 posts
  • LocationSt. Petersburg

Posted 08 March 2013 - 03:25 PM

thank god you didnt put any fake loading screens

#3 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 08 March 2013 - 03:54 PM

View Posttesla1889, on 08 March 2013 - 03:25 PM, said:

thank god you didnt put any fake loading screens
Don't hate.

#4 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 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.

#5 tesla1889

  • Members
  • 351 posts
  • LocationSt. Petersburg

Posted 08 March 2013 - 08:21 PM

View PostCranium, on 08 March 2013 - 03:54 PM, said:

Don't hate.
im complimenting him

#6 sjkeegs

  • Members
  • 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


#7 BaconHawk101

  • Members
  • 9 posts
  • LocationMy Computer

Posted 09 March 2013 - 02:44 PM

View PostDlcruz129, on 08 March 2013 - 06:12 PM, said:

Not much of a tutorial and more of a snippet of code, but not bad for someone new to the mod.

:P

#8 BaconHawk101

  • Members
  • 9 posts
  • LocationMy Computer

Posted 09 March 2013 - 02:45 PM

View Posttesla1889, on 08 March 2013 - 03:25 PM, said:

thank god you didnt put any fake loading screens

I don't know how anyways...besides that would be lame.

#9 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 09 March 2013 - 03:04 PM

View PostBaconHawk101, on 09 March 2013 - 02:45 PM, said:

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.

#10 BaconHawk101

  • Members
  • 9 posts
  • LocationMy Computer

Posted 09 March 2013 - 06:24 PM

View PostTheOriginalBIT, on 09 March 2013 - 03:04 PM, said:

View PostBaconHawk101, on 09 March 2013 - 02:45 PM, said:

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

#11 DerDuden

  • Members
  • 4 posts

Posted 14 March 2013 - 12:10 PM

That's cool man
gonna try this out =)

#12 LBPHacker

  • Members
  • 766 posts
  • LocationBudapest, Hungary

Posted 15 March 2013 - 05:03 AM

View PostTheOriginalBIT, on 09 March 2013 - 03:04 PM, said:

View PostBaconHawk101, on 09 March 2013 - 02:45 PM, said:

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...

#13 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 15 March 2013 - 05:34 AM

View PostLBPHacker, on 15 March 2013 - 05:03 AM, said:

-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.

#14 Engineer

  • Members
  • 1,378 posts
  • LocationThe 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

#15 LBPHacker

  • Members
  • 766 posts
  • LocationBudapest, Hungary

Posted 15 March 2013 - 09:39 PM

View PostEngineer, on 15 March 2013 - 11:22 AM, said:

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**...

#16 Spongy141

  • Members
  • 526 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()


#17 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 17 March 2013 - 06:56 AM

View PostSpongy141, on 17 March 2013 - 06:45 AM, said:

... 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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users