linkaos Posted October 8, 2015 Share Posted October 8, 2015 Hi All, new to this forum I'm a computer programmer working this days mostly as a UI developer using javascript, html5.... Last week I started a team with an artist friend of mine with the objective of making a game (a 2D platformer, kinda limbo). My first though was to use javascript, but after some research I found that many frameworks or libraries target HTML5 as a compilation platform (ie libgdx and gamemaker). I'm here because I'm inclined towards HTML5 but I would really love to hear some experiences. Are you coding directly javascript ? or are you using one of this frameworks and compile later for the platforms you want to target? Why do you prefer coding html5 versus another language? this second question is obviously for people that, like me, maybe code java or c#, but decided to stick with javascript for game programming. I would really love to hear why. thanks! Note: also, forgive me if this question has been asked before, I searched without success. Just point me to the thread and delete this one Quote Link to comment Share on other sites More sharing options...
BobF Posted October 8, 2015 Share Posted October 8, 2015 Why do you prefer coding html5 versus another language? this second question is obviously for people that, like me, maybe code java or c#, but decided to stick with javascript for game programming. I would really love to hear why. For me, it's not necessarily a preference, but rather JS/HTML5 is quickly becoming the only reasonable choice for client-side web programming. Flash, Java, Silverlight, etc do not work on mobile browsers and they are dying technologies. JS/HTML5 has its drawbacks, but it owns the future of web programming. Now that browsers support WebGL, performance is less of an issue than it was previously.Concerning frameworks... I coded my own WebGL based graphics engine due to special requirements. But I think using a framework like Pixie, Phaser, etc is a sensible choice for most people. Quote Link to comment Share on other sites More sharing options...
sandudhate Posted November 3, 2015 Share Posted November 3, 2015 Hi, Actually there is no problem of performance. HTML and JS can be as fast as native code. In this forum, there is a topic called ' Learning to write good JavaScript'. Follow the basic guidelines. There are advantages of html5/js combo too. You can target whole html games market along with native markets. That certainly gives you wider range of distribution choices. And leads to more Revenue. Certainly, a good idea is to use a framework. There is site called html5gameengines.com . And I think you can find good opinions about frameworks on the forum too. Choose the framework that suits your needs the best. For a platformer, you can go for Phaser etc. Because, it eases physics with game design. Hope that helps. Regards,Sankarshan Quote Link to comment Share on other sites More sharing options...
mattstyles Posted November 10, 2015 Share Posted November 10, 2015 Hi,Actually there is no problem of performance. HTML and JS can be as fast as native code. This is inherently not true, JS is interpreted, good JS will always always always be slower than good native code. However, and this is the crucial reason why JS/HTML5 is on top of the world, 95% of applications out there will not tax the environment they run in, yes, even games. Most of the time JS is fast enough and thats all you should care about. But I dont think the question is aimed at why JS/HTML is so popular, I think the OP gets that, they would like to know whether its best to write JS or compile to JS. If your team consists of you and an artist then code in whatever language you are most comfortable with, unless you want to learn to write in a different language. The transpilation does not matter, technically a transpile is unlikely to be as fast as something written in JS but, dependent on your goals, it will likely be fast enough. Most transpilation engines are tested rigorously to ensure they are spitting out performant code so, even if you are great at JS, it may actually happen that the transpiled code is faster than whatever way you would have written it. Languages like TypeScript and Haxe, which are built around transpilation to JS, are great for teams, less important for small teams or solo coders. JS is a big bag of quirky crayons—it is easy to hold, easy to draw with and given enough time/patience/skill will produce wonderful output. However, if you've only ever drawn with the precision of pens, or the expression of water-colour, why fight it? Most things transpile to JS as a target, if you're happier in Java, code in Java. Dont get hung up about it. A language is only there to make what you want to make. Code your backend in Rust, your API in Go and your front-end in C (transpiled to JS of course) if this all makes sense to you. It almost seems like you're asking this question:If I code in JS, am I going to be hamstrung by the constraints of the language?The answer is a resounding no. JS FTW! Quote Link to comment Share on other sites More sharing options...
Skratti Posted December 2, 2015 Share Posted December 2, 2015 You will probably have to debug using the browser. This does not necessarily mean that you will have to debug JS.As far as I know, most transpilers provide source maps, so the browser shows the language that you are developing in. But I heard that transpilers sometimes did make mistakes or the generated code does not behave as anticipated. Then you will have to understand the JS that they did create. @community: Can bigger projects be completed without deeper JS knowledge? Quote Link to comment Share on other sites More sharing options...
mattstyles Posted December 2, 2015 Share Posted December 2, 2015 @community: Can bigger projects be completed without deeper JS knowledge? Yep, Nickelodeon write the large majority (all?) of their html apps in Haxe, pretty sure Zynga are the same. They chose Haxe precisely because they have large teams and big projects. Quote Link to comment Share on other sites More sharing options...
FlashRevolution Posted December 4, 2015 Share Posted December 4, 2015 I started 10 years ago by programming websites and gamling games using HTML and Flash. Now I mostly use HTML5 and Javascript to develop games.Sometimes I used native JS with CSS without any framework like phaser. After all the years my experience are, that there are a lot of possible ways to build games, but with JS and frameworks like phaser it is a lot easier to build games.And in fact, you can build them to a lot of plattforms. Phaser games run directly in browsers, with jQuery you can use a backend server easily and than there are tools like web2exe or intelxdk to transform the games to desktop apps for windows, linux and mac or as app for ios and android. You just have to know what you want. Building a game, sell it or use revenue sharing, sell ingame items or something else, you have so many options. 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.