Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


21. November 2015

 

Until now your language choices when using Unreal Engine have either been the high level graphical Blueprints or low level C++.  Today however NCSoft, makers of Lineage, Guildwars and more just release an extension that adds Javascript support to UE4.  Announced on the UE4 forums (login may be required) the extension was released on Github with full source under the Apache2 open source license.  From the readme:

Features
  • Powered by latest V8 (ES6)
  • CommonJS modules
  • Full access to the whole UnrealEngine API
  • Free to subclass existing classes including blueprint
  • Web-dev like UMG (Jade, pseudo-css, pseudo-angular.js)
  • Live reload
  • Communicate with outer world: REST, process(pipe), arraybuffer, ...
  • Bridge API for editor extension
  • Auto-completion for Visual Studio (auto-generated *.d.ts)
  • Dedicated Javascript console on UnrealEditor

The add-on is tightly integrated with Unreal including the ability to subclass existing classes:

class MyActor extends Actor {
  properties() {
    this.MyProp/*EditAnywhere+Replicated+int*/;
  }
  RPC(x/*int*/) /*Server+Reliable*/ {
    console.log('This function is replicated',this.MyProp++);
  }
}
let MyActor_C = require('uclass')()(global,MyActor);
if (GWorld.IsServer()) { 
  new MyActor_C(GWorld);
}


Very cool.  Head on over to the Github page for installation instructions.

GameDev News ,

blog comments powered by Disqus

Month List

Popular Comments

Building LibGDX iOS Apps in IntelliJ using new RoboVM plugin
Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


Home > >

4. May 2015

 

Until recently, if you were developing for iOS with LibGDX, you were better of using Eclipse or command line as your development environment.  Now however there is a beta plugin for RoboVM, the technology that enables Java on iOS.  This tutorial is going to take a quick look at the process.

 

 

Before you begin, you need to configure two things.  First IntelliJ needs to be running on Java VM 1.7 or higher.  This is trickier than it sounds, as by default it ships with a 1.6VM as there used to be some compatibility problems.  Fortunately I have already covered this process in this post

 

Next you need to increase the amount of memory allocated to the VM by IntelliJ.  This is done by editing a config file.  The process follows:

 

Open the contents of IntelliJ.app by right clicking it in Finder and selecting Show Package Contents:

Ss1

 

Now navigate to the folder Contents/bin/, locate the file idea.vmoptions and edit the value -Xmms

Ss2

 

Here you can see I’ve configured it to use 2GB of memory.  You need to set it to at least a GB.

Ss4

 

Now let’s install the Plugin.  If you haven’t already load IntelliJ.

Now select IntelliJ -> Preferences

Ss5

 

Now select Plugins->Browse Repositorties

Ss6

 

Now enter RoboVM in the search box, then click install plugin

 

Ss7

 

Wait a minute or two...

Ss8

 

Once done, click OK, then Apply.  You will be prompted to restart:

Ss9

Do so.

 

If you get an error at this point ( Major Minor version 51.0 ), you are running the wrong VM.  See the link earlier.  By the way, if an error does occur, you will need to go into plugins and enable the RoboVM plugin to continue.

Now create a new Run configuration.  Add a new config and select RoboVM iOS.

Ss10

 

The defaults should be sufficient:

Ss11

 

Click Run and wait a few minutes, the first compile takes some time.  It took about 10 minutes on my 2013 MBA running on battery power.

 

Now full disclosure… for some reason when I tried to run this the first time, I got an error about OpenGL 2.  I then tried on a real device and same result, from IntelliJ and gradlew from the terminal.  When I then switched back to the simulator it worked.   /shrug  I have no idea what the problem was, nor the solution.  One of the things I hate about magic black boxes.

 

Regardless, it is now possible and fairly easy to deploy to iOS from IntelliJ.  

blog comments powered by Disqus

Month List

Popular Comments