Jump to content

Photo
- - - - -

ARMA 3 Alpha - Java Virtual Machine


  • Please log in to reply
95 replies to this topic
Thread Starter
Looter
Looter

    Corporal

  • Members
  • 78 posts

  • Joined: 16-February 2006

Posted 27 February 2013 - 07:07 #1

I was wondering if the Alpha will contain any of the functionality of the planned JVM support mentioned here? Would love to get a head start on developing with it, but I seem to remember it kind of being up in the air a few months ago - any news?

dna
dna

    BI Developer

  • 1705 posts

  • Joined: 08-January 2002

Posted 27 February 2013 - 11:23 #2

Hi, the Alpha will not sorry to say. We are not happy to include it until we can support it with updates and fixes.
Bohemia Interactive
Arma 3 - Project Lead
Watch us, tweet us, poke us

Take On Helicopters - Project Lead
Take On Noisecontrollers!

alwarren
alwarren

    Warrant Officer

  • Members
  • 2641 posts

  • Joined: 25-August 2009

Posted 27 February 2013 - 11:43 #3

Hi, the Alpha will not sorry to say. We are not happy to include it until we can support it with updates and fixes.


Will the callExtension mechanism be supported?
Posted Image Posted Image
Join the Community Upgrade Project (thread website)

Harrumph
Harrumph

    Private First Class

  • Members
  • 22 posts

  • Joined: 19-May 2011

Posted 27 February 2013 - 12:26 #4

Hi, the Alpha will not sorry to say. We are not happy to include it until we can support it with updates and fixes.


This is an absolutely heartbreaking disappointment.

Does BIS at least acknowledge what an abomination SQF is, and do you plan to offer any sane alternatives in the future?

dna
dna

    BI Developer

  • 1705 posts

  • Joined: 08-January 2002

Posted 27 February 2013 - 13:02 #5

Will the callExtension mechanism be supported?


It was not purposefully removed from Arma 3. On the other hand it's not functionality we use in vanilla content, so I do not believe it was tested. Therefore it should be in Alpha, but I cannot guarantee it.

We have not abandoned Java, and we want Object-Oriented scripting.
Bohemia Interactive
Arma 3 - Project Lead
Watch us, tweet us, poke us

Take On Helicopters - Project Lead
Take On Noisecontrollers!

MadDogX
MadDogX

    Mindless F@nb0!

  • Moderator
  • 9050 posts

  • Joined: 04-November 2002

Posted 27 February 2013 - 13:18 #6

We have not abandoned Java, and we want Object-Oriented scripting.


This is good to hear. :)

Gigabyte Z97-HD3 Motherboard | Intel Core i5 4690k @ 4.5GHz | NVidia GTX 970
16GB G-Skill Ripjaws 2133MHz RAM | Kingston HyperX SSD | be Quiet! 750W PSU

alwarren
alwarren

    Warrant Officer

  • Members
  • 2641 posts

  • Joined: 25-August 2009

Posted 27 February 2013 - 13:29 #7

It was not purposefully removed from Arma 3. On the other hand it's not functionality we use in vanilla content, so I do not believe it was tested. Therefore it should be in Alpha, but I cannot guarantee it.


Thanks for the info. I was thinking of trying to make it possible to script in e.g. lua with this, provided the interface is capable of that, and I was dreaming about an external debugger of sorts.

We have not abandoned Java, and we want Object-Oriented scripting.


Great to hear. My major gripe with SQF is that it seems to be very difficult to get an "off-line" semantic check going. More than once, running the program is the only way to find syntax errors. With a well-supported external scripting/programming language like LUA or Java, it would be easier to do, and in the long run, I think that this would benefit mission builders greatly because even those branches of execution that are usually neglected/rarely run would at least not cause syntax errors.
Posted Image Posted Image
Join the Community Upgrade Project (thread website)

