DEV Community

Fernando Doglio
Fernando Doglio

Posted on

Which JS Game library would you recommend for a 2d side scroller?

I'm in the process of planning my next big "side project", and it involves game development in JavaScript. It'll most likely be a 2D side scroller since I have no experience in the area but I do know my JS.

That being said, a quick google search returns too many possible options! Does anyone here have any experience with some of them? Any recommendations?

I'm partial to melonJS, but I might be completely wrong here..., so looking for a guide.

Any suggestions?

Thanks!

Top comments (6)

Collapse
 
alamantus profile image
Robbie Antenesse

I haven't tried many, to be honest, but Phaser has been pretty good to me for a while! It's easy to get basic stuff set up, has some physics things built in (good for platformers), and can do really big things. I've also heard that ImpactJS was pretty good, but I never used it because it only went free a couple years ago (I think). Those are the two pure JS ones that I know are really good, but honestly, if you've looked at melonJS and it looks good to you and it looks like it can do what you want, then I'd say use what you're comfortable with!

Collapse
 
drmandible profile image
DrMandible

Are you developing for desktop, mobile, or both?

Collapse
 
deleteman123 profile image
Fernando Doglio

It'll be a typing game, so desktop web.

Collapse
 
drmandible profile image
DrMandible

A typing sidescroller? I'm afraid I'm having trouble understanding your project.

But that's ok. I'd suggest starting with vanilla js and start working on whatever you can. As you develop more skills, you'll see other things that you can do. Maybe you'll hit a roadblock and say to yourself, "omg this part of my project is too hard" and then you can see if there's a library or framework that can help.

For example, I wouldn't recommend diving into WebGL unless you have a seriously strong math background or a LOT of time you can spend learning. That's a job for a library/framework.

But relatively simple things like moving sprites around the screen, controlling your character, updating the score, etc, should be at least attempted in vanilla js or one of the major library/frameworks like React or Vue. This way you're much more likely to be learning skills that will translate into future projects. If you choose a game maker (such as Phaser), you're learning things the "Phaser" way which may or may not translate into a useful skill for a later project.

Collapse
 
wallynm profile image
Wallysson mota

Tried some time ago cocos2dx-js, they have Full os compatibillity but had some difficulty with docs at the time.

You may try It also!

Collapse
 
deleteman123 profile image
Fernando Doglio

Thanks for the suggestion, I'll make sure to check it out!