jeromeetienne / threex

Game Extensions for three.js
http://www.threejsgames.com/extensions/
MIT License
335 stars 60 forks source link

Threex reorga #53

Open jeromeetienne opened 10 years ago

jeromeetienne commented 10 years ago
jeromeetienne commented 10 years ago

@erichlof im starting here :)

jeromeetienne commented 10 years ago

modules category

jeromeetienne commented 10 years ago

possible minigame

jeromeetienne commented 10 years ago

particles

jeromeetienne commented 10 years ago

what to do for collision physics

jeromeetienne commented 10 years ago

sound

Likely webaudiox as it provide sound localisation so important in 3d. It is already documented, which cant hurt

jeromeetienne commented 10 years ago

menu and ui with normal DOM

jeromeetienne commented 10 years ago

documentation

jeromeetienne commented 10 years ago

inspiration

jeromeetienne commented 10 years ago

user identification

erichlof commented 10 years ago

possible minigames

spacepong

3dlightcycles

3dartillerywars

All of these games I wrote back in 1998-2000 and I still have the C code for! :) Some may be a bit too ambitious but all of them would show something different about ThreeX. For instance all of them will require:

erichlof commented 10 years ago

Hi Jerome, Sorry I have been absent for a while. I have been in deep working on integrating JigLibjs2 (a light but robust javascript physics engine) with three.min.js . JigLibjs2 supports terrain (or heightfield mesh) collision detection out of the box. I am happy to report that everything seems to work so far, and I have a simple working demo (with a car and some shapes)! I will open up a new repo for this effort. Maybe a future 'THREEx.Physics' plugin could wrap up some of the set-up code?

I also have a mini-game idea to use threex.poolball and threex.laser! :) Stay tuned!

-Erich

jeromeetienne commented 10 years ago

seems greats! i cant wait to hear about your laser pool :)

Sure we should provide extensions of realistic physics. i already started with threex.cannonjs http://jeromeetienne.github.io/threex/#threex.cannonjs

url on the demo ? i tried jiglib2 a while back and i found it buggy.. for sure unable to do car kind of stuff, but i would be delighted to be wrong :)

On Fri, Jan 10, 2014 at 8:02 AM, erichlof notifications@github.com wrote:

Hi Jerome, Sorry I have been absent for a while. I have been in deep working on integrating JigLibjs2 (a light but robust javascript physics engine) with three.min.js . JigLibjs2 supports terrain (or heightfield mesh) collision detection out of the box. I am happy to report that everything seems to work so far, and I have a simple working demo (with a car and some shapes)! I will open up a new repo for this effort. Maybe a future 'THREEx.Physics' plugin could wrap up some of the set-up code?

I also have a mini-game idea to use threex.poolball and threex.laser! :) Stay tuned!

-Erich

— Reply to this email directly or view it on GitHubhttps://github.com/jeromeetienne/threex/issues/53#issuecomment-32006809 .

erichlof commented 10 years ago

Hi, here's the idea for laser-pool, using your THREEx.poolball: First, a little backstory... I am a billiards fan - both American pool, and 3-cushion carom billiards (without pockets). There are already many games such as the Celeris Virtual Pool series, VRCarom, Carom3D and even a recent Google Chrome demo using the webaudio API: http://chromium.googlecode.com/svn/trunk/samples/audio/o3d-webgl-samples/pool.html

Since the classic games and realistic physics have already been done many times (and there is no way to compete with these great implementations), I thought why not do something different with the basic game setting and mechanics? How about we stretch the 2D flat pool-table to a 3D cube?! Of course, with gravity, the balls would all fall down to the bottom of the cube, but...

Setting is in outer-space, maybe aboard a spaceship ( a gameroom, like in StarWars chess ) with 0-gravity, or just floating in outer-space - either way, no gravity! The pool-table is now a 3D cube, and your camera is positioned behind the white cueball. But, with the help of three.js Orbit controls, you can now move your aim anywhere around you! The pockets are still in the corners, although now there are 8 or more pockets, to ease the shot-making in 3D.

