A small brick game... Pure JS and HTML
- a_bertrand
- Posts: 1536
- Joined: Mon Feb 25, 2013 1:46 pm
A small brick game... Pure JS and HTML
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.
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
Mad programmer and annoying composer
Re: A small brick game... Pure JS and HTML
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
- a_bertrand
- Posts: 1536
- Joined: Mon Feb 25, 2013 1:46 pm
Re: A small brick game... Pure JS and HTML
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.
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
Mad programmer and annoying composer
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: A small brick game... Pure JS and HTML
Thats pretty awesome for no canvas. Nice work!
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: A small brick game... Pure JS and HTML
Yeah nice work! Are you using HTML5 for sound, or something else?
The indelible lord of tl;dr
- a_bertrand
- Posts: 1536
- Joined: Mon Feb 25, 2013 1:46 pm
Re: A small brick game... Pure JS and HTML
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).
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
Mad programmer and annoying composer
Re: A small brick game... Pure JS and HTML
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?
- a_bertrand
- Posts: 1536
- Joined: Mon Feb 25, 2013 1:46 pm
Re: A small brick game... Pure JS and HTML
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.
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
Mad programmer and annoying composer
Re: A small brick game... Pure JS and HTML
Not only is it cool technology wise, it's also really fun to play!
Re: A small brick game... Pure JS and HTML
Yeah, I liked the coin drop - that's a nifty game addition, even if the html5 implementation wasn't already nifty!Kesstryl wrote:Not only is it cool technology wise, it's also really fun to play!