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?

  • 1
    \$\begingroup\$ I included V8 into my game some months before. I think the code is quite easy to understand. \$\endgroup\$ – danijar Aug 26 '13 at 7:27

Some links :

1) A series of tutorials i wrote : https://github.com/underscorediscovery/v8-tutorials

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 gamedev.stackexchange.com

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

  • 1
    \$\begingroup\$ You might want to reconsider your choice of grey-on-grey for your blog. The code comments are unreadable and with subpixel hinting on a 1024x768 screen the code itself is also almost unreadable. \$\endgroup\$ – user744 Aug 15 '10 at 17:10
  • \$\begingroup\$ I'll adjust the css for the comments, thanks. Weirdly enough i don't know anyone using 1024x768 ;P Not since i posted has anyone mentioned it being a problem - but thanks for the feedback. I updated the CSS to a blue color. Hope that helps legibility. \$\endgroup\$ – underscorediscovery Aug 15 '10 at 17:15

I think this is the simplest working one I could find (github link). It teaches you how to get V8 up and running and then creates an Alert function in C++ that gets exposed to JavaScript.


  • \$\begingroup\$ Link is broken (4/2015). \$\endgroup\$ – PolGraphic Apr 7 '15 at 22:19

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().


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.