开发者

Is a framework necessary to develop a canvas game in Javascript?

I've searched around for different Javascript frameworks to make a fairly simple 2D tile platformer game. So far, those I have tried have been giving me the开发者_C百科 feel that it is less complicated to create the game from scratch because the frameworks are so complicated to use. In my option, it feels very depressing/stupid when learning the framework in question is harder than actually doing everything yourself.

So if I were to create a typical 2D platformer, would it be wise to use one of these frameworks? If so, is there any framework in particular to use?

I understand the general idea that frameworks are useful in many cases, especially for big projects. But does this also apply to smaller projects like a platformer? It feels like a scenario of using a large sledgehammer on a small nail. Your opinions are appreciated :)


Every framework/library is a tradeoff. They take time to learn, and unless you plan on cracking them open, may only do half of the things you want to do and impede the other half. Once learned, however, they can reduce development time by quite a bit, especially with something as low-level as Canvas.

Frameworks are absolutely not necessary. I've created games from scratch without any framework.

You have to think of it in terms of the hurdles needed to cross in order to do something.

Are you making one small game? Then frameworks are probably going to get in the way and take up your time more than help you.

Are you making a large game? Then maybe you should look into a few frameworks to not only use but also give you guidance as to how to do some of the things you'd like to do.

Are you making many small or large games? It's possible that taking the time to learn a framework would save you considerable time then. It's also possible that making your own compact framework will also save you time.

So there's no framework, someone else's framework, or making your own framework. You could also use half a framework or a compact math-only framework: At the very least you could borrow low-level math frameworks that define Point, Rect, etc objects and their various interactions. No need to re-invent the wheel there.


I've built the basis for a 2D platformer (tiles, animated sprites, maps, etc) and the most difficult part was a proper sprite-wall collision detection. A framework could help to skip the annoying (or maybe the most interesting, but time-wasters) parts ...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