• Welcome to Dark Bit Factory & Gravity.
 

[Halloween]: Endless Graveyard

Started by combatking0, October 22, 2007

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

combatking0

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]
You are our 9001st visitor.
Challenge Trophies Won:

benny!

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:

Jim

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:

Shockwave

Really nice to have something that rus in a browser and it works on Firefox too :)
Shockwave ^ Codigos
Challenge Trophies Won:

Rbz

Works fine here, I'm using Firefox.

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

rain_storm

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:

combatking0

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:

taj

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:

ninogenio

i really think this is great, good one ck0!
Challenge Trophies Won:

p01

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:
$ = 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,

combatking0

Cheers p01, I'll refer to this in future when developing a text scroller.
You are our 9001st visitor.
Challenge Trophies Won:

rain_storm

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:

combatking0

The people hosting my JavaScript Game Programming Course make that same mistake every year!
You are our 9001st visitor.
Challenge Trophies Won:

Shockwave

Some good Karma for p01 for the Javascript tip :)
Shockwave ^ Codigos
Challenge Trophies Won:

Tetra

As limited as JS is you always seem to manage to make something pretty cool with it :)
Challenge Trophies Won:

p01

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 )

combatking0

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:

p01

all done in standard compliant browsers using standards as old as 10yo