Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Threex reorga #53

Open
jeromeetienne opened this issue Dec 19, 2013 · 15 comments
Open

Threex reorga #53

jeromeetienne opened this issue Dec 19, 2013 · 15 comments

Comments

@jeromeetienne
Copy link
Owner

  • what needs to be done
  • how to document the project
  • which code needs to be written
    • write minigame and put repetitive code in threex module
  • support modern web practices
    • support for bower, require.js, yeoman
    • support them but don't depends on them
    • all optional
  • all independant modules not a big framework
@jeromeetienne
Copy link
Owner Author

@erichlof im starting here :)

@jeromeetienne
Copy link
Owner Author

modules category

  • in order to easily retrieve modules they will be tagged
  • if possible similar modules should have similar api
  • content, posteffect, inputs, tools

@jeromeetienne
Copy link
Owner Author

possible minigame

@jeromeetienne
Copy link
Owner Author

particles

  • good stuff in threex.particles
  • yet to be documented
  • how to expose that at the package level

@jeromeetienne
Copy link
Owner Author

what to do for collision physics

  • full blast one? Cannon.js ? Ammo.js ?
    • maturity of those library ?
    • hpw maintained they are?
  • something simple ala babylon.js?
  • something based on old collision.js from r40
  • when to do that ?
    • can we wait? Is that the most urgent now

@jeromeetienne
Copy link
Owner Author

sound

  • web audio api seems the way to go as it is availble where webgl is available
  • webaudio.js? For the lib ala tquery
  • webaudiox? For the lib ala threex
  • howler.js?

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

@jeromeetienne
Copy link
Owner Author

menu and ui with normal DOM

  • like in marbleTable

@jeromeetienne
Copy link
Owner Author

documentation

@jeromeetienne
Copy link
Owner Author

inspiration

  • be the unity of the Web?
  • babylon js is young but got nice game orientation and nice tutorials
  • recognize what they do well and improve yourself

@jeromeetienne
Copy link
Owner Author

user identification

  • passport.js to link with social network identity

@erichlof
Copy link

possible minigames

spacepong

  • WebAsteroids
    • Would demonstrate third-person camera above the ship, as well as 2D sprite explosions/threex laser effects
      webasteroids
  • 3DLightCycles
    • Tron Lightcycle clone that could demonstrate Jerome's threex.geometricglow effect, like in the Tron movies

3dlightcycles

  • 3DArtilleryWars
    • Would be the most advanced tutorial game showing Cannon ballistic physics engine (if terrain is one day supported)

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:

  • threex transparency (on most games)
  • threex geometric glow (for tron game)
  • threex glow keycolor (possibly for tron game)
  • threex window-resize (all games)
  • threex virtual joystick (all games)
  • threex keyboard state (all games)
  • threex laser (for the space games)
  • threex dynamic texture (for 'scores' and 'lives left' text)
  • threex grass ground (for artillery game)
  • threex cannonjs (for artillery game)
  • threex mountains arena (possibly for artillery game's terrain)
  • threex skymap (for pong game and artillery game)
  • threex depth of field (possibly)
  • threex volumetric spotlight (I have another idea for a game that needs this but is not pictured here)

@erichlof
Copy link

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
Copy link
Owner Author

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 [email protected] 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//issues/53#issuecomment-32006809
.

@erichlof
Copy link

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
Copy link
Owner Author

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 [email protected] 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//issues/53#issuecomment-32066632
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants