Author Topic: [Halloween]: Endless Graveyard  (Read 7905 times)

0 Members and 1 Guest are viewing this topic.

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
[Halloween]: Endless Graveyard
« on: October 22, 2007 »
This is my Endless Graveyard demo. It is in 25% of the resolution I wanted, and still it runs slowly. Maybe someone with a fast machine will see it run very quickly.

It is a paralax scroller, made in HTML and JavaScript. No music - enjoy!

[edit] I just tried it on my works machine and it runs too fast, so I have slowed it down. I'll redo the full-size version and see if that runs at a decent speed[/edit]

[edit] I have now added the full size version, for those with machines powerful enough to view it. [/edit]
« Last Edit: October 23, 2007 by combatking0 »
You are our 9001st visitor.
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: [Halloween]: Endless Graveyard
« Reply #1 on: October 22, 2007 »
Runs fine here. Nice work ck0! First Halloween entry !!! yeah ...
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: [Halloween]: Endless Graveyard
« Reply #2 on: October 22, 2007 »
Dude, given my desperate(ly bad) effort for the javascript comp, this deserves some Karma.  Making anything happen in JScript is too much work, so this is excellent.  Good stuff!
Jim
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: [Halloween]: Endless Graveyard
« Reply #3 on: October 22, 2007 »
Really nice to have something that rus in a browser and it works on Firefox too :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: [Halloween]: Endless Graveyard
« Reply #4 on: October 22, 2007 »
Works fine here, I'm using Firefox.

I only miss some spooky sound effects  ;)
Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: [Halloween]: Endless Graveyard
« Reply #5 on: October 22, 2007 »
Nice one CK0, Well I dont know anything bout Java but if Jim is saying that its difficult to get something up and runnin then I respect the time and effort that you have put into this entry

Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [Halloween]: Endless Graveyard
« Reply #6 on: October 23, 2007 »
Thanks everyone!

Hopefully the edit above should be the final version.

Most of the time went into the artwork, but there was a lot of tweeking to be done with the timing.
You are our 9001st visitor.
Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: [Halloween]: Endless Graveyard
« Reply #7 on: October 23, 2007 »
well done ck0, I agree with Jim, getting stuff up and running in JS - not easy at all. The scrolling effect is neat.
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: [Halloween]: Endless Graveyard
« Reply #8 on: October 23, 2007 »
i really think this is great, good one ck0!
Challenge Trophies Won:

Offline p01

  • Atari ST
  • ***
  • Posts: 158
  • Karma: 51
    • View Profile
    • www.p01.org
Re: [Halloween]: Endless Graveyard
« Reply #9 on: October 25, 2007 »
rain_storm: This is JavaScript, not Java. These are completely different beasts.

combatking0: You're using foo.innerHTML = text.substr( start, end );. Seriously ? Please, pretty please check the {JS} Scrollers thread.

Quote
[edit] I just tried it on my works machine and it runs too fast, so I have slowed it down. I'll redo the full-size version and see if that runs at a decent speed[/edit]

[edit] I have now added the full size version, for those with machines powerful enough to view it. [/edit]

Animations MUST check the current time to make sure they run at the same speed on anywhere.

In your case it could be as simple as:
Code: [Select]
$ = document.getElementById
function main()
{
var pps = 50
,pos = new Date().getTime()/1000*pps;

$('bgnd1').style.left = -( Math.round( pos   )%320 )     +'px';
$('bgnd2').style.left = -( Math.round( pos*2 )%320 )     +'px';
$('fgnd' ).style.left = -( Math.round( pos*3 )%320 )     +'px';
$('wtch' ).style.left = (( Math.round( pos*2 )%320 )-18) +'px';

$('txt'  ).style.left = -( Math.round( pos )%$('txt').offsetWidth ) +'px';
}

Hope that helps,

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [Halloween]: Endless Graveyard
« Reply #10 on: October 25, 2007 »
Cheers p01, I'll refer to this in future when developing a text scroller.
You are our 9001st visitor.
Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: [Halloween]: Endless Graveyard
« Reply #11 on: October 25, 2007 »
Oops my bad, I thought Java and Javascript were just two ways of refering to the same language but now I know better  :whack:

Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [Halloween]: Endless Graveyard
« Reply #12 on: October 26, 2007 »
The people hosting my JavaScript Game Programming Course make that same mistake every year!
You are our 9001st visitor.
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: [Halloween]: Endless Graveyard
« Reply #13 on: October 26, 2007 »
Some good Karma for p01 for the Javascript tip :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Tetra

  • DBF Aficionado
  • ******
  • Posts: 2532
  • Karma: 83
  • Pirate Monkey!
    • View Profile
Re: [Halloween]: Endless Graveyard
« Reply #14 on: October 28, 2007 »
As limited as JS is you always seem to manage to make something pretty cool with it :)
Challenge Trophies Won:

Offline p01

  • Atari ST
  • ***
  • Posts: 158
  • Karma: 51
    • View Profile
    • www.p01.org
Re: [Halloween]: Endless Graveyard
« Reply #15 on: October 28, 2007 »
JavaScript is not that limited. There's a couple of JavaScript demos and intros with classic effects ( vector balls, scroller, twister, fire, water, bump, metaball, voxel landscape, fractal, starfield, ... ) and 3D effects ( raycasting, flat, gouraud, I even did some (low-res perspective correct mapping in gouraud )

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [Halloween]: Endless Graveyard
« Reply #16 on: October 29, 2007 »
Wow, I never knew JS had that much graphic capability.

Is all of this in the W3C specification, or a special browser?
You are our 9001st visitor.
Challenge Trophies Won:

Offline p01

  • Atari ST
  • ***
  • Posts: 158
  • Karma: 51
    • View Profile
    • www.p01.org
Re: [Halloween]: Endless Graveyard
« Reply #17 on: October 29, 2007 »
all done in standard compliant browsers using standards as old as 10yo