Topic: 3D TOMB II : a DOOM-like in 4k of JavaScript. Pages that link to <a href="https://ozoneasylum.com/backlink?for=29323" title="Pages that link to Topic: 3D TOMB II : a DOOM-like in 4k of JavaScript." rel="nofollow" >Topic: 3D TOMB II : a DOOM-like in 4k of JavaScript.\

 
Author Thread
poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

IP logged posted posted 07-01-2007 23:32 Edit Quote

The time has come to, finally, release 3D TOMB II, the DOOM-like in 4k of JavaScript I initially made for the5k 2004.


The whole game now weighs 4003 bytes, all files included. The controls are X,C to strafe, SPACE to fire, the arrows to move around. And here is a downsized screenshot:




/!\ Due to a bug in Safari and Gecko's handling of the zIndex, the game doesn't work as expected in Safari, FireFox and co. But it works like a charm, on a semi-recent computer, in IE and Opera.


Hope you'll enjoy it.

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

IP logged posted posted 07-01-2007 23:49 Edit Quote

Amazing .
Good work, as always, poi!

Guess the graphics are so block like due to the filesize limit?
Is there any way to make turning quicker? I get eaten by something behind my back and it takes forever to turn around .

So long,

->Tyberius Prime

White Hawk
Maniac (V) Inmate

From: zero divided.
Insane since: May 2004

IP logged posted posted 07-02-2007 12:51 Edit Quote

I'm always impressed by your little projects, Poi, and this one is no exception.

I think you should rename it to "The Blocky Horror Show" though!

Blaise
Paranoid (IV) Inmate

From: London
Insane since: Jun 2003

IP logged posted posted 07-02-2007 14:38 Edit Quote

Brilliant!

NoJive
Maniac (V) Inmate

From: The Land of one Headlight on.
Insane since: May 2001

IP logged posted posted 07-03-2007 00:41 Edit Quote

Featuring Dr. Blockenturner:

"First a roll to the left....
Then a roll to the right.
Make it stand up straight
Then drop it right ihhhhhin.........n


Let's do the......

again!


ooooops... never mind. *o*

(Edited by NoJive on 07-03-2007 00:44)

reisio
Paranoid (IV) Inmate

From: Florida
Insane since: Mar 2005

IP logged posted posted 07-03-2007 03:54 Edit Quote
quote:
poi said:

Due to a bug in Safari and Gecko's handling of the zIndex, the game doesn't work as expected in Safari, FireFox


What bug? Firebug reports a syntax error and something like 'K is undefined' when you hit keys.

zavaboy
Paranoid (IV) Inmate

From: f(x)
Insane since: Jun 2004

IP logged posted posted 07-03-2007 04:03 Edit Quote

2 things I noticed:
My HP goes down even though there are no bad guys around.
Go to a corner and look back into the room, fun stuff.

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

IP logged posted posted 07-03-2007 08:54 Edit Quote

Thanks!


Tyberius Prime: Nothing bite you in the back. The enemies are a bunch of gentlemen, they don't attack intruders in the back. Honest. As for the speed of the turn, I'll look into that. It's easy to tweak, but I have to check how that effects the gameplay.

reisio: the 'K is undefined' thing happen when you press a key before the script gets unpacked. But that's not an issue. The real problem is/was that FF's rendering engine don't process Float zIndex. See below.

zavaboy: there's not much I can do about the look back into the room thing. As for the other pb, in which browser was that ?



I just found what was wrong with the zIndex. The spec says a z-index is an Integer*. IE and Opera are too kind to web developers here and allow float values. Grr, I'm so gonna file a bug when I arrive at work! To my defense I didn't investigate the issue thoroughly as Gecko was dead slow anyway. That doesn't hinder the fact that I hate doing such n00b mistakes

3D TOMB II will be updated soon and now seems to work correctly, although still slowly, in FF.


*: But again, the CSS spec doesn't specify what to do when given a Float : should it round it, floor it, ceil it, use the default/inherited value ? what's the expected behavior ? Stupid loosy spec.



(Edited by poi on 07-03-2007 09:12)

zavaboy
Paranoid (IV) Inmate

From: f(x)
Insane since: Jun 2004

IP logged posted posted 07-03-2007 10:40 Edit Quote

I was using IE7, but apparently I didn't see the mummy half behind the wall and I didn't know they had guns too.

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

IP logged posted posted 07-03-2007 11:08 Edit Quote

They are mounted with freaking lasers that make the screen go red when they shoot you

Got it working in FF, but it's 6 bytes bigger. Gotta squeeze'em.

Suho1004
Maniac (V) Mad Librarian

From: Seoul, Korea
Insane since: Apr 2002

IP logged posted posted 07-03-2007 14:30 Edit Quote

Zombies with lasers? Kind of goes against all zombie lore I've ever heard, but that certainly would explain things.

Once again, amazing stuff in such a small space.


___________________________
Suho: www.liminality.org | Cell 270 | Sig Rotator | the Fellowship of Sup

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

IP logged posted posted 07-03-2007 16:01 Edit Quote

Done. Same size and now works correctly, although still slowly, in FireFox.

Suho1004: Thanks. They're not exactly zombies. They are mummies, and by 'freaking lasers', I meant they have evil eyes. Literally. They stare at you and Bam!

Suho1004
Maniac (V) Mad Librarian

From: Seoul, Korea
Insane since: Apr 2002

IP logged posted posted 07-04-2007 16:42 Edit Quote

Doh! It even says "mummies" right in the title! And despite the blockiness you can see their wrappings! I don't know why I was thinking zombies.

Evil eyes... that's a good one.


___________________________
Suho: www.liminality.org | Cell 270 | Sig Rotator | the Fellowship of Sup

White Hawk
Maniac (V) Inmate

From: zero divided.
Insane since: May 2004

IP logged posted posted 07-04-2007 19:36 Edit Quote

What's the difference between mummies and zombies anyway... aside from fashion? Surely, mummies are just zombies who are a little older?

reisio
Paranoid (IV) Inmate

From: Florida
Insane since: Mar 2005

IP logged posted posted 07-04-2007 21:02 Edit Quote
quote:
poi said:

The spec says a z-index is an Integer*. IE and Opera are too kind to web developers here and allow float values. Grr, I'm so gonna file a bug when I arrive at work! To my defense I didn't investigate the issue thoroughly as Gecko was dead slow anyway.



Could you be more specific? Maybe we can find a workaround. (I just don't understand what you're describing yet)

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

IP logged posted posted 07-05-2007 00:18 Edit Quote

reisio: Thanks for the offer. I already fixed my abuse of the z-index.

The issue was that the CSS 2.1 specification of z-index says it must be either auto, inherit, or an integer value. It doesn't specify what to do when given an "invalid" value such as a string, a length ( a float followed by a unit, e.g. em, ex, pt, ... ), a float ...

In 3D TOMB II, when I compute the size and distance of the entities ( items and creatures ), I get a float. I was using this value as is to set the z-index of the entities because it's always worked fine in IE and Opera ( the only browsers were the game is really playable anyway ). These two seem to round the float value. But Firefox and Safari are more strict here. All I had to do to fix the issue was to cast the float to an integer, and tweak the code a bit to make sure the compressed size remains the same so I don't have to edit the FAQ and other pages mentionning the file size



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu