Closed Thread Icon

Topic awaiting preservation: DHTML Arkanoid (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8391" title="Pages that link to Topic awaiting preservation: DHTML Arkanoid (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: DHTML Arkanoid <span class="small">(Page 1 of 1)</span>\

 
Scott
Bipolar (III) Inmate

From: schillmania.com
Insane since: Jul 2002

posted posted 11-16-2002 07:24

This is a project I've been working on in my spare time between my job and everything else.. It's an attempt at recreating the original "Arkanoid: Revenge Of DOH" entirely in Object-Oriented Javascript/DHTML.
http://www.schillmania.com

Currently runs best in IE/win32. I'm working to get the same code running efficiently under Mozilla (an early test version works but is very slow.)

I've been a big fan of the Doc, this guy inspired me to get into Javascript back in the early 90's.. ah the good old days - I'm also amazed at the tightness of the code I see posted on this board and the work on peoples' sites (ie. recent 20-line stuff) .. Wow! .. my work pales in comparison by a large factor, at the very least in terms of efficiency! .. some very talented people here.

Comments / feedback / criticism appreciated, I'd be interested to hear what you guys think of this.

- scott

Rooster
Bipolar (III) Inmate

From: the uterus
Insane since: Nov 2002

posted posted 11-16-2002 09:49

Honestly, I just bookmarked it. It?s beautiful. And now if you don?t mind, I would enjoy drooling all over your code for the rest of night.

I?ve always loved this game too.

Ummmmm....OOP JS code.... *unveils big brain spork*... grumf. mumf. mumf.

[edit] I suggest disabling the context menu when a game is in session. My middle finger has sudden fits of laziness, if you know what I mean. And, maybe there could be a pause feature. [/edit]


[edit] OMFG...there's an entire section where I can create my own custom levels. This is awesome. [/edit]


[This message has been edited by Rooster (edited 11-16-2002).]

[This message has been edited by Rooster (edited 11-16-2002).]

Hugh
Paranoid (IV) Inmate

From: Dublin, Ireland
Insane since: Jul 2000

posted posted 11-16-2002 11:56

That site is just so sweet. Amazing work !

edit:

How did you get JS to change the sound so well ?



[This message has been edited by Hugh (edited 11-16-2002).]

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 11-16-2002 14:54

Scott: Excellent work - great coding and nice graphics. You'd probably be better off in here if you are looking for tips on how to make it work in Moz.

___________________
Emps

FAQs: Emperor

Veneficuz
Paranoid (IV) Inmate

From: A graveyard of dreams
Insane since: Mar 2001

posted posted 11-16-2002 15:47

Make it work in Mozilla, I want to play as well



_________________________
"I don't know half of you as well as I should like; and I like less than half of you half as well as you deserve" - Bilbo Baggins (S.R 1401)

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 11-16-2002 18:03

Ooooh, I like it! However, I vote to slow the game down a little bit and, instead of using the mouse, use the arrow keys to control the paddle.

Scott
Bipolar (III) Inmate

From: schillmania.com
Insane since: Jul 2002

posted posted 11-16-2002 18:11

Wow, thanks for the compliments!

Rooster: Disabling right-click while the game is active would be a good idea, I'll do that. I've been meaning to add a "pause" option too, because sometimes you want to switch to a different window to work on other things without having to lose a life as a result!

Hugh: I'm using a "sound-only" Flash movie, controlled via Javascript (ie. the Flash ActiveX control is scriptable, similar to MS' Media Player ActiveX control etc.)

You can use methods (syntax might not be 100% here) like .gotoAndPlay(target,frame) I think it is, to tell the Flash movie to play a certain frame within a Flash movie clip (an object in the movie). I based my implementation off of the "Flash Sonification" JS API, found at http://www.sonify.org/flashsound/docs/ - It works very nicely, although having the full sound effects enabled seems to slow the game down somewhat on slower computers if there are several simultaneous sound calls made at once.

I've also seen the Flash ActiveX crash and take the browser down with it, consequently, when full SFX are turned on in the game and there is a lot of activity (ie. 20+ balls hitting and/or destroying bricks, causing lots of simultaneous Flash ActiveX JS calls to be made).) I suspect it's just one of those things I'll have to work around, as I somewhat doubt the Flash ActiveX was made for this kind of heavy use

And finally, Veneficuz: I should be able to get the same code working 100% under Mozilla, the only real known issues at this point being Flash integration (JS calls are only supported in Flash 6 "revision 48", something like that, and higher) and a few other small differences.

Thanks again for your comments and praise, muchly appreciated!

Any further suggestions, etc.?

- Scott

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 11-18-2002 21:05

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Scott
Bipolar (III) Inmate

From: schillmania.com
Insane since: Jul 2002

posted posted 01-09-2003 03:33

Sorry for bringing this thread back from the dead, but I made a few changes to this thing and wanted some feedback etc

URL: http://www.schillmania.com/arkanoid/arkanoid.html

It now runs under Mozilla (Netscape 6 and Phoenix too of course), although it's quite slow in NS6, Mozilla/Phoenix are much better. I developed and tested it on a 433-MHz Celeron (Win32), have yet to test Linux/Mac.

Some other added stuff:

- Level browser (user-submitted levels) now shows previews (PNGs dynamically generated via GD, woo!)
- Highscore tracking
- Removal of fixed-window (pop-up) requirement (can be resized etc.)
- Miscellaneous bug fixes / improvements from version 0.995a

Comments/questions/criticism is invited and appreciated as always. Word to the DHTML scientists!

- Scott

reitsma
Maniac (V) Mad Scientist

From: the bigger bedroom
Insane since: Oct 2000

posted posted 01-09-2003 04:24

waaah!

i get nothing but a js error on the intro page when it tried to load in IE6

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 01-09-2003 05:01

Same here. Something wasn't defined. Some array element. Two letter variable name. Can't remember. Sorry. IE6 winxp.

Scott
Bipolar (III) Inmate

From: schillmania.com
Insane since: Jul 2002

posted posted 01-09-2003 05:17

Uh-oh, I hate rogue JS errors - I have IE 6 and XP on my primary machine, and I'm not getting any script errors. Are there any specific details, line numbers or messages etc.? .. Thanks in advance.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 01-09-2003 05:19

Hint: make the text in the "System Message" box selectable so that it's easier for people to report errors.

IN[...].O is null or not an object
line 2769

reitsma
Maniac (V) Mad Scientist

From: the bigger bedroom
Insane since: Oct 2000

posted posted 01-09-2003 05:25

line 193, char 37, object does not support this property or method.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 01-09-2003 05:28

Hmm, it seems that if I hit "OK", the game wont work (the ball doesn't move), but if i hit "hide" it does work.

It has some collision detection issues.

Scott
Bipolar (III) Inmate

From: schillmania.com
Insane since: Jul 2002

posted posted 01-09-2003 05:47

Thanks for the tips..

The game starts to break down after an error, depending on what the error was (it's usually recoverable if minor.) Obviously I've got some more testing to do!

the lN[] - related error involves the level Names array, it's possible I have an out-of-bounds logic error causing that one (ie. an index greater than the size of the array, therefore undefined etc.) .. Looking into it.

The "startup" errors are likely because Flash (used for the audio "sonification", see earlier posts above) could not start for whatever reason (security restrictions, not installed and couldn't download etc.). I will work in a fix for this (ie. no audio - it's currently a requirement pretty much.)

It annoys me that all the machines I've tested the game on so far have worked 100% (and I fixed any and all bugs I found). But, I guess that's part of what it's all about.. getting code to work across many different types of platforms and versions of software!


mahjqa
Maniac (V) Mad Scientist

From: The Demented Side of the Fence
Insane since: Aug 2000

posted posted 01-09-2003 13:20

At first I'd like to say that you've got a grerat game here, with really nice graphics. (most coders don't seem to know much about style, and most designers aren't very good at coding, but you've got both nailed pretty nicely)

Something I've always wondered about when playing arkanoid-like games; why is it that the ball seems to be traveling faster when it bounces off sideways instead of to the top?

I supposed the games are coded with a vertical speed component (the speed the ball has to go to the top and back) and a horizontal speed component for traveling sideways, dependant on where the ball hits the paddle.

The result is that when the ball bounces sideways, the speed is much higher, since the vertical speed remains the same, and the horizontal speed is added to that.

Is this done intentional, or would it be a good idea to limit the horizontal speed? (with for example a sinus or cosinus calculation)

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 01-09-2003 21:23

I just played it and I will say I really appreciate you taking the time to code it well *and* make it look real nice. It more than doubles the time to finish a project but does it ever pay off. Excellent work!!!

. . : slicePuzzle

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 01-09-2003 22:24

This is very sweet, thanks for sharing! I love the whole idea of Javascript games, I'm hoping to have time to spend on my next project (also, game, heh.) Great work! Also bookmarked. =)

Your pal, -doc-

Scott
Bipolar (III) Inmate

From: schillmania.com
Insane since: Jul 2002

posted posted 01-12-2003 20:06

The Doc himself! ..

I just wanted to say you and your site were what got me hooked on DHTML in the first place, around 1995-96 or so. I'm honored to now hear your compliments on my work! Your site and work have been an inspiration to me as you always took a unique approach to Web and interface design, the whole time nicely integrating funky design with DHTML (and being cross-browser/platform also). The coffee-drinking/smoking and the "flaming doughnuts" were some of my favorites.

Pardon the rant, but I needed to vent - DHTML has become my "thing", it's what I do, and it's also my job (Web Developer for Mercedes Benz, mbusa.com). So thanks, and keep doing what you're doing - it's well done!



HZR
Bipolar (III) Inmate

From: Cold Sweden
Insane since: Jul 2002

posted posted 01-12-2003 21:07

Wow, great work. Remember that game - had it on my old computer
The only thing missing from that game was some small "animals" or something bouncing around at the top of the screen but I don't think they made anything and that's not at all important.
Great site too!


Nimraw
Paranoid (IV) Inmate

From: Styx
Insane since: Sep 2000

posted posted 01-12-2003 22:30

Amazing game, Scott!

However, I found a bug you might want to address.

When you get the laser and are happily firing away, there's something off in the x-axis boundries.
If you in the heat of the game drag the pointer to the left or right of the playing field (having the bat at either wall that is) the laser shots appear where your pointer is (outside the playing area).

Not that it will keep me from gaming, but anyhow

« BackwardsOnwards »

Show Forum Drop Down Menu