Skip to main content
GameDev.net gamedev.net
🔒 Locked

loading resources and progress bar

Started by waxx Jun 10, 2010 at 1:24 PM 2 replies 1.8k views
Original Post
waxx
waxx
hi guys was wondering how do u do the loading resources and progress bar?
how can u achieve smooth loading ?

need threads for this?

c++
alvaro
alvaro
So you have a list of resources to load. In a loop, you load a resource and you update the progress bar to indicate you have done some part of the work. I don't see any problems. Why would you need threads?
waxx
waxx
omg so easy!
thanks dude didnt even think about something that easy :P
Derakon
Derakon
Loading resources could be highly parallelizable, depending on how much CPU work is needed to process a given resource before it's usable. For example, if your texture data is compressed, then resource loading needs both hard drive and CPU time. In that situation, threads could improve the speed at which resources are loaded by letting one thread use the CPU while another thread is blocked on the HD, for example.

However, the basic concept of a loading bar is as Alvaro described.
Jetblade: an open-source 2D platforming game in the style of Metroid and Castlevania, with procedurally-generated levels

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.