generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Loading Bar

Previous Thread :: Next Thread 
iamsmartcookie is not online. iamsmartcookie
Joined: 18 Aug 2012
Total Posts: 2738
27 Apr 2016 11:20 AM
How would I make one?


I have a GUI and I want a frame to go through it and finish in 60 seconds for example.
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
27 Apr 2016 11:25 AM
There are a few ways, but the easiest way is to have two frames. One is the "container" frame, and the other is the "bar" frame.

The container frame will be any size you want, and it will typically have a black background. The bar frame will have a specific size, though. You will set its size to 0, 0, 1, 0 [or, {0, 0}, {1, 0} / UDim2.new(0, 0, 1, 0)]. This means the bar has no horizontal size but its vertical size will fill up the container.

As you progress your loading, you will set the X-Scale to whatever percentage of loading you're at (50% loading = 0.5 X-Scale) while keeping Y-Scale at 1.


local BAR = CONTAINER.BAR

function load(progress)
BAR.Size = UDim2.new( progress, 0, 1, 0 )
end

-- Example
for i = 1, 100 do
load(i / 100)
wait()
end
Report Abuse
SuperLaserCat is not online. SuperLaserCat
Joined: 16 Apr 2016
Total Posts: 140
27 Apr 2016 11:38 AM
Don't make a 60 second loading bar, especially if it's not actually loading anything.
That's bad game design.
Report Abuse
iamsmartcookie is not online. iamsmartcookie
Joined: 18 Aug 2012
Total Posts: 2738
27 Apr 2016 11:38 AM
@Super

It is not loading anything, it's just to stall a function.
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
27 Apr 2016 02:48 PM
TweenSize with the time as 60


Report Abuse
TacticalKiller91 is not online. TacticalKiller91
Joined: 28 Jan 2014
Total Posts: 228
27 Apr 2016 03:13 PM
ROBLOX doesn't support a big enough engine that requires loading times to import models, however games like 'Skyrim' (For example) require loading screens as the engine needs time to load in complex meshes, animations and particle effects etc. But as we only have an engine that can run on basic bricks etc, loading one in takes only (on average) 1/12th of a millisecond, as so I have heard. However, sometimes when Players load in fresh etc, decals, players animation, bricks and GUI/HUD's require some time to load in, so it's best the create a 'Waste' Loader, which just uses a wait() statement.

If your game is complex, like 'Blood and Iron' (which DOES require loading time to import bricks on a large scale due to the great amount of detail), it is best to add a loader which is LEGITIMATE. You can do one of these by importing a brick/various bricks at one point, adding a wait() statement to allow the game to load it in and then continue with the next object you want to load in. This gives time for each brick to load, meaning the lag that the entire model will produce has been segmented down to different times; really efficient.


Another LEGITIMATE one would be adding UDim2.new() units onto the XYZ scale onto a loading bar each time an object/instance is loaded, which I would say is the most efficient, but is not recommend as the chances are that this process will only appear for 500 milliseconds, 1/2 of a second.


You can see many 'Wasters' in various games such as 'Reason 2 Die', 'TNT Run' and other games (which on most cases display a Skip button for you to use).

However, you can incorporate this topic into a CGM (Custom Graphics Machine), which would mean you can create the second point loader (Blood and Iron Loader) which cooperates with a CGM so that loading times depend on the graphics your machine has been set at. This is different to the ROBLOX graphics changer in the menu as it mostly relies on PlayerGui (which can reduce Global lag, but rather apply it to the User that wants their Graphics high). For example, if you had your graphics set to '1 - Low' on your CGM, you would not see certain parts to reduce lag on the user's side, but if you set it to '10 - Very High', you would be able to see certain parts; which could be used to enhance user experience.


Anyway, that was just a review on this topic.


Hope it helped.





Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image