isfuturebright Posted November 25, 2013 Share Posted November 25, 2013 I have a very large spritesheet (7840x4900) for a character in my game. When loading the game on chrome I don't have any problem, but on the TV it just loads the default Square. Any ideas how to approach this? EDIT: I got the name of the topic wrong "Large Spritesheet isn't loading on Samsung Smart TV" Guess 10hours straight at work does make you tired >.< Link to comment Share on other sites More sharing options...
shawnbless Posted November 26, 2013 Share Posted November 26, 2013 What is this common misconception that your game can load extremely large image files? Yes, you can on the desktop, most likely get away with it. But on mobile devices, of which your TV technically is, you will be lucky to be able load anything 4096x4096. If I were you I would break my spritesheet into multiples, keeping a more reasonable size of say 1024x1024. Mobile graphics chipsets have much less memory to work with than desktop. I don't know for a fact that this is your problem, but it is what I would try first if I was you. Good Luck!Shawn BlessRocket Star Link to comment Share on other sites More sharing options...
rich Posted November 26, 2013 Share Posted November 26, 2013 That's one hell of a texture size! There are desktops that can't handle that, never mind Smart TVs Break it apart. A lot. Or find another way to handle the animation maybe? Link to comment Share on other sites More sharing options...
isfuturebright Posted November 26, 2013 Author Share Posted November 26, 2013 Thanks for the quick reply guys. Yeah I imagined it would be too big. It's because the game runs on a 1280x720 display so our character was like really big and had lots of animations so ended up with a very big spritesheet. The thing is that we have alreay a lot of animations and there probably will more to come... how would you go by handling this on code? I mean I currently have my player class extending Phaser's Sprite but If I were to have multiple sprites each with multiple animations I'm not really sure what's the best approach to handle it. Link to comment Share on other sites More sharing options...
alex_h Posted November 26, 2013 Share Posted November 26, 2013 If at all possible I would recommend to try using a skeleton animation system like Spine, DragonBones or Spriter rather than spritesheet animation, especially if each individual frame is already really big. Not all content will suit skeleton animation, but it often will work very well, and will save you a huge amount of file size over the spritesheet approach. shawnbless 1 Link to comment Share on other sites More sharing options...
isfuturebright Posted November 26, 2013 Author Share Posted November 26, 2013 If at all possible I would recommend to try using a skeleton animation system like Spine, DragonBones or Spriter rather than spritesheet animation, especially if each individual frame is already really big. Not all content will suit skeleton animation, but it often will work very well, and will save you a huge amount of file size over the spritesheet approach.The thing is that the whole animation was done in 3D and exported for spritesheets. Spine is for 2D animation right? I don't think we could switch to that now. Link to comment Share on other sites More sharing options...
alex_h Posted November 26, 2013 Share Posted November 26, 2013 Ah yeah that's a shame then, yes these bones tools are only for 2D animation. Funnily enough when I said 'not all content will suit skeleton animation' I was actually specifically thinking of animations involving items rotating in 3D. We had a similar issue at work recently where we were hoping to use skeleton animation but when the designs arrived they'd been animated in 3D and all the plans had to go out the window. Link to comment Share on other sites More sharing options...
isfuturebright Posted November 26, 2013 Author Share Posted November 26, 2013 Yeah I'm thinking of using multiple spritesheets but don't know how I would pull that off. I mean setting the animation of different spritesheets and changing between them on the fly I would need to have an object for each or something like that. Link to comment Share on other sites More sharing options...
rich Posted November 26, 2013 Share Posted November 26, 2013 Actually that sounds like the perfect use for a skeletal animation system to me. There's no reason why you couldn't build a skeleton that wasn't simply a few different animation layers positioned on-top of each other, then use the bones to handle joining and swap out textures for variances. Link to comment Share on other sites More sharing options...
alex_h Posted November 26, 2013 Share Posted November 26, 2013 I guess it boils down to what the content is that you are trying to animate. Some 3D objects can be fairly seamless which might make it hard to see where one bone should end and another should start without making the joins glaringly visible. Especially if they've been rendered with realistic lighting effects. Link to comment Share on other sites More sharing options...
rich Posted November 26, 2013 Share Posted November 26, 2013 Yes but if the change just requires colour/texture overlays for example, but in sync, then you could still use a tool like Spine to manage the layering and swapping of the animations. More like a compositing tool than actually animating anything with it. Link to comment Share on other sites More sharing options...
alex_h Posted November 26, 2013 Share Posted November 26, 2013 Agreed, I'm sure that for some animations that could be a perfectly valid approach. On the whole it generally works best if the animator knows in advance that their animation is going to be used with a bones system, so then they can gear the animation towards this kind of application. Link to comment Share on other sites More sharing options...
isfuturebright Posted November 27, 2013 Author Share Posted November 27, 2013 Thanks for all the help guys we managed to break it down and make it work shawnbless 1 Link to comment Share on other sites More sharing options...
Mike Posted November 27, 2013 Share Posted November 27, 2013 I'm curios to know 7840x4900 is now broken on how many and what size sprite sheets ? Link to comment Share on other sites More sharing options...
alex_h Posted November 28, 2013 Share Posted November 28, 2013 what size sprite sheets ? I've come across this reference before, not sure exactly how reliable it is but the kind of sizes given should give you some idea of the extent to which 7840 x 4900 is too big http://www.williammalone.com/articles/html5-javascript-ios-maximum-image-size/ Link to comment Share on other sites More sharing options...
isfuturebright Posted November 28, 2013 Author Share Posted November 28, 2013 I'm curios to know 7840x4900 is now broken on how many and what size sprite sheets ?Well first we were making each frame too large (leaving too much space between them) and also we were making the whole animation (repeating frames) when I could just do that via code (from 0 to 5 and back). Then it came around 3000px~ so we divided in two parts and it ended up something around 1500x1800 each spritesheet. I've come across this reference before, not sure exactly how reliable it is but the kind of sizes given should give you some idea of the extent to which 7840 x 4900 is too big http://www.williammalone.com/articles/html5-javascript-ios-maximum-image-size/So far we tested with something close to 2000px to work. Link to comment Share on other sites More sharing options...
Chupup Games Posted February 2, 2014 Share Posted February 2, 2014 @alex_h How do you import Dragonbones to Phaser? If i export from Dragonbones i get 2 XML Files (skeleton & texture), but the Loader.atlas() only let me load the texture xml Link to comment Share on other sites More sharing options...
Recommended Posts