A small brick game... Pure JS and HTML

Got a project near completion? Got a project with lots of screens and media? This is the place. This is for nearly finished and Projects with lots of media.
Post Reply
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

A small brick game... Pure JS and HTML

Post by a_bertrand »

A small JS game I tried to create just for the fun, to see how well JS would react:

http://temp.nowhere-else.org/jaxbrick/

It has some bugs (known and unknown), but at least features wise it should be considered as finished:
- Multiple balls
- Multiple level
- Bonus
- Score
- Music and sounds
- And the art

What shall I do with it? Nothing was just to play with. Have fun. Comments, questions, feedback are welcome.
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
srachit
Posts: 291
Joined: Sat Jan 05, 2013 6:10 pm

Re: A small brick game... Pure JS and HTML

Post by srachit »

If i'm not wrong, the coding of this is freely available by just viewing the source code of site, so if anyone wants to learn how to make a game using HTML5 this could be a good start aswell :)
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: A small brick game... Pure JS and HTML

Post by a_bertrand »

It's indeed all included in the page source. I didn't minimized the source nor obfuscated it. Feel free to have a look. However keep in mind I uses very little HTML 5 for it. No canvas for example. Why? because it's not useful for this project. Divs do pretty well.

BTW Works better on IE 9-10 and Chrome. FF adds some nasty lags specially on the sound.
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: A small brick game... Pure JS and HTML

Post by hallsofvallhalla »

Thats pretty awesome for no canvas. Nice work!
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: A small brick game... Pure JS and HTML

Post by Jackolantern »

Yeah nice work! Are you using HTML5 for sound, or something else?
The indelible lord of tl;dr
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: A small brick game... Pure JS and HTML

Post by a_bertrand »

I use HTML 5 for sound. No flash or other oddies in the page. All pure HTML / CSS and JS.
The only specialty is that I don't use canvas instead uses divs which works just perfectly for my needs (60 fps for a brick game is more than enough).
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
Renavoid
Posts: 60
Joined: Sat Feb 23, 2013 7:48 pm

Re: A small brick game... Pure JS and HTML

Post by Renavoid »

Pure HTML5, JS, and CSS? Color me impressed. I like what you've done. :) Even if I thought of doing that, I'd probably still have used images and sound files! Though, that is probably due to my background as a standard web developer - performance of a single page that doesn't have any server magic generally is not high on my list of priorities. But, that just makes me more impressed with what you've accomplished!
The winds of change are blowing; will you heed their call?
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: A small brick game... Pure JS and HTML

Post by a_bertrand »

Of course I used sound files and images, simply I didn't used flash, java or silverlight or whatever other plugins for the sound system.

Server magic or non server magic depends what you need to do. Having load of code on the browser may run things faster and allows more interactive things like this brick game (which you could not do just with PHP for example). However it has the drawback that it is extremely easy to "hack" and not only copy over the whole code somewhere else, but also cheat game scores and more.

Therefore if you build a multi-player game, choose the right balance between the 2 technologies and making sure nobody is cheating is always an hard thing. Specially if you want to go a bit further than a relatively simple "text" interface which reloads on each action.
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
Kesstryl
Posts: 202
Joined: Sat Sep 22, 2012 5:27 am

Re: A small brick game... Pure JS and HTML

Post by Kesstryl »

Not only is it cool technology wise, it's also really fun to play!
User avatar
Callan S.
Posts: 2042
Joined: Sun Jan 24, 2010 5:43 am

Re: A small brick game... Pure JS and HTML

Post by Callan S. »

Kesstryl wrote:Not only is it cool technology wise, it's also really fun to play!
Yeah, I liked the coin drop - that's a nifty game addition, even if the html5 implementation wasn't already nifty!
Post Reply

Return to “Project Showoff Tier II”