Firefox 3D Canvas FPS Engine
axonis writes "Benjamin Joffe has developed Canvascape - "3D Walker", a simple javascript browser based 3D first person game engine that shows off the capabilities of the Canvas tag found in Firefox, Safari and Opera. " Don't expect much except a proof of concept ;)
FYI, Firefox only works from 1.5 onwards (Gecko 1.8), and Opera 8.5 doesn't work (anyone testing 9.0 could tell if it works or not?)
"The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
May I point out that Canvas tag is only supported in Firefox 1.5, and not the current stable release 1.0.7.
In case of /.ing, break mirrorc anvascape/
http://www.abrahamjoffe.com.au.nyud.net:8090/ben/
Oddly enough, I get an error message for FF 1.07 but not IE6
(Yea, I know, use FF 1.5, it says so right in the error message)
The 2nd to last line of text;
Alot of people have suggested that I make the gun shoot or other equally redundant points. I only made this a couple of days ago so all in good time.
Kinda takes the shoot out of First Person Shooter
[Fuck Beta]
o0t!
This game is being developed but doesn't have much direction at this time, to make a suggestion email me. The gun is copyright by FarCry
And you can expect to be in trouble now that you've been slashdotted (I expect the legal document will come just as you finish putting out the fire your server caused). Even if it was only tempporary, lawyers have funny ways of dealing with copyright infringement. Which is sad, but protected by the law.
Works in Safari on 10.4 However, it really helps show the age of my G3 iBook (4+ years). I get approx 2-3FPS. But it loads really fast! Still, a nice proof of concept. I'll have to check it out on my PC when I go fire up NFS Most Wanted this afternoon.
Be a real patriot: Question authority. Think for yourself. Formulate your own conclusions.
works fine with athlon64 and 2gb ram on firefox1.5
Do you mean someting like this?
If you don't fail at least 90 percent of the time, you're not aiming high enough. (Alan Kay)
It's because Opers's implementation of is at very early stage (JS in Opera is very fast). Since Opera helps to standari[zs]e <canvas> you can expect that they will aim for a pretty decent implementation.
Works on Opera 9.0 preview on Linux
http://en.wikipedia.org/wiki/Fair_dealing
Nice to see Australians know about as much about legal matters as do Americans.
And no, the use of the Far Cry gun isn't fair use.
Works much faster on Camino 1.0 than in Firefox 1.5 or Safari. Smooth enough to "play" on a 1.5GHz G4.
> It would take you months to do that in assembler, and half a day to do it in C.
Imprecise. If considering only a specific platform and no existing libraries, you're even completely wrong: Coding ASM is significantly more time-consuming than coding C, but the difference is 3-5 times "only".
Obviously, with C, you get a higher level of abstraction, therefore more reusability, portability, etc.
> Then the C code would end up faster because compiler optimizations are faster than anything a person could hope to do,
Depends on the platform. Hardly anybody is able to optimize for speed a modern x86 processor "by hand", but RISCs and even some CISCs like the 68000 are another story. I have been programming for years as a hobby on the 68000 processor, and I have seen:
* GCC missing completely obvious CSEs: a global array used about ten times in a row, the compiler won't put its address into a register even if it has many spare ones;
* GCC not using the instruction set possibilities (10-byte code instead of 4-byte code, and that spills one more register; bad code related to local variables on the stack; etc.);
* GCC completely messing up a calling convention that should be more optimized ( saves&restores on a register that isn't even changed);
* etc.
Wonder why a number of not-very-powerful embedded platforms, like calculators, are still partly programmed in ASM...
There may be more appropriate compilers for those processors, but hey, GCC is supposed to be portable, and it has (had, they deprecated some useful things like casts-as-lvalues in GCC 4.0) cool extensions that most other compilers don't have.
> and it would be portable too.
If you use external libraries like the SDL, yes. Otherwise, no, not more than ASM.
I downloaded the latest Opera today for MacOsX, and it doesn't work. The alert clearly says it will only work in Firefox and Safari.
Not quite a standard yet, but on its way to being one: http://www.whatwg.org/specs/web-apps/current-work/ #scs-dynamic
Why not fork?
See: http://www.beaufour.dk/blog-archives/2005/06/canva s_support.html
Although not fully functional.
Why is the story title Firefox 3D canvas when this thing runs on other browsers. (and probably runs in Konquerer too) So it runs in AT LEAST 2 other browsers but the title is Firefox? I have nothing agaist FF Since its my main (99%) browser for Windows, but geez. Fan boy titles for Slashdot articles is getting out of hand. And you all know if the title of this article had been Safari 3d Canvas someone else would have written this and subsituted Safari for FF. Peace. Tip your waitress, I'm hear all week. Goodnight.
OMG Ponies!!! with Glitter!!!! I miss Pink
I'm sure the built in sorts would be much faster, they almost certainly use quick sorts, and I didn't take the time to write a proper quick sort in assembly. What I did do is write two sorts that operate in exactly the same way, an apples to apples comparison.
Bottom line, my register usage makes all the difference.
http://compucatedsolutions.com/asm.htm contains the C++ and assembly sorts, you'll notice they both operate in exactly the same way. I couldn't manage to get it past the lameness filter.
You don't make the poor richer by making the rich poorer. - Winston Churchill
An anonymous coward spews:
One of the longest running jokes in Internet history revolves around VRML... etc.
"Hilarious" and stolen from:
http://www.somethingawful.com/articles.php?a=926
Sailing over the event horizon
Gee thanks guys your gonna kill my server. It is a shock to see how much coverage this game is getting, this is the first 3D environment I have ever coded so it is pleasing to see that I am not the only one enjoying my efforts. When I ran my tests about 80% of the processing power was spent on rendering the trapeziums to the canvas which I have little control over. As far as I can see most of the math was fairly optimal, no obvious problems there. I will probably continue developing this in a few weeks when I am on holidays, probably by that time several people will have coded far more superior ones but I will see... The wedding business is my brother's, I don't have my own server. Here's another little code I made, not quite as interesting though: http://www.random.abrahamjoffe.com.au/public/JavaS cripts/canvas/interpolation.htm