Sign in to follow this  

Creating Browser Based Games?

This topic is 2046 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys, so I'm kind of at a loss on what I need to do so I was hoping someone could point me in the right direction. I'm fluent with C++ and making games with it and SFML 2.0. I feel like i want to move on to learning new things now that I'm comfortable with that language and grow as a programmer. I was thinking of starting to learn networking, web design, and ultimately create a browser based game.

So my question is this. What language should i start learning to create web sites at first and then later be able to use to make browser based games? The games would most likely be 2D if that helps. I just need input on what is the most common and widely used language for those purposes. Maybe give me a list of languages and what they are most commonly used for or good for. Any ways, thanks in advance :)

Share this post


Link to post
Share on other sites
[url="http://www.w3schools.com/"]http://www.w3schools.com/[/url]

HTML, XML, PHP and related styling languages..

Share this post


Link to post
Share on other sites
HTML5, CSS, XML, JSON, JavaScript -- w3schools is a good source for all of that.

I don't feel any need to recommend PHP. It's pretty pervasive, yes, but there are a lot of better frameworks for producing custom server-side content. I like Lift (which uses Scala) myself, but there are options for just about any programming language out there, and there's probably more than one decent framework for Node.js (which uses JavaScript) which would allow you to leverage your JS skills (and maybe share code between) the client and server.

Flash has been the go-to for years, but support for standards-based HTML5 has been growing, while support for browser plugins has been in decline. It's no secret that the Flash environment will have to move off the browser to survive. Luckily HTML5 + Javascript is quite good, and performance is similar to or better than Flash (though the ecosystem around it is still fledgling). A good audio API was one of the last advantages Flash had over HTML5, but the WebAudio API is stepping up to that plate quite nicely.

The biggest problem with HTML5 for games and media right now is that the standards and browser support are still emerging. Usually they are on fairly solid ground, but its not impossible for there to be breaking changes, or for a competing standard to become dominant. Also, Microsoft has readily embraced many of the emerging standards, but does tend to lag behind Chrome/Mozilla (eg, I don't think IE supports WebAudio yet), and has also stated that they won't support WebGL due to security concerns--These concerns are valid, but I do think there's also a political/competetive aspect to this stance. I suspect time will tell that they will have to cave in and support it eventually, however (Any competing, low-level 3D API would necessarily suffer non-trivial performance hits to correct their objections to WebGL, or be at the mercy of the same concerns). Edited by Ravyne

Share this post


Link to post
Share on other sites
XHTML are pretty much the same thing, start from HTML, make sure to write it well formed and there you go you already learnt XHTML.. (this wont take long, w3schools tutorials are quite easy and quick to read)

Then you can move to HTML5, you cant start from that without any basic knowledge of HTML (atleast not following the tutorials from w3schools, they take HTML knowledge as a prerequisite when they start talking about HTML5).

Share this post


Link to post
Share on other sites
HTML5 is HTML4 with some new tags and shortcuts, it isn't something different.

XHTML is just a convention saying "let's try to code correctly and not let the poor browser decyper what our code is supposed to do", it isn't something you "learn", you just do it.

Share this post


Link to post
Share on other sites
If you want to create browser-based games which are playable on modern devices, pretty much you need to use Javascript (There are other languages which compile into JS, but they are effectively just extra layers of complexity).

It would not be necessary to be an expert at HTML to write browser-based games, because they often don't contain a lot of HTML, rather just a few elements and lots of Javascript code which carries out most operations.

The canvas element lets you do game development in a way similar to "traditional" game programming, either with the 2d context, or the webgl context.

Share this post


Link to post
Share on other sites
[quote name='markr' timestamp='1336355532' post='4937926']
If you want to create browser-based games which are playable on modern devices, pretty much you need to use Javascript (There are other languages which compile into JS, but they are effectively just extra layers of complexity).

It would not be necessary to be an expert at HTML to write browser-based games, because they often don't contain a lot of HTML, rather just a few elements and lots of Javascript code which carries out most operations.

The canvas element lets you do game development in a way similar to "traditional" game programming, either with the 2d context, or the webgl context.
[/quote]

That's not entirely off the mark--you don't need to be super expert at HTML to do many games. However, you do at least need to be familiar enough to find your way around the DOM, manipulate it, and to create enough of a "stage" using HTML for your game to live on.

Also, one of the great benefits of HTML5/JavaScript as a platform is that you can leverage HTML elements for your interface, rather than coding up custom UI and rendering it to canvas. All of those elements are pretty "skinable" using HTML and CSS, so you should even be able to make it fit the style of your game. There's essentially no reason that you should have to render text, or other UI without using HTML, and it'll be faster to boot because browsers are pretty darn good at it.

That might not be a huge boon in an arcade game, but UI-heavy games like RTSs, RPGs, or for things like settings menus, it can be a huge benefit.

Share this post


Link to post
Share on other sites

This topic is 2046 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this