Ball collisions and impulse responses are handled through whatever physics engine we can get working. It is already possible with threex.cannonjs sphere objects, but I will see if it's also possible in JigLibJS2 that I have been working on.

Next problem would be friction. In real world mechanics, friction of the table-cloth slows the balls down so you can make the next shot. But in space they just keep bouncing forever, right? Well, here comes THREEx.laser! I was thinking we emit a pulse laser, red or blue, and quickly pulse the ball from the opposite direction that it is traveling. The pulses get faster and faster and slow the ball down to 0. Essentially, friction in Space! Thus, at the end of each shot, the balls just hang there, motionless - kind of cool.

Also, we could use THREEx.laser to aim your cueball, kind of like a laser-sight on a sniper rifle. The laser aim-helper could also bounce off the walls of the cube, showing a possible bank shot opportunity. For easing the math, Three.js added a vector.reflect function to their Vector3 class, at my request almost a year ago.

So far as ball rotational forces go, the space environment pretty much eliminates the need for this functionality, which eases our project somewhat. I guess they could keep spinning in mid-air, but they should eventually stop also, so you can see the great number-texture that Jerome has applied to each poolball. :)

Background can be a skybox of space, or a ship with a 0-G room, and maybe a window out into space. This is sort of the StarWars or StarTrek version of billiards in the future (or in the past with StarWars - haha). :)

Let me know what you think. -Erich

jeromeetienne commented 10 years ago

i love the idea!

i would love to have a reliable physics layer. i watched the demo with the car :)

On Fri, Jan 10, 2014 at 10:12 PM, erichlof notifications@github.com wrote:

Hi, here's the idea for laser-pool, using your THREEx.poolball: First, a little backstory... I am a billiards fan - both American pool, and 3-cushion carom billiards (without pockets). There are already many games such as the Celeris Virtual Pool series, VRCarom, Carom3D and even a recent Google Chrome demo using the webaudio API: http://chromium.googlecode.com/svn/trunk/samples/audio/o3d-webgl-samples/pool.html

Since the classic games and realistic physics have already been done many times (and there is no way to compete with these great implementations), I thought why not do something different with the basic game setting and mechanics? How about we stretch the 2D flat pool-table to a 3D cube?! Of course, with gravity, the balls would all fall down to the bottom of the cube, but...

Setting is in outer-space, maybe aboard a spaceship ( a gameroom, like in StarWars chess ) with 0-gravity, or just floating in outer-space - either way, no gravity! The pool-table is now a 3D cube, and your camera is positioned behind the white cueball. But, with the help of three.js Orbit controls, you can now move your aim anywhere around you! The pockets are still in the corners, although now there are 8 or more pockets, to ease the shot-making in 3D.

Ball collisions and impulse responses are handled through whatever physics engine we can get working. It is already possible with threex.cannonjs sphere objects, but I will see if it's also possible in JigLibJS2 that I have been working on.

Next problem would be friction. In real world mechanics, friction of the table-cloth slows the balls down so you can make the next shot. But in space they just keep bouncing forever, right? Well, here comes THREEx.laser! I was thinking we emit a pulse laser, red or blue, and quickly pulse the ball from the opposite direction that it is traveling. The pulses get faster and faster and slow the ball down to 0. Essentially, friction in Space! Thus, at the end of each shot, the balls just hang there, motionless - kind of cool.

Also, we could use THREEx.laser to aim your cueball, kind of like a laser-sight on a sniper rifle. The laser aim-helper could also bounce of the walls of the cube, showing a possible bank shot opportunity. For easing the math, Three.js added a vector.reflect function to their Vector3 class, at my request almost a year ago.

Background can be a skybox of space, or a ship with a 0-G room, and maybe a window out into space. This is sort of the StarWars or StarTrek version of billiards in the future (or in the past with StarWars - haha). :)

Let me know what you think. -Erich

— Reply to this email directly or view it on GitHubhttps://github.com/jeromeetienne/threex/issues/53#issuecomment-32066632 .