Jump to content

seannybgoode

Member
  • Content Count

    43
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About seannybgoode

  • Rank
    Lance Corporal
  1. seannybgoode

    What happened to Java support?

    Still trying to get an answer here, pretty disappointed in BI trying to sweep this one under the rug..
  2. Java was supposed to be a confirmed feature for Arma 3, it was delayed in the Alpha, and then no news. What's the deal BI? Are you gonna bring us productive development tools or what?
  3. seannybgoode

    ARMA 3 Alpha - Java Virtual Machine

    Yeah I've been wondering about this. Java support was something I bought the game for, and now they haven't delivered. Very unlike BI. The last word was "yeah java is coming", and then nothing.
  4. seannybgoode

    Creating Context Menus

    If you think the Swing toolkit is tedious, then you're either not a Java dev (more like a first year CS student), or you're an awful dev. Swing is *easy* compared to C++, C, SQF, or pretty much anything else. The only thing easier than swing is MS Visual Studio. Hell even iOS guis are more painful than swing.
  5. Yeah I'm holding off. I'll play the beta a bit, and then back to waiting for the full release. I've actually been holding off on Arma 2 as well. I want to have all the awesome mods and content I had in Arma 2 with Arma 3 graphics and gameplay improvements. Really looking forward to ACE/ACRE on the new engine plus Java so I can sink my teeth into some mission design.
  6. So do all SQF functions not return any value? So we would return values via manipulating the global variables?
  7. So wf_fnc_distance_to holds a reference to that script. Correct? So as long as you have that variable, you can call the function? Parameters are passed to the function via an array, and then select 0, and select 1 are accessing those parameters. Correct? I see what you're doing there, where a function is in a single sqf file. Is there a way to have multiple functions in a single file and then call one or the other? Consider this simple Java class (Note this is taken from an actual project, so don't worry too much about what's going on inside the methods): Here are my instance variables: public class FloatingString extends BitmapFont { private static String FNT_FILE_PATH = "fnt/8bitwonder.fnt"; private static String TGA_FILE_PATH = "fnt/8bitwonder_0.tga"; private static float CHANGE_IN_Y = 1.5f; private static float LIFETIME = 1f; private float x; private float y; private float time; private String string; private boolean isExpired; And the constructor - the method that gets run when an instance of the class is invoked: public FloatingString(float x, float y, float scale, String str) { super(new FileHandle(FNT_FILE_PATH), new FileHandle(TGA_FILE_PATH), false); this.setColor(1.0f, 1.0f, 1.0f, 0.5f); this.setScale(scale); this.x = x; this.y = y; this.time = 0; this.string = str; this.isExpired = false; } And a couple of methods: public boolean effectIsExpired() { return this.isExpired; } public void draw(SpriteBatch spriteBatch) { this.time += Gdx.graphics.getDeltaTime(); y += CHANGE_IN_Y; if(!(this.time > LIFETIME)) super.draw(spriteBatch, this.string, this.x, this.y); else this.isExpired = true; Now say I want to use this class file: FloatingString myFloatingString = new Floating String(10f, 10f, 10f, "THIS IS MY FLOATING STRING OBJECT); Now I've initialized the object and run the constructor, so I can call the methods in the object at will: if(myFloatingString.effectIsExpired()) { do thing } or I can call the method responsible for drawing as many or as few times as I like: myfloatingString.draw(someSpriteBatch); Do we see any construct like this in SQF? Or does each .sqf file run from top to bottom and that's it, and there's no way to call a specific part of the code?
  8. seannybgoode

    will there be Java in the beta?

    Right now missions and modding are done via SQF script. SQF is a Bohemia in-house scripting language that has been used since OFP. Java brings Object Oriented Programming to the table, as well as type safety, performance, security and more. For me the biggest advantage is the Object Oriented paradigm, access to the huge and well documented Java libraries, as well as hundreds of tools for coding in java, eclipse support (read syntax highlighting, boilerplate generation, auto correction of errors, warnings etc.), and the list goes on. Java is also easier to learn because so many more millions of people know Java, compared to the relatively small community of SQF coders. There's also more documentation out there for Java, where's SQF info is sortof scattered around a handful of forums and somewhat on the wiki. There are some great SQF scripting guides out there, and I admire the dedication of the community, but there's simply much more support out there for Java, by way of sheer scale. I know that people around the Arma Community are hesitant towards change, but Java compatibility will be a boon for the mod community, and will open up so much in terms of possibilities.
  9. seannybgoode

    will there be Java in the beta?

    I would really like to hear a statement from Bohemia on this one. I'm starting to worry if we're going to see Java in the release at all. ---------- Post added at 00:09 ---------- Previous post was at 00:08 ---------- Nevermind. It looks like we won't be seeing Java in the Beta. Here's hoping we'll see it at release. http://sealteamsloth.com/showthread.php?434-Arma-3-Beta
  10. That seems like a really wacky way to define scope. And it's not really what I'm talking about. Lets just consider one machine for these purposes. Is there a way to create an instance of something, and then call the member functions of that instance? Like what if I have a set of functions that I would like to use over and over, can they be called from anywhere regardless of scope? Can they only be called locally? If neither of those cases, how do we define the scope? Can you demonstrate some simple function calls, and some function definitions, like calling a function and returning a value?
  11. I'm not sure what you mean. Like this? if(isClient) { run script } else { return ; }
  12. Well I can't give SQF any points for best practices. I can already see that using the global namespace for anything that needs to be shared between threads as problematic. I'm sure that it gets confusing with large missions, and it's probably actually a big source of the problem when it comes to the Arma 3 security issues, since anything that needs to be shared must be visible to everything else. Anyway, this is good so far. Just a couple more questions. I know that variables can be private, public, or they can be public and we can broadcast over the network to all the clients connected. I forget what it's called at the moment. Now my question is can functions be public or private?
  13. Yes this is exactly what I was looking for! Thanks! So let me just see if I'm understanding what's happening here: After init.sqf, I can call execVM or spawn to spawn threads. These threads take an SQF script file and run them within their own thread. Now I'm left with a couple more questions: How do threads, or instances of sqf script, communicate with eachother? Consider this java code where I create an instance of an object: SomeObject thing = new SomeObject(); //I think of this as being sorta like calling execVM without going into java threading business Now I want to communicate with this instance, say, set a state: thing.setState(Thing.WAITING_STATE); What would the sqf equivalent be to the above code? Second, can I create an instance of something in memory without spawning a thread? Would this be the difference between spawn and execVM? Or is it the case that only threads can be created, and that there are no instances per-se? Third, if it is indeed the case that Threads can talk to each other, what kind of mechanisms exist for thread safety? I know that SQF isn't an OO language, so comparing Java to SQF is kinda like comparing apples and oranges. I know there's a bit of a pitfall here in applying OO concepts to a language that isn't OO, but I'm not really sure how else to express these ideas. I don't have much experience with non-OO languages like JS, so there's a little bit of a disconnect there for me. I do have some limited python experience though, so I'm not totally unfamiliar with the dynamic typing.
  14. Thanks Tox. Much obliged on the operators link. Don't worry about specifics, a general idea of how to solve the problem is good enough. No need to verify your code exactly.
  15. LOL yeah I laughed at this post. Fail troll. ---------- Post added at 17:02 ---------- Previous post was at 17:00 ---------- First off Loony. I don't want your semi-literate "help". I don't need your "help". I'm looking for general explanations so that I can have a general understanding of the system. I don't need help with specific programming problems. I'm a programmer, I can solve those problems myself. Second, your feedback is unwanted and unwelcome. Kindly piss off. This forum needs an SQF/Arma scripting overview thread anyway. Shoe fly shoe. ---------- Post added at 17:09 ---------- Previous post was at 17:08 ---------- [/color] [/color]Yeah that's the problem I'm having. The wiki is incomplete, and everything else seems to be scattered around. I would really like to see some diagrams (think iOS application state diagram), and I would love to see some basic explanations of the system here *for developers*, which doesn't seem to exist. I'm the kind of guy who would document these kinds of things myself, but I really need to see some serious documentation so I know what the hell is actually going on, as opposed to some kind of general idea/confusion. Once I'm there, I will happily draw up diagrams and write a developers guide. I'm really just looking for a 1 or 2 page explanation or overview of the system.
×