Thread Starter
Looter
Looter

    Corporal

  • Members
  • 78 posts

  • Joined: 16-February 2006

Posted 27 February 2013 - 15:43 #8

Hi, the Alpha will not sorry to say. We are not happy to include it until we can support it with updates and fixes.


Thanks for clearing it up. Just glad to hear that it's not forgotten, makes sense for something like this to be worked on after more important things are sorted out, glad you guys are moving towards an OOP perspective and looking forward to more news on it as it becomes available.

Thanks for the info. I was thinking of trying to make it possible to script in e.g. lua with this, provided the interface is capable of that, and I was dreaming about an external debugger of sorts.



Great to hear. My major gripe with SQF is that it seems to be very difficult to get an "off-line" semantic check going. More than once, running the program is the only way to find syntax errors. With a well-supported external scripting/programming language like LUA or Java, it would be easier to do, and in the long run, I think that this would benefit mission builders greatly because even those branches of execution that are usually neglected/rarely run would at least not cause syntax errors.


Couldn't agree more, LuaJ has been my plan since the announcement of the JVM.

Edited by Looter, 27 February 2013 - 15:46.


OChristie
OChristie

    Gunnery Sergeant

  • Members
  • 515 posts

  • Joined: 31-May 2008

Posted 27 February 2013 - 16:42 #9

Maybe C# Scripting :D

eddieck
eddieck

    Staff Sergeant

  • Members
  • 373 posts

  • Joined: 11-October 2010

Posted 27 February 2013 - 19:53 #10

We have not abandoned Java, and we want Object-Oriented scripting.


What are the chances of either the beta or the full game including Java or some other SQF alternative?

mwd2
mwd2

    Private

  • Members
  • 8 posts

  • Joined: 17-May 2009

Posted 28 February 2013 - 13:22 #11

so will it possible to use the scripting from ArmA 2 in ArmA 3 ALPHA? Example for testing mission setup, which you like in ArmA 2 and import it to ArmA 3?

Brainbug
Brainbug

    Gunnery Sergeant

  • Members
  • 591 posts

  • Joined: 19-June 2009

Posted 28 February 2013 - 14:06 #12

What are the chances of either the beta or the full game including Java or some other SQF alternative?

according to what has been said, I'd assume the chance is 100% that it will be in the relase version, but it is hard to say at what stage it will appear in the pre-release versions. According to the usual definition (Alpha being an executable, but untested and feature-incomplete version, and Beta being a partly tested and feature-complete, but not yet bugfree version of a software program), I assume it will appear in the Beta, or put differently, they will probably not call the game "beta" if it is still missing.

Thread Starter
Looter
Looter

    Corporal

  • Members
  • 78 posts

  • Joined: 16-February 2006

Posted 28 February 2013 - 16:49 #13

so will it possible to use the scripting from ArmA 2 in ArmA 3 ALPHA? Example for testing mission setup, which you like in ArmA 2 and import it to ArmA 3?


Yes, as far as I can tell you should be able to script things in SQF the same way, object and unit classes will change for sure and maybe some syntax but I can't imagine much more changing on the SQF front, so far I don't think anything new on that front has been announced. It will be easy to tell next Tuesday.

MulleDK19
MulleDK19

    Gunnery Sergeant

  • Members
  • 418 posts

  • Joined: 03-May 2009

Posted 28 February 2013 - 22:22 #14

maybe c# scripting :D


This!
Posted Image

Milyardo
Milyardo

    Private First Class

  • Members
  • 30 posts

  • Joined: 30-May 2009

Posted 01 March 2013 - 02:31 #15

It was not purposefully removed from Arma 3. On the other hand it's not functionality we use in vanilla content, so I do not believe it was tested. Therefore it should be in Alpha, but I cannot guarantee it.

We have not abandoned Java, and we want Object-Oriented scripting.


