Binding C++ and V8 Javascript from Google

  • Binding C++ and V8 Javascript from Google underscorediscovery

    The examples are quite challenging to grasp if you are still getting your head around other things, so the simplest example would be great.

    Is there a simpler example?

  • Some links :

    1) A series of tutorials i wrote :

    2) CProxyV8 extends on the point/line samples by using their binding code

    3) v8Juice is also a binding system for v8, has some simpler examples

    4) Find other v8 projects and have a look inside their code (if possible)

    5) Ask on

    6) Ask on the v8 channel on iRC, freenode server

  • I've been slowly working on a pygame alternative based on V8.

    Although the project is stalled at the moment, the code is still up on Github.

    Have a look at the bindings files and jsgame.cpp for some examples. Particularly, JSGame::initialize().

c++ javascript scripting
Related questions and answers
  • if a Vertex looks like this: struct vertex { vec3 point; vertex [] connected; }; Can I tell if this makes a solid shape with no holes? (e.g a sphere or a cube, NOT a sphere with a side missing for example) (if i can see the back of a face from outside of the shape then it is not solid)

  • I'm creating a component-based game object system. Some tips: GameObject is simply a list of Components. There are GameSubsystems. For example, rendering, physics etc. Each GameSubsystem contains... a decision which Components to register (and how to organize them). For example, GameSubsystemRender can register Renderable Components. pro. Components know nothing about how they are used. Low coupling. A. We can add new GameSubsystem. For example, let's add GameSubsystemTitles that registers all ComponentTitle and guarantees that every title is unique and provides interface to quering objects

  • Irrlicht uses namespaces, a C++ feature not available in Objective-C: /* In the Irrlicht Engine, everything can be found in the namespace 'irr'. So if you want to use a class of the engine, you have to write irr:: before the name of the class. For example to use the IrrlichtDevice write: irr::IrrlichtDevice. To get rid of the irr:: in front of the name of every class, we tell the compiler that we use that namespace from now on, and we will not have to write irr:: anymore. */ using namespace irr; How can I still use Objecive-C with Irrlicht? Thanks.

  • Can you recommend a scripting language which allows me to easily parse "one-liner" types of scripts (they're just commands, really)? For example, a C/C++ function which simply sets the value of a 2-dimensional vector (position, for example): void SetVector(Vector2 &vector, float x, float y) { vector.x = x; vector.y = y; } And in the scripting language, the entire script should be able to just be one line long. For example, this would be a script to set the components of vector "a" to 123.0f and 456.0f (x and y) (syntax of the language doesn't really matter, just as an example

  • I'm creating an FPS game. I'm writing my own game engine. So far all the backend stuff is going great. I'd like to support md2 as the native file format for 3D Objects, but I also want to use skeletal meshes. Does anyone know if the md2 file format supports skeletal meshes? In-case you need to know, I'm going to use blender as my Mesh creation tool and C++ as my programming language... Thanks For got to mention, the engine is based on OpenGL... Alright, for anyone who is reading this, I just found the Doom 3 md5 specifications ( It gives

  • that it needs. For example, IPhysics, IRenderable, IWeapon, etc. There are a few cases where I'm uncertain how to obtain a specific interface from another. For example. A Gun might inherit from IWeapon, IPhysics, and IRenderable. I then also have a player which inherits from IPlayer, IPhysics, and IRenderable. I need a way so that, when Player and Gun collide, if Player is not currently wielding a weapon, he should be able to wield the gun and hold a pointer to the IWeapon of the Gun. Right now, when Box2D detects a collision between 2 fixtures, I use the UserData field to store the IPhysics

  • I'm wondering if there is a simple way to convert 3D coordinates to 2D coordinates. Also, if it's possible, to convert in the reverse direction. I'm using OpenGL(GLUT) in my C++ project. I am also using SFML for the 2D information (sprites text etc.) I found out that I can use gluProject(), but I have no idea how to use this. I'm asking for a simple example of using gluProject() or another example to convert 3D coordinates (such as from the player) to 2D coordinates. If I can't get the simple process I'm confident that I can figure out the rest.

  • When it comes to mobile game development on iOS and Android NDK, some developers write their own C++ containers, while others claim that STL is more than adequate for mobile game development (For example, the author of iPhone 3D Programming uses STL rather than Objective-C in his examples. His defense is that STL is no slower than Objective-C). Then there are also mobile developers who abandon C++ entirely and develop games entirely (or mostly) in the C language (C89/C90). What are the benefits and drawbacks of each approach?

  • I would like to create some level of abstraction above math in my code. I mean I don't want to be dependant on the implementation of math operations or even on class names, which are provided by some math library. I will show you a simple example. Let's assume that we have 2 math libraries. Let's consider 3D-vector classes: Library A has 3D-vector class as "Vector3D" and its method "Subtract". Library B has 3D-vector class as "vector3" and its method "subtr". Now I want to be able to swtich between these 2 different implementations, but without changing any line of code. For, instance I

Data information