• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Java coders here?

Level 9
Joined
Jan 1, 2014
Messages
140
I have always been a java coder. Syntax is difficult to understand on deeper level. Once I undestrood similarities to WE i started to see bigger picture.

I feel bad for anybody who does not build everything at themself and use ai.
(merged)
Sorry for double post, but you get the idea that I wrote this comment after thinking hours after previous comment (and cant add this into previous post instantly by modifying)

So I thought today that it would be nice to 'transcode' wice engine from w3editor into java. And I made little bit designing already.

Because I think I can't never get any money from wice-engine I would like to share basic concept of this program that I made many years ago for wc3. (I did not receive enought enthusiasm for co-operate and develope wice-engine more with warcraft)

Basic idea:
-One trigger is a kind of loop (inside one), it's the mechanical part of the engine that does a lot of running. Loop ofcouse stacks but idea is mainly that one row of doodad writing is one loop.
-Other trigger is target trigger of the loop that activates when the loop reads from library that it is now turn to write
-And then there are libraries that describe when there should be doodad to be written..

The concept ofcourse expands greatly, and I also made implementation for third dimension instead it just being 2d.
 
Last edited:
Does it have any use.
Depends if you are using Jass Virtual Machine, or Retera's knockoff of the Jass Virtual Machine -- which is written in Java (per the thread title).

In the Retera knockoff, it has no use. Because Java code has a garbage collector. But in the original game it is very important
 
This is the first iteration.. more to change later
Java:
import java.util.*;
// wice-engine (and general map editor frame) By rick
// Copyright notice : some of the class derives might have been copied partly from the mindview files, and shall
// be accompanied with liable copyright notice.

class Untitledtrigger001 {
    //variable
    int height;
    //initialize;
    Untitledtrigger001() {
        System.out.println("Initialization..");
        height=0;
    }
    //action
    Untitledtrigger001(int i) {
        System.out.println("Creating new height "+i);
        height = i;
    }
    void info() {
        System.out.println("Current value of height "+height);
    }
    void info(String s) {
        System.out.println(s+" value " + height + " tall");
    }
}


class Untitledtrigger002 {
    //variable
    int height;
    //initialize;
    Untitledtrigger002() {
        System.out.println("Initialization..");
        height=0;
    }
    //action
    Untitledtrigger002(int i) {
        System.out.println("Creating new height "+i);
        height = i;
    }
    void info() {
        System.out.println("Current value of height "+height);
    }
    void info(String s) {
        System.out.println(s+" value " + height + " tall");
    }
}


public class MapEditorProject {
    public static void main (String[] args) {
        new Untitledtrigger001();
        for(int i = 0; i < 5; i++) {
            Untitledtrigger001 Trigger001 = new Untitledtrigger001(i);
            Trigger001.info();
            Trigger001.info("overloaded method");
         
        }
        new Untitledtrigger001();
        new Untitledtrigger002();
    }
}

In the first update you can see the changes. I renamed triggers, and actions. (however after studying progressively java I have learned that actually classes are not same as triggers but you can pretend that way in this very simplifield example (to get you hang on java coding based on your WE trigger experience.)

Java:
import java.util.*;
// wice-engine (and general map editor frame) By rick
// Copyright notice : some of the class derives might have been copied partly from the mindview files, and shall
// be accompanied with liable copyright notice.

class Start {
    //variable
    int x,
         y,
         i;
    String map_data[]={"",""};
    //initialize;
    Start() {
        System.out.println("Initialization..");
        x=0, y=0;
    }
    //action
    Start(int end) {
        System.out.println("Creating new x,y= "+end);
        x = 0;
        y = 0;
        // here comes the for-loop what is the key part of the wice-engine that i wont put here because well,
        // why would I give everything i know for free?
    }
    /* dont mind yet these below they are still unshaped code that require to be updated, main point is that
      * you can see how to read data from the trigger */
    void info() {
        System.out.println("Current value of height "+height);
    }
    void info(String s) {
        System.out.println(s+" value " + height + " tall");
    }
}


class crete {
    //variable
    int height;
    //initialize;
    crete() {
        System.out.println("Initialization..");
        height=0;
    }
    //action
    Untitledtrigger002(int i) {
        System.out.println("Creating new height "+i);
        height = i;
    }
    /* dont mind yet these below they are still unshaped code that require to be updated, main point is that
      * you can see how to read data from the trigger */
    void info() {
        System.out.println("Current value of height "+height);
    }
    void info(String s) {
        System.out.println(s+" value " + height + " tall");
    }
}


public class MapEditorProject {
    static void usage() { // info about arguments }

    public static void main (String[] args) {
        if(args.lenght != 1) usage();
       if(args[0].equals("1")) {
        new Untitledtrigger001();
        for(int i = 0; i < 5; i++) {
            Untitledtrigger001 Trigger001 = new Untitledtrigger001(i);
            Trigger001.info();
            Trigger001.info("overloaded method");
        }
        new Untitledtrigger001();
        }
        else if(args[0].equals("2")) {
        new Untitledtrigger002();
       
for(int i = 0; i < 5; i++) {
            Untitledtrigger002 Trigger002 = new Untitledtrigger002(i);
            Trigger002.info();
            Trigger002.info("overloaded method");
           
        }
        }
        else
          usage();
    }
}
 
Last edited:
Back
Top