It is actually quite easy with HTML5 but you will spend a ton of time writing all this instead of quick development with a engine.
If you are wanting a start then start with displaying the canvas. Then adding a sprite, then move the spite, then create and animation. Once you get those you will get a better idea on what the rest will take.
Remember HTML5 is nothing more than javascript in a sense.
HTML 5 project
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: HTML 5 project
And as far as connecting HTML5 games to MySQL, you have to connect to the server somehow, since that is where the database is. The easiest way is through AJAX. It takes nothing special on the back-end, and you can connect AJAX calls to any server-side technology, from PHP to ASP.NET to Python, etc. The only problem with AJAX is that although it is easy to send requests from the browser to the server, it is not so easy to send requests from the server back to the browser if they didn't request it (aka "server push"). If you need a lot of server pushes, you really need to go with Websockets, which provide very fast two-way communication. Node.js with Socket.io excels at Websockets, but then you are locked into a specific server-side platform. You can connect Node.js to MySQL no problem with the right plugins.
The indelible lord of tl;dr
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: HTML 5 project
Those requirements could be coded by any major HTML5 engine. Inside/outside scenes only depend on what sprites you use, and you have them both through either "states" or "scenes", depending on the engine. Continuous maps are just implemented with scrolling. Any engine could handle those (Canvas Engine, ImpactJS, EnchantJS, MelonJS, CraftyJS, etc.).
The indelible lord of tl;dr
Re: HTML 5 project
I dont think any of the engines have a demo, but if you are willing to spend some cash, go ahead and purchase Impactjs and this book: http://www.amazon.com/Introducing-HTML5 ... 1449315178 Check out the chapter on levels in the book and your rpg will work this way aswell. Whenever you go near a door, load up a new level of whats inside the building and from inside the building when you reach the door again load back the previous level.
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: HTML 5 project
Pretty much what Srachit said. No engine is going to have a sample that is everything you need, nor will you likely be able to copy and paste in code to form your game, because programs are so unique that the pieces would never fit right. There isn't much way around learning the basics of game programming.
However, I would say to go for ImpactJS. It has the most tutorials out there (including Halls' ImpactJS and NodeJS tutorials), as well as the book that Srachit mentioned. It walks you through building a sidescrolling game, but that includes the two main parts you are looking for: full 2D scrolling and state management.
However, I would say to go for ImpactJS. It has the most tutorials out there (including Halls' ImpactJS and NodeJS tutorials), as well as the book that Srachit mentioned. It walks you through building a sidescrolling game, but that includes the two main parts you are looking for: full 2D scrolling and state management.
The indelible lord of tl;dr
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: HTML 5 project
Well, the engine choice isn't unanimous. I was just throwing Impact out there. Canvas Engine has promise, and is free. It is interesting since it is already half setup for online multiplayer, but it will require learning the ins and outs of Javascript for the client (the game itself) and Node.js (for the server). It is nice that they are both in the same language though. That is a perk that didn't exist just a handful of years ago.
The indelible lord of tl;dr
- a_bertrand
- Posts: 1536
- Joined: Mon Feb 25, 2013 1:46 pm
Re: HTML 5 project
Personally I would avoid most of those "game engines" for HTML 5, as they offer in my opinion some cool stuff but lacks many of what you may want to have. I would prefer spend my time on JS, and code it myself, unless you find an engine which does nearly all what you need. Also, think that an engine may have a cost in term of performance / download size, as well as of course license costs.
Creator of Dot World Maker
Mad programmer and annoying composer
Mad programmer and annoying composer
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: HTML 5 project
I personally couldn't stand coding up an entire engine in HTML5. So much is repeated between games (sprite animation system, control scheme, collision system, physics system, tile map system, editors, etc.)!
Not that I am saying you are wrong, but for me, a premade engine was definitely the way to go. I personally thought ImpactJS was worth every penny.
If HTML5 was more like Flash, I would probably agree. I never cared for any of the major Flash game engines, and preferred just doing it on my own. But Flash, along with the Flash Pro editor just offered so much more for game developers out-of-the-box than HTML5 does.
Not that I am saying you are wrong, but for me, a premade engine was definitely the way to go. I personally thought ImpactJS was worth every penny.
If HTML5 was more like Flash, I would probably agree. I never cared for any of the major Flash game engines, and preferred just doing it on my own. But Flash, along with the Flash Pro editor just offered so much more for game developers out-of-the-box than HTML5 does.
The indelible lord of tl;dr
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: HTML 5 project
"Don't reinvent the wheel" only applies to situations where something suitable already exists. I don't really know of any Javascript + PHP game engines out there, even if you wanted to use one. Of course there are JS or PHP game engines, but few to none that use both.
The indelible lord of tl;dr