Jump to content

Benefits of programming without using a framework?


Peaverin
 Share

Recommended Posts

Hi. I'm new in the forum. I haven't seen any introduction section so I'll make a little introduction of myself here. I'm Albert and Im 17 years old, and I'm from Spain (so excuse me if my English isn't good at all). I learned javascript and html5 a year ago, and I started creating my first game from scratch about six months ago (I do it in free time), a platform one with even a level editor created by me. As it was my first experience, I decided to do it without using any framework so I could understand how everything works. Now that I'm about to finish I think this has been a very good experience, but I think it would have been a lot easier (and less time consuming, of course) with a framework. So my question goes here: Does programming without a framework gives any benefit or advantage? I don't think so, but I'm very new to this so maybe someone can surprise me.

Link to comment
Share on other sites

Hi Albert. I'm one of the guys working on PlayCanvas, which is an engine rather than a framework really (although I won't get into definitions!). :)

 

There are, of course, a number of reasons why not using a framework may make sense to you:

  • It is interesting, rewarding, challenging, etc
  • It gives you ultimate flexibility to solve the specific problems you face, often in a more optimal way. Most frameworks are written to handle generic situations.

At the same time, I think it's worth remembering the following:

  • You are unlikely to be able to engineer something on the scale of most frameworks as an individual. For example, the PlayCanvas codebase has taken a number of engineers years to write, each with extremely advanced domain knowledge.
  • You miss out on cool stuff that other users of your chosen framework are doing. For example, if someone writes a cool graphical effect, you should be able to simply copy/paste it into your project.
  • You benefit from incremental performance updates.
  • Frameworks tend to be 'battle-tested' on most/all of the different devices and operating systems out there. Doing this testing/QA yourself is almost impossible.

To me, it's a no-brainer. If you want to make a game - make a game and not technology. The player doesn't care what engine you're running on. They care that your game is fun to play. So don't get hung up on writing technology and look for ways to make your games faster and more easily.

Link to comment
Share on other sites

My grandfather was a blacksmith, and when he learnt the trade, the first thing he had to do is to make his own tools: You know you can buy a hammer in a shop, but you cannot buy all the hammers, pliers and chisels a blacksmith uses.
This does not mean he did not use any tools, or have not worked with ALL of them. The best tools are needed for high quality and productive work, and one way is to make your own, the other way is to use a pre-made one.

 

So I think, the more frameworks (tools) you try, the better!

And to make your own framwork (tool), your own lib, or the combination of pre-made libs and frameworks, it can all work for you.

I came from the web development world, and I always ended up rolling my framework from a combination of pre-made libs, frameworks, and some of my own libs. (very little "from scratch")

But this worked because I tried many other frameworks at that time.

Link to comment
Share on other sites

@willeastcott: Thanks for the reply! As you said, I've got a personal satisfaction creating the game by myself, but now I think it's certainly true that using a framework is the best way for creating a game.

@BitOfGold: thanks also! that's what I'll do, I'll try as much frameworks as I can and I'll see which one I prefer the most!

 

Well, I think the question's been completely answered. Thanks guys!

Link to comment
Share on other sites

I personally do not use any third party framework for my games. I started writing a very simple set of objects, improved and extended them as I wrote my second game then third, then fourth and so on... The code is generic enough but not so much that it would affect usability and performance, reusable and pretty easy to use and focused enough to fit the type of games I am making. 

 

I agree, one cannot engineer something of the scale of most frameworks alone but do we really need to at the end? Starting simple then evolving depending on your actual needs (which may not be so demanding that they require a full-fledge framework) may also be an alternative - it has been for me at least.

Link to comment
Share on other sites

  • 2 weeks later...

I think there's an important distinction to make here:

There's libraries on the one hand and frameworks on the other.

 

A library is something you use in your code so that you don't have to do something yourself (or do it again), but it doesn't dictate how you have to write your code. Frameworks are similar to libraries, but they force you to make compromises in how you structure your code. Therefore, frameworks can lead to something called "lock-in". This means that if you later decide, for whatever reason, that you want to use another framework, you'll have to rewrite pretty much all of your code.

 

There are some people who think it's actually a good idea to adhere to the way a framework forces you to write your code because it might lead to a better overall structure. So in a way, this is certainly a matter of taste as well.

 

Having said all that, if what you want to do is develop a simple game with a well-defined feature scope and you know that you'll just leave it as it is once you're finished with it, a framework doesn't impose the same burden as it would in a project where you continue to add features for years to come. You have to keep in mind though that every framework imposes a learning curve and that sometimes you have to invest so much time into learning a framework that it would be better to just write your code without it.

 

Personally, I avoid using frameworks whenever possible and opt to use libraries instead. That's why I usually prefer things like Pixi.js to full-blown frameworks.

 

I should also mention that what many people do is build their own "framework" for use in later projects. There's nothing wrong with that as long as it doesn't eat up all your time. These custom "frameworks" have the benefit of working exactly the way you want them to work.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...