2 Replies - 751 Views - Last Post: 04 March 2017 - 11:37 AM

#1 Hydropulse17  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 04-March 17

Alternative to loading ridiculous amounts of content manually?

Posted 04 March 2017 - 06:56 AM

Is there another way to load content besides using Content.Load<>(); for every file? I mean, I spent several hours animating my robot for a game, not even thinking about the content loading process, and his running animation has 62 sprites, as well as his walking animation, even his standing animation has like 15. Not to mention I intend to animate jumping and various interactions.

I was thinking maybe somehow I could create an array of Texture2Ds and populate it with a for loop somehow?

Is This A Good Question/Topic? 0
  • +

Replies To: Alternative to loading ridiculous amounts of content manually?

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13383
  • View blog
  • Posts: 53,409
  • Joined: 12-June 08

Re: Alternative to loading ridiculous amounts of content manually?

Posted 04 March 2017 - 10:26 AM

I would figure all your content is in one folder so use the 'DirectoryInfo' to get a list of all the files in a folder and use a loop to have the content loaded.

https://msdn.microso...(v=vs.110).aspx
Was This Post Helpful? 0
  • +
  • -

#3 basteagui  Icon User is offline

  • D.I.C Head

Reputation: 14
  • View blog
  • Posts: 60
  • Joined: 08-September 13

Re: Alternative to loading ridiculous amounts of content manually?

Posted 04 March 2017 - 11:37 AM

it seems like what you really want to do is make sprite sheets that hold many of your sprites.
unless you are using huge sprites in which case a spritesheet would be of a ridiculous size.

it's not too hard to code. you just load up a big image made up of squares that your sprites/animations fit in and you load that part of the image,
and for the next picture you offset that number

i think it is more efficient on the computer to load a big image with several sprites than to load a different image every frame.

i might be mistaken but i am pretty sure that is the case

This post has been edited by basteagui: 04 March 2017 - 11:38 AM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1