Closed Thread Icon

Topic awaiting preservation: November 20lines Javascript Contest - Arcade Scrollers - Comments (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=23944" title="Pages that link to Topic awaiting preservation: November 20lines Javascript Contest - Arcade Scrollers - Comments (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: November 20lines Javascript Contest - Arcade Scrollers - Comments <span class="small">(Page 1 of 1)</span>\

 
TwoD
Nervous Wreck (II) Inmate

From: Sweden
Insane since: Aug 2004

posted posted 11-06-2004 12:06

This month's theme is: Arcade Scrolling Games.

Everybody has atleast once played the old classic arcade games where you take on the role as a
space captain commanding your ship through a two-dimensional scrolling universe.
Time to make your own action filled scroller, but this time in 20 lines.
To make it a bit easier for those w/o graphic skills (like me),
it doesn't have to be a space theme, and you also choose the scrolling direction.

BUT, you can't scroll just horizontally or vertically!

The rest is up you you.


quote:
a code monkey said once:
As usual, the main rule is to make your script in 20 lines of (effective) code.
Comas shouldn't be used to execute several instructions on the same line
See the code sample below to illustrate the basic rules :



code:
--------------------------------------------------------------------------------
<script type="text/javascript">

/* */ document.body.onclick = function()
/* */ {
/* 01 */ val = prompt( 'enter a number' );
/* 02 */ for( i=0; i<10; i++ )
/* */ {
/* 03 */ alert( stupidFunction( val, i ) )
/* */ }
/* */ }

/* */ function stupidFunction( a, b )
/* */ {
/* 04 */ return a>b?a:b; // I said it was a stupid function
/* */ }

</script>
--------------------------------------------------------------------------------



The document.body.onclick = function() does not count as a line as it's not some effective code and the function call could be put in the BODY tag ( or anyother HTML tag ).
The declaration of the stupidFunction() does not count either for the same reasons.
The coma in the line /* 03 */ is ok, since it simply separates the parameters of a function.



The comments belong in this thread, the entries in thread November 20lines Javascript Contest - Arcade Scrollers - Entries

/TwoD

(Edited by TwoD on 11-06-2004 15:08)

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 11-06-2004 12:53

Great theme!
I already have some ideas

UnknownComic
Maniac (V) Inmate

From: 2 steps away from a los angeles curb
Insane since: Nov 2003

posted posted 11-08-2004 07:05

WoW! Even though this kinda stuff makes me feel stupid... It's amazing what the people here do.

Thanks for putting in the efforts guys. Errr..., and gals.

______________
Is This Thing On?

Webbing; the stuff that sticks to your face.

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 11-08-2004 07:40

I've decided to not let another 20liner pass without contributing.
Shadow of the Beast was a good candidate with its interresting parallax scrollers. So here it goes

Shadow of the Beast


Featuring, 12 levels of parallax. [edit] And an alternate stylesheet for a zoom x2 [/edit]

And to go with the game topic, let's see the sig I did for the November 2004 Sig Contest - **GAMES**



(Edited by poi on 11-08-2004 07:40)

(Edited by poi on 11-08-2004 09:48)

Blaise
Bipolar (III) Inmate

From: London
Insane since: Jun 2003

posted posted 11-08-2004 10:32

Very nice Poi, very nice! Look forward to seeing how this contest progresses!
er.... anyone ever play Crackdown?

TwoD
Nervous Wreck (II) Inmate

From: Sweden
Insane since: Aug 2004

posted posted 11-08-2004 14:44

Nice start Poi!

Hmm, I seem to have messed up the Entries thread when I edited it, could a moderator fix that please?

/TwoD

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 11-17-2004 21:09

*bump*

Thank you.
I've added an über simple keyboard control.

TwoD
Nervous Wreck (II) Inmate

From: Sweden
Insane since: Aug 2004

posted posted 11-18-2004 07:47

It works really good Poi, the character walks a bit slow but the scrolling looks great!
Maybe I should clearify the rules a bit and say that you don't have to have parallax scrolling in your entry. Anything that scrolls in two or more diretions goes!

/TwoD

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 11-18-2004 10:24

Thanks for the input.
Yep, doing parallax may seem hard at first. But it's not. Look at the code of my entry.

But there's a lot of thing to do with little scrollers.

Actually I re-read the rules, and noticed that the entries MUST scroll both horizontally and vertically. I've got to do something, because my SOTB "remake" scrolls only on the X axis at the moment.



(Edited by poi on 11-18-2004 10:32)

Blaise
Bipolar (III) Inmate

From: London
Insane since: Jun 2003

posted posted 11-18-2004 10:42

Nice work Poi, looking great!

TwoD
Nervous Wreck (II) Inmate

From: Sweden
Insane since: Aug 2004

posted posted 11-19-2004 07:53

That is correct, maybe you could make it rain or somehting and then scroll the 'rain layer' differently depenting on wind? That would qualify since the rain is part of the background...

Anyway, I'm gathering ideas for my own entry and the above came up amongst other things. Just have to decide which way to go soon so there's still time left to code the thing lol.

/TwoD

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 11-19-2004 12:42

Thank you Blaise. Don't be shy, code something.

TwoD: I've added the ability to jump. It result in the beast, moving up ( wow! ) and all the parralax moving accordingly. Is it ok ? or you'd prefer to always see the several scrollers at the same time ?

TwoD
Nervous Wreck (II) Inmate

From: Sweden
Insane since: Aug 2004

posted posted 11-19-2004 22:23

Poi: Temporary multi-directional scrolling (jumping in this case) is ok, if you make the ability to jump critical for your survival in the game. Otherwise it would just be eye-candy. Since your arcade scroller takes place on the ground and is seen from the side there are not many other options I guess.
Btw, the beast freezes for a while after turning if you turn around too quick, that's a bit annoying but otherwise it looks awsome! Did you make the graphics yourself?

I realised that the rain idea I had above would not really qualify since the rain would move independantly from the background. It would not critical for the scroller and is therefor counted as an additional effect.

Anyway, more than half the month has passed and we only have one entry so far! Come on people, code something!
It doesn't have to be anything spectacular as long as it includes multi-directional scrolling. Old classics are great for inspiration!

I'm going to give a shot at a crazy space scroller myself, don't have any code yet but it's on the way.

/TwoD

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 11-19-2004 23:51

Yep, I planed to use the jump ability to kill/avoid some spider-like enemies.
The freeze after turning happen when both arrows are down at the same time and one is released. It'll be fixed in the next *bump*.

Regarding the graphics, nope, I've borrowed them on the net. They come from the Atari version of Shadow Of The Beast. If I had the time I'd have done some graphics myself. Well I've mad a bit of copy/paste and refine to create the bottom of the fence and some rocks . On the other hand Shadow Of The Beast has a strong identity, is interresting technically wise and matches the topic of this month.

Speaking of old classics, a lot of them can be a source of inspiration :

  • Super Cars
  • Super Mario Bros
  • Marble Madness
  • Ghosts'n Goblins
  • ...



poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 11-20-2004 23:25

Nice entry InI. I especially like the shading trick.
Have you noticed that there's a problem of zIndex with the DIVs block# in FireFox.

I can't wait to see the little "frog"

UnknownComic
Maniac (V) Inmate

From: 2 steps away from a los angeles curb
Insane since: Nov 2003

posted posted 11-21-2004 02:32

Nice work guys!

[edit] sheesh... three words and STILL! a typo[/edit]

______________
Is This Thing On?

Webbing; the stuff that sticks to your face.

(Edited by UnknownComic on 11-21-2004 02:33)

Iron Wallaby
Paranoid (IV) Inmate

From: USA
Insane since: May 2004

posted posted 11-21-2004 05:17

Whoops, sorry poi... the names of these two threads and the fact that they're next to each other always mixes me up.

InI: like the fix.

"Any sufficiently advanced technology is indistinguishable from magic." -- Arthur C. Clarke
"Any sufficiently arcane magic is indistinguishable from technology." -- P. David Lebling

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 11-21-2004 06:15

Iron Wallaby: Well, to apologize, you'll have to submit an entry

TwoD
Nervous Wreck (II) Inmate

From: Sweden
Insane since: Aug 2004

posted posted 11-21-2004 15:29

Cool entry Ini, I haven't played the original but I bet it's going to be challenging.
Still working on my md-scroller, will probably be a last-minute entry again

/TwoD

Blaise
Bipolar (III) Inmate

From: London
Insane since: Jun 2003

posted posted 11-22-2004 12:40

Yeah I remember that game Nebulus, it used to annoy the hell out of me! and made me dizzy

Your latest version seems to run much much better in Firefox than IE6!

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 11-22-2004 13:42

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.

TwoD
Nervous Wreck (II) Inmate

From: Sweden
Insane since: Aug 2004

posted posted 11-22-2004 19:51

The version without keyboardcontrol was really fast in my IE6, I wonder why the eventhandler slowed it down so much...

/TwoD

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 11-23-2004 08:40

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.

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 11-23-2004 13:15

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.

TwoD
Nervous Wreck (II) Inmate

From: Sweden
Insane since: Aug 2004

posted posted 11-23-2004 14:00

InI: I got something simila when testing the Flocking AI for the Aquarium.
If I set an attribute using element.setAttribute('a') I could not read it using element.a
and if I used element.a=123 I could not read that using element.getAttribute('a').
Seemed as if they were two separate attributes even though IE had no problems with that.

Was using element.setAttribute('a') in the code and entered the alert(element.a) in the address bar when debugging and noticed that it never changed even though the fish moved. This also produced some weird behaviour by the AI.

Maybe it's the same thing you get when checking the offsets?

/TwoD

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 11-23-2004 14:16

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.

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 11-23-2004 14:24

InI: In FF I've noticed that for certain positions, there's a problem of clipping in your Nebulus remake. Visually it looks like some vertical stripes are missing and reveal the background. The values reported in the status bar were : 2, -110, -238, -126 ... I don't really know if there's more.

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 11-23-2004 14:33

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.

BillyRayPreachersSon
Bipolar (III) Inmate

From: London
Insane since: Jul 2004

posted posted 11-28-2004 11:34
quote:
InI said:

And in case you had missed the original Nebulus, here is a decent remake in Flash:http://www.addink.net/nebulus/



It looks nice, but it's not exactly playable... The fire button and jump button are the same key (space), so it's hard to tell which will happen when you press it... And when you do fire at enemies, they seemingly never die, just killing you instead.

Or is that just me not knowing about the game?

Dan

TwoD
Nervous Wreck (II) Inmate

From: Sweden
Insane since: Aug 2004

posted posted 11-28-2004 20:43

I'm having some problems with my entry...

I'm trying to make an inverted version of Astriods where the player stands still and the space scrolls around him.
The astroids should be initialized with a random direction of movement relative to the player and keep that direction when the player turns.
I figured out how to make the astroids circle around the player as he turns the ship but when I try to recalculate their new heading relative to
the screen something goes wrong...
My initial thought was to "turn" the astroids in the oppsite direction of the player's turn to preserv their relative directions of motion.
This went terribly wrong though, and to make it worse, all astroids end up going in the same direction...

I reduced the number of astroids to 1 for easier debugging and I'm wondering if someone could help me out here?
Btw, I'm doing the angular calculations in radians so I won't have to convert the numbers all the time...

http://www.geocities.com/therulers3000/entries/Entry.htm

/TwoD

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 11-29-2004 08:17

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.

TwoD
Nervous Wreck (II) Inmate

From: Sweden
Insane since: Aug 2004

posted posted 11-29-2004 14:02

Yes, that's what I'm trying to do.
Hmm, why didn't I think of treating the speed/direction as a vector with start and end points... thanks lol.

It's not much time left before this month is over but I hope I can complete my entry in time. (School work will have to wait, this is more fun and I learn three times more math this way lol)

/TwoD

Scott
Paranoid (IV) Inmate

From: schillmania.com
Insane since: Jul 2002

posted posted 11-29-2004 20:58

Very impressive work, Poi in particular - nicely done.

I was browsing some other sites a few days ago and thought, "that looks really familiar" (the Shadow Of The Beast stuff) - this guy had a similar idea.

http://www.premiumwanadoo.com/dhteumeuleu/dhtml/Parallax.html

(The actual site root is http://www.dhteumeuleu.com/ and while a bit chunky and IE-only, some neat JS tricks are seen.)

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 11-29-2004 23:15

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.

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 11-30-2004 00:35

Scott: Thanks. Actually Shadow Of The Beast is extremely famous, and has a strong identity. That's why it's often been subject of remakes and homages. Lately I've been coding a bit on Atari, in assembly 68000, and saw Shazz/MJJ Prod a forum, which reminded me that he had also done a SOTB thing in DHTML Optimisations questions....

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 11-30-2004 21:16

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.

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 12-01-2004 00:08

I've got 00:08 at my clock, but here comes the last *bump*

- crawling enemy
- power bar
- power potion

« BackwardsOnwards »

Show Forum Drop Down Menu