Best way to load assets and switch from different screens

Forum for the book "Beginning Android Games", see http://www.apress.com/9781430230427

Best way to load assets and switch from different screens

Postby badscientist » Tue Jun 14, 2016 1:53 am

Hi! im just begging mobile game development using libGDX.

I just want to ask what is the best way to load screen to screen.

I was thinking to do it like this:

For example i have 2 screens - Home Screen and Profile Screen
I have a list of assets in for Home and Profile Screens

If i want to move from Home to Profile. is it ok to unload all the assets of home screen to minimize memory usage then load it again if I need to go back to Home screen? or its not? OR what is the best way?

sorry for my poor english.. I hope you understand my problem and I hope you have suggestions.. thanks! :) Happy Coding!

Live and Love libGDX!
badscientist
 
Posts: 5
Joined: Thu Dec 17, 2015 6:20 am

Re: Best way to load assets and switch from different screen

Postby divkala » Tue Jun 21, 2016 5:47 am

It depends on how big and memory hogging your app is.
If its quite big and if your main screen/profile screen has a lot of resources loaded into memory, you need to clear it.

Best way forward will be to use an assetmanager for your loading and reading resources. It will help you in the longer run of things.
divkala
 
Posts: 31
Joined: Tue Aug 04, 2015 12:44 pm

Re: Best way to load assets and switch from different screen

Postby badscientist » Tue Jun 21, 2016 7:56 am

Thanks a lot! :) yeap I already using asset manager :)
badscientist
 
Posts: 5
Joined: Thu Dec 17, 2015 6:20 am

Re: Best way to load assets and switch from different screen

Postby workoni » Sat Nov 18, 2017 6:58 am

best porn hd free watch http://erobilder.com
workoni
 
Posts: 13
Joined: Fri Oct 27, 2017 2:36 pm


Return to Beginning Android Games

Who is online

Users browsing this forum: No registered users and 3 guests