Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have been using XNA game studio, but due to private reasons (as well as the ability to publish anywhere & my heavy interest in isogenic engine), I would like to switch to HTML5.

However, I have very high 2D graphic demands for my game.

The game itself will have a HDD size of anywhere between 6GB (min) to 12GB (max) which would be a full game deployed offline. The size of the images aren't significantly large, so streaming would be entirely possible if only those assets required were streamed as needed. The game has a massive file size because of the sheer amount of content.

For some images or spritesheets, they would be quite massive. (ex. a very large Dragon, which if animated in a spritesheet would be split into two 4096x4096 sheets or one 8192x8192 sheet). Most assets would be very small, and about 7MB for a full character with 15 animations in every direction (all animations not required immediately) so in the size of a few hundred KB to download before the game loads.

My question, however, is if the graphical power of HTML5 is enough to animate several characters on screen at once, when it flips through frames quite rapidly. All my sprites have about 25 frames per animation, 5 directions (a spritesheet for each direction & animation), and run at 30fps. Upon changing direction, animation, or a new character entering, spritesheets would change and be constantly loading/unloading. If I pack all directions in a single sheet, it would be about 2048x2048 per sheet.

Most frameworks have no problem with this, but I am afraid from what I read that HTML5's graphical capabilities will limit me. Since it takes significant time simply to animate characters in any language, I'd like a quick answer.

share|improve this question
Here is a link to the quality of graphics and size of sprites I will be using. i.stack.imgur.com/7Lruc.jpg – user15858 Dec 6 '12 at 19:48
how long will it take you to develop the game of that size? – Shaheer Dec 17 '12 at 6:17
@Shaheer about half a decade :P – Dave Jan 25 at 22:45
@Shasheer It entirely depends on what the game is like. Rather than half a decade, it could range from 1 day to 1 million years. "the game of that size?" What size would that be? 6-12GB? That is entirely relative to what the HDD space is consumed by. Games range from a few kb to thousands of MB's for an infinite number of reasons. – user15858 Apr 26 at 10:40
2  
Voting to close as not constructive. There's too many variables to answer if it "has the power to handle a large 2D world". Put together a prototype and see for yourself. – Byte56 Apr 26 at 18:01
show 1 more comment

closed as too localized by Anko, bummzack, Tetrad Apr 29 at 23:42

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

2 Answers

It really is debatable on a few things, for the most part browsers now support hardware, so to some degree your hardware will allow more performance, no chance it'll really perform well on devices/phones as a canvas game, they would be better off as an app than something in a webpage.

It is possible to run a good sized canvas game in isometric how ever. But you will get varying performances on different browsers.

Some main factors:

Browser compatibility of canvas features. How you code the game (the biggest factor of them all) Compression of images... How many images on a screen at any given time (because you have to loop through them) How many loops, and how large the loops are will always add to the time.

Also NEVER draw what you cannot see off canvas.. its a waste.

Some useful links:

Test which approach will give better performance in javascript using:

http://jsperf.com/

Use request animation frame when ever possible for animation, this means animation won't run unless the user is viewing the window (no point doing animation if the user is not looking)

Also check this website for performance tips/results:

http://www.html5rocks.com/en/tutorials/speed/html5/

Other than this theres little else to really be sure because little info is given on the game, theres more to it than graphics (such as path finders, how much maths, hit detection and weather its live action for multiple players...which brings in server performance for sockets).

p.s 6GB for a game in graphics alone???? I think your game might be too big ! For fun:

http://yourgameideaistoobig.com/

share|improve this answer
   
Thank you for the tips. The website is rather unrealistic and seems to give off random numbers without any real reason. I already have most of the assets ready for deployment. The graphics aren't 6Gb alone (well, maybe, if the game ends up being 12GB) but with the assets I have, this is the general range I was thinking the game would end up with everything included. (I added in extremes for everything to reach this number, so I significantly overestimate rather than underestimate.) In the end, 100+ characters fully animated in multiple directions will probably be under 1GB total. – user15858 Dec 7 '12 at 5:33
Also, I calculated the extreme end of content in addition to extreme file sizes for EVERYTHING. The game will probably end up having far less than 100 characters to choose from in the beginning, but I wanted to estimate the HDD space the game would take up given several expansions, 100's of high res characters, doubling it just in case the environment is more costly than I estimate, tons of audio, etc. In reality after reduction in image quality, compression, and less content originally, the game will probably be under 2GB total (another heavy overestimate). – user15858 Dec 7 '12 at 5:38
I was thinking of a "Lite" version for tablets and streamed browser though. Something either with smaller image sizes (If you aren't playing in 1920x1200 resolution, the game will shrink significantly.) It's just something to always do with your art assets, to make them the highest quality and resolution possible since it is easy to go down in quality/res, but not to scale upwards. There are a ton of things I can to do to optimize the game, but I don't plan on doing them unless I have to. (Ex. I can shrink the Dragon character by a lot, saving hundreds of MB's of HDD space.) – user15858 Dec 7 '12 at 5:41
The third link was more of a joke ;) 2GB might still be alot bare in mind its wise to compress images for browsers. Photoshop will be the best method by saving images for web... might want to do batch jobs for that if you have many images. I'm not sure high res is really wise for a game on a browser...3D games are usually pushing the +2GB mark. But im not sure how big your game is planning to be. I'd have to see your images to see how you can save work load. – Dave Dec 7 '12 at 6:17
"Also NEVER draw what you cannot see off canvas... its a waste". I did some benchmarking in Firefox (other browsers may differ, though) and it appears like calling drawImage entirely offscreen returns very quickly. But just trying to call it could already cause overhead (looping through a 10000x10000 array is never fast, even when you don't do anything in the loop body). But in some cases determining if something is offscreen or not can be more expensive than just letting the canvas try. – Philipp Dec 7 '12 at 10:43
show 8 more comments

You could definitely get any game to work using any framework, engine, or language. The question isn't "Can you?", the question is "Should you?"

HTML5 would require quite a lot of solutions to problems that other languages would not have. Until HTML5 gets more powerful, I'd say "No, it is not" to your question. However, don't be surprised that it will be powerful enough very soon.

share|improve this answer
Thanks, that is good advice. – user15858 Apr 26 at 11:01
If you compare C# to JS in terms of creating games, i dont think there are much differences. I dont know what do you mean about "html5 not being powerful enough" but if there is 3d game like quake (or unreal engine 3) running in browser, i dont see any problem of 2d game of any scale. – Kikaimaru Apr 26 at 12:00
1  
I was thinking more along the lines of the amount of content and the way assets are handled, as opposed to mere rendering power. A game like Quake doesn't necessarily mean more demanding simply because it's 3D rather than 2D. There are a lot of different kinds of limitations beyond rendering power. However, I am interested in what you are saying, "I dont see any problem of 2d game of any scale". Really truly? – user15858 Apr 26 at 14:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.