# \[RELEASED\] Flathead = UE4 + Javascript

**URL:** <https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213>\
**Category:** Community & Industry Discussion\
**Tags:** unreal-engine\
**Created:** [March 20, 2014, 5:12pm UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213 "2014-03-20T17:12:26Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![darkZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkZ](https://forums.unrealengine.com/u/darkZ)\
**Post date:** [April 26, 2014, 7:41pm UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/41 "2014-04-26T19:41:33Z")

</div>

[=Bob\_Gneu;22154]  
I will do my best to keep the price point reasonable. I completely understand your positions though. I have not nailed down any of the marketplace details just yet, I will let you know though. =)

In other news, my apologies for not having an update to you guys sooner. I think the next update will be the one that will make you all realize the potential for this plugin. Its really quite amazing how much flexibility is provided by something as simple as integrating a language like JS. I may need to include source access as well, maybe ill do like Epic has and provide you all with the ability to see the guts of the plugin so you can do what you need. It may be better turned into a module and not used as a plugin. All discussions that we can have going forward.

Soon! An update will be in your hands soon!  
[/]

I was trying to say that you can keep the price much above $5. I think with a plugin as powerful as this could be people would willingly pay the premium price. When I said the price is unfair, I meant it is unfair to the developer i.e. you 🙂

---

<div class="post-metadata">

**Author:** ![Bob\_Gneu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bob\_Gneu](https://forums.unrealengine.com/u/Bob_Gneu)\
**Post date:** [April 26, 2014, 10:58pm UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/42 "2014-04-26T22:58:58Z")

</div>

[=darkZ;23665]  
I was trying to say that you can keep the price much above $5. I think with a plugin as powerful as this could be people would willingly pay the premium price. When I said the price is unfair, I meant it is unfair to the developer i.e. you 🙂  
[/]

I know what you meant.

The price will be narrowed in later.

---

<div class="post-metadata">

**Author:** ![KRushin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KRushin](https://forums.unrealengine.com/u/KRushin)\
**Post date:** [May 1, 2014, 4:51am UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/43 "2014-05-01T04:51:34Z")

</div>

[=Bob\_Gneu;23746]  
I know what you meant.

The price will be narrowed in later.  
[/]

I’ll be checking in on trello and this thread. Let me know if u need help with any focus testing. When i came to UE4 i was like… you know what… I’ll get out of my comfort zone and buckle down and start learning the in’s and outs of c++ since i’ll have too. I’ll break from living in atwood’s law… and then u go and make this. But i am enjoying bettering my understanding daily.

---

<div class="post-metadata">

**Author:** ![Bob\_Gneu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bob\_Gneu](https://forums.unrealengine.com/u/Bob_Gneu)\
**Post date:** [May 1, 2014, 3:24pm UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/44 "2014-05-01T15:24:18Z")

</div>

=)

Good for you! It’s always good to step outside of our comfort zones and get a bit messy, but there is no use ignoring tools that are available.  
Ill be updating trello more frequently going forward. I think its been sorely mistaken =)

I have some work to finish up on a couple other projects, but rest assured I am pushing forward full tilt with the next release.  
I’ll let you know when the next build is available so you can check it out!

.:Bob

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [May 1, 2014, 4:18pm UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/45 "2014-05-01T16:18:37Z")

</div>

Hi Bob,

Glad to see this coming through! You are making UE4 available to even more users, keep up the great work!

---

<div class="post-metadata">

**Author:** ![ParkerKane](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ParkerKane](https://forums.unrealengine.com/u/ParkerKane)\
**Post date:** [May 7, 2014, 2:32pm UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/46 "2014-05-07T14:32:58Z")

</div>

Any plans to make support OSX? 🙂

---

<div class="post-metadata">

**Author:** ![Bob\_Gneu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bob\_Gneu](https://forums.unrealengine.com/u/Bob_Gneu)\
**Post date:** [May 7, 2014, 6:02pm UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/47 "2014-05-07T18:02:48Z")

</div>

Thankfully for all of us, V8 is OSX compatible, I will just have to build with that target and link it in.

Also, Linux and Android builds are possible. As with everything adding support is going to depend on the needs of the community.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_688aff00](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_688aff00](https://forums.unrealengine.com/u/anonymous_user_688aff00)\
**Post date:** [May 8, 2014, 8:28pm UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/48 "2014-05-08T20:28:38Z")

</div>

I would like to throw in another vote for OS X. With a promised purchase of $25 for the plugin.

[=Bob\_Gneu;28505]  
Thankfully for all of us, V8 is OSX compatible, I will just have to build with that target and link it in.

Also, Linux and Android builds are possible. As with everything adding support is going to depend on the needs of the community.  
[/]

---

<div class="post-metadata">

**Author:** ![Bob\_Gneu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bob\_Gneu](https://forums.unrealengine.com/u/Bob_Gneu)\
**Post date:** [May 9, 2014, 7:04am UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/49 "2014-05-09T07:04:47Z")

</div>

[=filmicarty;30347]  
I would like to throw in another vote for OS X. With a promised purchase of $25 for the plugin.  
[/]

=) Righty-O, ill add that to my tracker.

I moved away from Trello for something more robust, but I think I see some benefit to following in Epic’s footsteps. I think this weekend may be an interesting weekend for V8 Development ( I turn 31 =D on Saturday ) and I have shelved development on Exodus until it either gets greenlit, we gain some traction in the community or we decide to do something to it.

As such, I have reworked the trello page and will keep it up to date with the requests that you all come up with and technical requirements I am including to help extend the plugin. Hopefully this will provide a good means of communication between us and help keep you informed of the state of the plugin going forward.

Please don’t be shy. There is a ton of opportunity for input and assisting in not only defining the API, but to help document the plugin going forward. I think that I will use the UE wiki for now, unless I am asked to put the documentation elsewhere, to help keep documentation for the game and the plugins in a centralized location.

Let me know your thoughts, I am all ears!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_688aff00](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_688aff00](https://forums.unrealengine.com/u/anonymous_user_688aff00)\
**Post date:** [May 11, 2014, 7:50pm UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/50 "2014-05-11T19:50:44Z")

</div>

UE4 Event Listener via JavaScript?

Will this plugin allow one to create event listeners in Javascript? This question might be a little nutso, I’m primarily a PHP/Javascript developer, and I’m basically wondering about the best route to trigger events within UE externally, via javascript from a web page.

---

<div class="post-metadata">

**Author:** ![ParkerKane](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ParkerKane](https://forums.unrealengine.com/u/ParkerKane)\
**Post date:** [May 12, 2014, 4:43am UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/51 "2014-05-12T04:43:14Z")

</div>

[=Bob\_Gneu;32512]  
I turn 31 =D on Saturday  
[/]

Gratz… I turned 34 few days ago 🙂

Also 25usd from me 🆒

---

<div class="post-metadata">

**Author:** ![Bob\_Gneu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bob\_Gneu](https://forums.unrealengine.com/u/Bob_Gneu)\
**Post date:** [May 12, 2014, 9:40pm UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/52 "2014-05-12T21:40:42Z")

</div>

[=filmicarty;39287]  
Will this plugin allow one to create event listeners in Javascript? This question might be a little nutso, I’m primarily a PHP/Javascript developer, and I’m basically wondering about the best route to trigger events within UE externally, via javascript from a web page.  
[/]

My apologies for not sharing this earlier, but if you grab the build linked on the front page you will be able to see that the eventing is based on the way events are defined by Mozilla:

> <https://gist.github.com/BobGneu/269ce6d7840a88b8a4d5>

The only note that is important at this point is that events go from C++ to JS atm. Moving back the other way is reasonable, as there are already a lot of static methods in place that are hooked into JS, so you can call out of JS land into C++. I am still working on the new edition of the plugin so some of the above may change but only where it makes sense.

---

<div class="post-metadata">

**Author:** ![Bob\_Gneu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bob\_Gneu](https://forums.unrealengine.com/u/Bob_Gneu)\
**Post date:** [May 12, 2014, 9:44pm UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/53 "2014-05-12T21:44:16Z")

</div>

[=ParkerKane;39944]  
Gratz… I turned 34 few days ago 🙂

Also 25usd from me 🆒  
[/]

There is a thread that was put up a few days ago, and I think it makes sense for this project to be following suit. I think this plugin is going to be donate ware, with attribution.

=) Thanks for the interest in this guys, its been incredibly influential and him hoping to be able to get this build out to you once I get it stable enough to satisfy my testing.

---

<div class="post-metadata">

**Author:** ![Bob\_Gneu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bob\_Gneu](https://forums.unrealengine.com/u/Bob_Gneu)\
**Post date:** [May 16, 2014, 7:31pm UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/54 "2014-05-16T19:31:08Z")

</div>

Update 5/16/2014

It is that time again!

Status

You may notice a change around the header of the page. The V8 Plugin has finally been named - Flathead. If you look it up you will likely understand, but suffice to say that it is a well known type of V8 and its fitting due to the popularity of this thread and the interest I’ve had as of late. Thanks to Epic’s mentioning of me & my plugin last week I received a bunch of new emails asking about its status and contributing to the plugin.

You will all be happy to know that things are getting really close now. I am currently iterating on the public API, hoping to narrow in on something that doesn’t require that anyone know anything about the v8 library, and while that is not exactly working out the way I want it to it is at least a pretty significant goal, and it means that we are about ready for some contributions. I have taken the liberty of creating a new **public** [FlyingGame](https://github.com/BobGneu/UE4FlyingGame) on github where I’ll be pushing a few features highlighting the interaction between V8 and UE4, using Flathead as the middle man. I am pushing it this way for two reasons, one - I feel like I need to be more transparent with all of you about the state of the plugin, and let you guys start using it, and contributing - if you so choose.

With the latest build of the plugin you are able to build your game in debug, development and shipping configurations on windows and the library will go ahead and start loading in files as you wish. Exposing objects is not exactly simple as of now, but it will, undoubtedly, be iterated on.

Give me a few more days to clean up the implementation (macros aren’t exactly our friend, but believe me - you will appreciate them when if you ever see the guts of whats going on under the hood.). I expect to have a build ready for you guys this weekend.

In the pipe

- Mac OSX support
- **Cleaning up the encapsulation**
- **Documentation**
- Update to V8 3.27!?
- Marketplace Deployment!?

---

<div class="post-metadata">

**Author:** ![Bob\_Gneu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bob\_Gneu](https://forums.unrealengine.com/u/Bob_Gneu)\
**Post date:** [May 16, 2014, 7:39pm UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/55 "2014-05-16T19:39:12Z")

</div>

Sample Sauce

**Flathead Flying Game** | Sample of the UE4 flying game bound to the Flathead plugin.  
[https://github.com/BobGneu/UE4FlyingGame](https://github.com/BobGneu/UE4FlyingGame)  
\*\*  
Creating a JS Object\*\* | _Creating a JS object and exposing it to JS land. This does not reference a C++ type._

> <https://gist.github.com/BobGneu/27ba3717d2442fac3d87>

**Callback to C++** | _Interacting with arguments and returning a value to JS._

> <https://gist.github.com/BobGneu/55fc893d379493b65dfd>

**MathTests in Flathead** | Running JS tests to confirm UE4 values are correct.

> <https://gist.github.com/BobGneu/22fdea84b5e3fd6f0aea>

---

<div class="post-metadata">

**Author:** ![Bob\_Gneu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bob\_Gneu](https://forums.unrealengine.com/u/Bob_Gneu)\
**Post date:** [May 22, 2014, 2:59am UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/56 "2014-05-22T02:59:39Z")

</div>

I am currently working with someone on the v8 mailing list regarding an issue that will (hopefully) be cleared up shortly. This is the final thing holding you from being able to use the plugin, so hopefully things will move quickly.

---

<div class="post-metadata">

**Author:** ![Bob\_Gneu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bob\_Gneu](https://forums.unrealengine.com/u/Bob_Gneu)\
**Post date:** [May 27, 2014, 1:26am UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/57 "2014-05-27T01:26:39Z")

</div>

Alrighty!

I have made a pretty drastic change to the project and the structure of all of this. The project is now open for use and ill do my best to keep it that way. Clearly the marketplace (and the plugin deployment process) is not as mature as we would like, so I have made the decision to open the door up. Further information will be available here:

> **[Releases · BobGneu/Flathead](https://github.com/BobGneu/Flathead/releases)**
>
> Flathead = UE4 + Javascript. Contribute to BobGneu/Flathead development by creating an account on GitHub.

You are quite welcome =)  
Hope this will help with maturing the API further.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_688aff00](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_688aff00](https://forums.unrealengine.com/u/anonymous_user_688aff00)\
**Post date:** [June 3, 2014, 12:55am UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/58 "2014-06-03T00:55:45Z")

</div>

V8 and UDP Socket Events

Hey Bob, that’s great news! Been following your Trello activity carefully!

This might be a ridiculous question, but would this plugin make it possible for me to open up a socket, for UDP communication, within a blueprint? Or at least fire an event, so that I can then react to that event from a blueprint?

[=Bob\_Gneu;59637]  
Alrighty!

I have made a pretty drastic change to the project and the structure of all of this. The project is now open for use and ill do my best to keep it that way. Clearly the marketplace (and the plugin deployment process) is not as mature as we would like, so I have made the decision to open the door up. Further information will be available here:

> **[Releases · BobGneu/Flathead](https://github.com/BobGneu/Flathead/releases)**
>
> Flathead = UE4 + Javascript. Contribute to BobGneu/Flathead development by creating an account on GitHub.

You are quite welcome =)  
Hope this will help with maturing the API further.  
[/]

---

<div class="post-metadata">

**Author:** ![Bob\_Gneu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bob\_Gneu](https://forums.unrealengine.com/u/Bob_Gneu)\
**Post date:** [June 3, 2014, 7:45am UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/59 "2014-06-03T07:45:23Z")

</div>

Really, that would be a billion times better to do via C++ directly. The JS API is, at least at this point, not well suited for such use, but I suppose that can be a feature that gets hooked in if its requested enough.

I would suggest something like this: [http://www.cs.rutgers.edu/~pxk/417/notes/sockets/udp.html](http://www.cs.rutgers.edu/~pxk/417/notes/sockets/udp.html)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_cbdc83411](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cbdc83411](https://forums.unrealengine.com/u/anonymous_user_cbdc83411)\
**Post date:** [June 7, 2014, 10:31pm UTC](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213/60 "2014-06-07T22:31:56Z")

</div>

it will be very interesting if you can integrate nodejs with ue4

exposing nodejs to ue4 will open new frontiers

- all the nodejs plugins can be reused
- easily scale communications between ue4 servers
- interconnect out of the box with other run-time or services for example here on top of nodejs you can run c# [Edge.js](http://tjanczuk.github.io/edge/)
- administer your game with http pages
- integrate social services like facebook,gmail etc right into your server logic
- nirvana with blueprints

for example if you want to build a masive mmo and allow clients to connect from various platforms the work will be much easier

[Previous page](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213.md?page=2)

[Next page](https://forums.unrealengine.com/t/released-flathead-ue4-javascript/213.md?page=4)
