Jump to content

How does one go about making a framework like Phaser?


arungm29
 Share

Recommended Posts

I feel like I don't know enough to contribute to the Phaser, and I'd like to start learning what goes into making a game engine. Any resources and links to get me started would be great.

 

I've already toyed around with Phaser and made my own game with it here: http://arunmahadevan.com/linerunner/

 

I'd like to know how to create such games from scratch, and what goes into making a framework like phaser, like what Richard did.
 
For example, how good at JavaScript do you need to be? Where do you start? How can I start by making a really simple engine, and slowly work towards creating one that can be used in almost any project?
 
Thanks in advance.
Link to comment
Share on other sites

My sincerely suggest is give this a good read since it cover a lot of the basics of "Game engine" and even above that.

 

http://gameprogrammingpatterns.com/

 

It's quite humorous too :)

 

and then you can check this too:

 

http://codeincomplete.com/games/

 

These two are in my current reading list beside experiments and so on.

Link to comment
Share on other sites

I would say that before you make any kind of game framework at all you need to understand how to make games first. Lots of them, all kinds of genres. Otherwise you're trying to solve problems that you only think might exist, without actually knowing if they do or not.

 

You can write your own engine to power those games of course, but then take it through lots of iterations, lots of different game types, so it can become better and contain things that you know for a fact you actually need, and aren't just guessing you may need at some point.

 

And then if you release it, and it gets really popular, be prepared to give up a big chunk of your life to supporting it :) If you don't, it will die and have been pointless making in the first place (other than as a coding exercise I guess)

Link to comment
Share on other sites

Sometimes I wonder why we should stick with a framework when building a game, when someone build framework, first of all, framework will fit author's needs, author never know who am I, what do I want... author of engine create a car (Ford, Nissan...) but nothing guarantee I or someone will have same favorite, assume that I also like a Ford car, I was provided interface to control it, but I feel that I never own it. I don't know how it operate, why it generate error (if I want to know, I must get back and research engine, so I am building house from roof?! )... Game design is an creative job. Game kinds will always change in the future, everyone only can create framework themselves. 

 

ps: just my feeling, I respect author's effort, sincerely.

Link to comment
Share on other sites

Sometimes I wonder why we should stick with a framework when building a game, when someone build framework, first of all, framework will fit author's needs, author never know who am I, what do I want... author of engine create a car (Ford, Nissan...) but nothing guarantee I or someone will have same favorite, assume that I also like a Ford car, I was provided interface to control it, but I feel that I never own it. I don't know how it operate, why it generate error (if I want to know, I must get back and research engine, so I am building house from roof?! )... 

 

ps: just my feeling, I respect author's effort, sincerely.

 

Having an opensource framework (like phaser) is really helpful, you don't need to start fresh (read Rich's response), by using an opensource framework allows you to know it intimately. After that you know if the framework is for you or not. If still is not for you, you still have options:

  1. Contribute with patches to the framework. If they are useful they'll be incorporated and you've got the framework closer to your needs by helping other people at the same time.
  2. Fork it. Most likely there is still a large part of the code that'll be useful to you and you are getting some diversity in the choice
  3. Start fresh. This is probably the worst option, it's likely that you'll not finish it, still is an option and you already gained a lot of insight from knowing the framework which will save you some headaches.

 

Game design is an creative job. Game kinds will always change in the future, everyone only can create framework themselves. 

 

One with a lot of non-creative parts attached  ;)

Link to comment
Share on other sites

I would say that before you make any kind of game framework at all you need to understand how to make games first. Lots of them, all kinds of genres. Otherwise you're trying to solve problems that you only think might exist, without actually knowing if they do or not.

 

You can write your own engine to power those games of course, but then take it through lots of iterations, lots of different game types, so it can become better and contain things that you know for a fact you actually need, and aren't just guessing you may need at some point.

 

And then if you release it, and it gets really popular, be prepared to give up a big chunk of your life to supporting it :) If you don't, it will die and have been pointless making in the first place (other than as a coding exercise I guess)

I agree with this and would just say don't worry about making an engine at all. If you make games from scratch, you will realize you need to do certain things like load images, display them, handle input etc. Just make games handling these functions, then abstract it. Don't worry about writing it abstracted in the first place.

 

Then, once you have all that code if you think it's worth your time abstract it all to have MyEngine1.0

 

Having worked on multiplatform game engines though (C++, C#, Silverlight, Android (In java!), and Objective-C target over multiple frameworks, with DirectX AND OpenGL support) I can safely say if you don't want to do this more than you want to make games, don't waste your time thinking you will make something amazing in your free time people want to use...

Link to comment
Share on other sites

I agree with Rich. Make games and experiment. As your knowledge and experience increases, you will notice nice ways of doing things, and ways you prefer things to be done. And that will guide you to building an engine.

 

If you would like a more technical look at what goes into creating an engine, I'd recommend this book by Pascal Rettig: http://www.amazon.com/Professional-HTML5-Mobile-Game-Development/dp/1118301323

 

You build a very nice engine, Quintus (http://html5quintus.com/), throughout the book and make loads of games along the way.

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...