5

I am looking to get into game development, after a lot of searching I have decided to try with html5 and, while I can see the advantages of frameworks, I would like to learn the basics without a "crutch".

Is it realistic to even try and start learning game development without using a framework? Also, if I decide to use one, what should I consider when deciding on one?

Vaillancourt
  • 16,325
  • 17
  • 55
  • 61
tony09uk
  • 153
  • 4

4 Answers4

10

I think you're making a mistake thinking of a framework as a crutch. Surely when you want to build your own computer, you don't make all your own circuit boards? Mine and smelt the copper yourself?

Frameworks are not crutches. They're tools that make your job much easier. If you truly want to want to get into game development, you'll want to use frameworks. Otherwise you'll be getting into framework development (maybe someday you'll get to making games).

When deciding on a framework to use, you only need make a few lists. The first list is what kind of functionality you'll need to complete your game. The remaining lists are one for each framework you're considering. Each of those lists should be filled with the functionality that that framework provides. Once you have a set of framework lists whose items fulfills your requirements list, you have a set of frameworks to use.

House
  • 73,224
  • 17
  • 184
  • 273
  • 4
    I'll have to disagree with you on this. Frameworks, while helpful for illustrating concepts in isolation, do often undermine the ability to learn about the core tech that they're abstracting. Generally, framework-based guides will teach you more about how to use the framework than how to use the underlying tech. If you're a single developer working on a single project, this kind of dependency might be fine, but the skills you learn will be less portable. There's a fine line between "framework" and "library" however, and the latter is often appropriate. – MooseBoys Oct 29 '13 at 22:43
  • 6
    @MooseBoys Since the OP said "I am looking to get into game development", using a framework is the most practical approach for this task. If they said they wanted to get into engine development I would agree with you. – House Oct 29 '13 at 22:46
  • "maybe someday you'll get to making games" This...This so much. I usually end up in technicalities. And for what? So now I'm just going high level and use HaxePunk. – Sidar Oct 30 '13 at 14:48
  • @byte56 taking into account your answer and the answers of others I will opt to use a framework, although I think I will first try any do a few very basic exercises using raw javascript just so I know what going on under the hood of the frameworks. – tony09uk Oct 31 '13 at 08:58
  • @tony09uk It really boils down to a simple question you must ask yourself: do you want to develop an engine, or develop a game? You'll learn JavaScript, HTML5 details and so on as you use another framework, but you'll also produce something worthwhile by using tools developed by programmers who went through the "boring stuff" before you... so you don't have to. – sws Nov 01 '13 at 13:15
4

I began in early 2010 using just Box2D.js (optional) + Canvas -- you can play around and start to get a feel for the sort of headaches a framework would ultimately spare you. You can also get a better grip on JS fundamentals, and HTML5 fundamentals and pitfalls (e.g. what parts of the standard aren't implemented yet).

If you're more content using traditional OOP for building games, it's also a good time to learn to replicate that structure in JS, building your own architecture up from scratch without any frameworks getting in your way. This is an excellent question explaining why keyword new works well for instantiating objects, rather than the manual cloning that many gravitate toward in JS.

Under no circumstances would I suggest not using jQuery, even if it's just for managing your viewport (but you will always end up using it for much more than that). Then again, jQuery's not so much a framework as a cross-browser toolset.

Engineer
  • 29,455
  • 4
  • 72
  • 120
3

I would argue that it depends on your immediate goals. A framework might be helpful, or it might be an extra layer of complexity over the extremely simple canvas API.

Helpful

  1. A 2d physics simulation
  2. An efficient particle system
  3. A scene graph full of objects that "know" where they are.

If you want these features, you need a framework. They aren't present in the canvas API.

Not helpful

When I say not helpful, I mean that it may not provide much advantage over simply using the built-in canvas methods. For example, if you want to draw something onto the screen:

canvasContext.drawImage(imageElement, positionX, positionY);

Or a make a game loop:

window.requestAnimationFrame(function(){ // do loop code});

Naturally, these can get more complex as you require more details. But it is not automatically true that the framework will require fewer lines of code or simpler method calls. The canvas API is already pretty simple; a framework will incur some overhead.

A framework will have its own learning curve. You'll need to spend some time reading up, probably following a tutorial. The deciding question is, will you be up and running faster by reading those docs rather than reading this framework-less canvas tutorial?

A framework may only wrap up more powerful features in a cohesive interface. If you are extremely green to game development, that "simpler" interface won't be any benefit if you don't understand what it does for you. Maybe it will provide a translation and a rotation and a unique coordinate system per sprite...but do you need that?

I would say that at their worst, frameworks will cheat you of some of those small details of understanding. That's hardly a reason to avoid them (you'll learn the details anyway), but learning some fundamentals the hard way also has merit.

Seth Battin
  • 5,509
  • 3
  • 27
  • 43
3

Every Framework is an abstractions. And as Joel Spolsky has mentioned that every abstraction in Computer Science is a leaky abstraction. What this means is that which ever framework you pick up, there would some form of limitations. And one would have to understand these limitation before stressing those framework. Understanding of these limitations demands lots of reading, experience and design knowledge.

To answer your question, if you are planning to learn HTML5 then its preferable to go with the basics without framework. If you are looking to make a production ready app, then i would ask you to research on frameworks and pick one to get your hand dirty while learning HTML5. This way you would realize some of the limitations of that particular framework.

biplav
  • 131
  • 1