JeZxLee Posted December 12, 2015 Share Posted December 12, 2015 HTML5 Experts Wanted - Please Criticize Engine... Hi, So my team and I have been working on our HTML5/JavaScript 2-D video game engine.We were hoping some expert HTML5 coders could take a look at our HTML5 engineand give us some feedback and suggestions for improvement? You can download this HTML5 engine as a finished game at the following website URL:www.OpenTetris.com(full source code is downloadable on the title screen) Any and all feedback is welcomed as we are not experts.We will be using our HTML5 game engine in a official project soon.Thank you in advance! Jesse Quote Link to comment Share on other sites More sharing options...
mattstyles Posted December 14, 2015 Share Posted December 14, 2015 I had a quick look, I didnt have time to dig through the code much, it would be better for me if I could see the code hosted on Github or Bitbucket rather than poke through a download, that would be my first bit of advice. If you dont use version control at all then using git would be a good starter improvement for you guys, the benefits are plentiful and it can be a little complicated (overly so in places) but it really is fairly simple to learn once you get over the initial hurdle. My 2nd bit of advice relates to the fact that you're stuffing everything in as global variables. There are a number of reasons why this is a dreadful idea, particularly when there are so many objects polluting global. Look into code modularisation, at least look at wrapping modules in immediately-invoked function expressions (google for IIFE), a single namespace variable if you must pollute global but also look at better ways for your modules to communicate— pub/sub is probably easiest to start with. Beyond that look at tools like Browserify and Webpack (there are others) to bring a module system to your coding (stay away from AMD based solutions like require.js, they're dead and they're nasty). It will help you to structure your code and your changes and will help you to white label your game engine for use in other places. Beyond that, keep plugging away and improving. Finishing off a game is a great achievement and sure, there are some oddities in the tetris game, but it runs great and is very playable so thats a job done well. Quote Link to comment Share on other sites More sharing options...
rothers Posted December 14, 2015 Share Posted December 14, 2015 Had a quick look too, it's actually pretty nice, the general rendering seems solid at least on my macbook setup (I didn't try it on a phone), I like the way it will adjust to the screen size on the fly. If you're going to throw in all global vars at the top you might as well make them window. variables - this has several massive advantages if you're planning on expanding or reusing the code later, it also allows you to call and manipulate variables from the html file for example, so you can set things up from html without having to do anything custom in the game. In terms of the game itself I found the tetris wells way too narrow, why waste all that screen in the middle? Quote Link to comment Share on other sites More sharing options...
b10b Posted December 14, 2015 Share Posted December 14, 2015 I'd be happy to review - if it's on github (or similar) with a clearly defined license. Quote Link to comment Share on other sites More sharing options...
rgk Posted December 23, 2015 Share Posted December 23, 2015 I noticed it expected keyboard clicks on mobile, so I couldn't play but everything worked until the game (mobile). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.