What improvements are bring made to the Java implementation over the implementation seen in Take on Helicopters? I haven't worked with the implementation itself and my only source for how it works is the Java Scripting article on the wiki, but even with just a hello world example there are several glaring poor implementation decisions.

import com.bistudio.JNIScripting.RVEngine;

/**
 * Sample Java class 
 * @author Bohemia Interactive
 */
public class Sample {
	/** 
	 * Show a hint passed to jCall.
	 * @param args Method parameters
	 */	
	public static Object showHint(Object[] args) {
		if (!(args[0] instanceof String)) return null;		
		RVEngine.hint((String)args[0]);
		return null;
	}
}
So the first the thing that stands out to me is the complete lack of type safety. Sample doesn't extend any class or implement any particular interface, so there's no contract that Sample has to implement. In order to invoke showHint at runtime an expensive method probably iterates over classes in the class loader to find suitable methods(it would better to use Annotations here instead!) to put into a registry(I hope it's in a registry). Sample should probably extend instead be required to implement Callable. This would allow the enviroment to pass any class class implementing a callable function for use via jCall into a Future, making it possible for invocations to the JVM to asynchronous from SQF functions. Also Object shouldn't use as type parameter, define an interface for parameter types and use generics. ShowHint's prototype should look something more like
public static <T extends FunctionParameter> T showHint(T... elements)
Where T is a typed wrapper objects around SQF Primitives.

Two particular features I'm looking forward to is a annotation driven library for sub-classing defining functionality of a class with extensive use of dynamic proxies that will allow mission developers to implement functionality in runtime.

eddieck
eddieck

    Staff Sergeant

  • Members
  • 373 posts

  • Joined: 11-October 2010

Posted 01 March 2013 - 06:51 #16

Another question DnA, do you guys intend for Java as a full replacement option for SQF (make missions and mods without any need for SQF code), or will it be kind of an "add-on" (something like a callJVM SQF function, similar to callExtension)?

batto
batto

    First Sergeant

  • Members
  • 834 posts

  • Joined: 02-October 2011

Posted 01 March 2013 - 11:17 #17

In order to invoke showHint at runtime an expensive method probably iterates over classes in the class loader to find suitable methods(it would better to use Annotations here instead!) to put into a registry(I hope it's in a registry).


Non-sense.

Two particular features I'm looking forward to is a annotation driven library for sub-classing defining functionality of a class with extensive use of dynamic proxies that will allow mission developers to implement functionality in runtime.


Please no. Just provide static functions equivalent to SQF and let everyone to build their crazy OOP API.

Bensch
Bensch

    Lance Corporal

  • Members
  • 56 posts

  • Joined: 26-June 2012

Posted 03 March 2013 - 10:12 #18

C# support would be awesome :-)

Quicker... and in my opinion better.

MulleDK19
MulleDK19

    Gunnery Sergeant

  • Members
  • 418 posts

  • Joined: 03-May 2009

Posted 03 March 2013 - 10:44 #19

I was working on a C# implementation once, and wrote this test script:

public class TestScript : Script
{
    public TestScript()
    {
        this.Sleep(5000);

        string result = Main.ExecuteSqfStatement("getPos player");
        Vector3 playerPosition = Vector3.FromGameTableString(result);

        Vehicle plane = new Vehicle("A10_US_EP1", playerPosition, VehicleStartPosition.Flying);

        this.Sleep(1000);

        while (true)
        {
            string msg = "Fuel tank of plane: " + plane.Fuel.ToString();
            Game.ShowHint(msg, true);
            this.Sleep(250);
        }
    }
}


Would be nice with an official implementation though, as I had to use the extension command to communicate with the game, which is extremely slow, but it works.
Posted Image

seannybgoode
seannybgoode

    Lance Corporal

  • Members
  • 44 posts

  • Joined: 27-February 2013

Posted 03 March 2013 - 19:17 #20

Non-sense.
Please no. Just provide static functions equivalent to SQF and let everyone to build their crazy OOP API.


Amen.