mansim Posted April 26, 2016 Share Posted April 26, 2016 I am making my game http://armyfight.com/simulator.html now with sprites (swordsman unit). Sprites are 7000*3000 size. One for movement, another for fighting, third for dieing. Same for red color units, another copy for blue color units. So totally 6 big images. If i use only one image( for example, it is always moving, no matter, it fights or dies), it loads smoothly. But if i use all images, when movement changes into fighting, chrome crashes for 2 seconds. But only for first hit, only once. Same happends when unit dies, also chrome crashes for 2 seconds, once, and afterwards everything smooth again, every die and fight is keeping smooth. It is same crash time, even if in field are 50.000 units, or 2 units. Crashes same for 2 seconds. Any suggestions how to make it smooth always? Quote Link to comment Share on other sites More sharing options...
Gio Posted April 27, 2016 Share Posted April 27, 2016 I don't know exactly what you're doing, but it sounds like you want to draw every image once before even starting the game - "loading" time will increase slightly but then you wouldn't have this problem? Also 7000x3000 is too big - lots of machines will have trouble with texture sizes > 4096. Quote Link to comment Share on other sites More sharing options...
mattstyles Posted April 27, 2016 Share Posted April 27, 2016 Yeah, it works fine for me here, so it might not be Chrome but your gpu or something trying to handle those image sizes. Looks like each frame is only about 180x180px, killing all the whitespace would help, but, as you're only displaying them on screen far far smaller than 180x180 you could make each frame considerably smaller and get your image size down dramatically. Quote Link to comment Share on other sites More sharing options...
mansim Posted April 27, 2016 Author Share Posted April 27, 2016 Yes, probably that can solve this. Will try it out, thx I will make much smaller images. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.