Okay, no negatve intentions intended with that topic title, but I was wondering.....
I really....REALLY....would like to see the two new World War II 1940 scenario's to be available for TripleA, with all it's functions and features.
Now....instead of hoping, waiting, and waiting a bit more for a new engine to be released, I would more then want to help out.
However, I never did anything with Java.
So.....How hard is it to learn by self study?
I'm no complete n00b when it comes to computers or software coding, I know my fair share of .xml, got a bachelor degree in Information Management, in which you are not taught to program, but taught how to be the manager of programmers , but we still got some insights in programming to know what my later employees are doing all day , fiddled around with Visual Basic a bit etc.
I am looking at like 4-8 hours per week that I can devote to self study, and a similar amount eventually to help out in coding TripleA.
Can it be a fruitful mission to embark on my self studying java programming course and help out....or will that just be a waste of time?
And if it can be fruitful.....Does anyone has some good tips for websites that can help in learning java?
(It would be a waste to waste 4 hours of those 4-8/week just by searching good sources)
Learning to code is a lot of work. I would start with reading a book on java (http://www.mindview.net/Books/TIJ/) and write some very small programs (the book probably has exercises in it).
After you work through the book, try writing a small game (like tic tac toe), then look at some of the simpler open bugs in TripleA, and try to fix them.
Not knowing much about the new 1940's mod, a very rough estimate is that it would take me 2 - 4 weeks working full time to get all the new rules in. For anyone else (except ComradeKev) it would take a lot longer.
I know it probably isn't as in-depth as a book, but I did find a free java 'textbook' online, if you want to take a look: http://math.hws.edu/javanotes/
The description is "WELCOME TO the fifth edition of Introduction to Programming Using Java, a free, on-line textbook on introductory programming, which uses Java as the language of instruction. This book is directed mainly towards beginning programmers, although it might also be useful for experienced programmers who want to learn something about Java. It is certainly not meant to provide complete coverage of the Java language."
P.S. I don't think the java JDK is able to run from a flash drive. You could try searching on google, but I doubt you'll find any easy solutions.
Okay, no negatve intentions intended with that topic title, but I was wondering.....
No worries. That's not what I was intending with my response, I was just too short on time at the moment to fully respond to your question. I hadn't intended to be curt.
Sean's suggestion is probably the best way to both get your feet wet and to get a hands-on introduction to the engine. Install Eclipse (free tool), or some other development environment and download the source code (instructions elsewhere on this site).
Then take a look at the bug list and find one that might seem pretty simple to fix (or I can suggest a couple when I have some time). Shoot me an email or post here and I'll try to give you some direction as to where the bug exists and you can poke around
As far as JAVA resources go, I have a book that I found very helpful when studying for the java certification test. It's written by the authors of the test and covers everything from the basics on up. I'll have to get the title to you later as the book is at work.
Really, I don't think Java is any more or less difficult than other 3rd generation languages. If you're wired for it in the head, all the rest is just the semantics of the particular language and tools you choose.
If emailing me at ComradeKev at yahoo.com , please add TripleA to the subject line
After you made your first small attempts with coding, you should learn planning.
Normally you get a problem. The programmer has to break it up in smaller pieces again and again. At the end end he says "ok, now I know what has to be done" and will start to code those small pieces one after the other (ok, a bit simplified, architectural issues work differently, but he doesnt want to be bothered with that).
To learn that, take a small problem (tic tac toe isnt a bad example) and to split the big problem again and again in smaller problems.
Now have an overview what has to be done. And you have small pieces, that can be coded far more easily than the big problem.
A good tool for the start that helps with such tasks is a mindmanager.
Thanks Pug, but that's how I deal with problems in my every day profession aswell, so that wouldn't be a problem ;-)
But I'll keep it in mind for when I get to the actual programming.
@ Wisconsin, thanks for the link, that seems exactly to be what I need.
I also mailed the professor who wrote it (he asks himself in the introduction) to thank him....and to ask him if he knows of any enthusiastic java programmers who like strategic boardgames
Sorry for spamming my own thread, but I am getting really enthusiastic and just have to throw some stuff out (with lack of java programmers around in real life...)
Just feel free to ignore if you get tired of me, feel free to reply if you like
Pug, what you suggested, basically comes down to this right.
"The advantage here is not just that you save typing. Organizing your program into subroutines also helps you organize your thinking and your program design effort. While writing the house-drawing subroutine, you can concentrate on the problem of drawing a house without worrying for the moment about the rest of the program. And once the subroutine is written, you can forget about the details of drawing houses -- that problem is solved, since you have a subroutine to do it for you. A subroutine becomes just like a built-in part of the language which you can use without thinking about the details of what goes on "inside" the subroutine."
So, each and every turn in TripleA I reckon is built up out of subroutines ("repairUnits()" , "combatMove()" e.g.) and what we need for '40 are extra subroutines (plus some more stuff obviously) ("ckeckConvoy()), which then again is divided up into sub- sub-routines?
And every step of movement ("combatMove()") could have a subroutine ("checkforAirbase()", containing a "If then" statement that adds 1 extra movement if an Airbase is present?
Kev, you're a hero! Eclipse also runs from my USB (at least, it starts...I havent tried using anything of it...) so this will make my self study even more easy! (Im away from home a lot, working on lots of different computers)
Thanks for the book suggestion. For now I am sticking with Wisconsin's website, which seems to be an easy going, step by step "welcome to the world of programming and eventually java" laydown.
Give me a few weeks, and I should be able to help out on the new engine.
(Or am I underestimating it now...... ...ah, we'll see)
Guys, I have one question.
While reading the book and trying to understand it, I really would like to see how all of this is done in TripleA.
Just to get a few things straight, could you please confirm and help?
As far as I understand it up till now, TripleA (or any other program) is pretty much created like this, very simplified:
- The code is written in a plain .txt file.
- This .txt file is then compiled by a compiler (Eclipse?)
- The then compiled code is what actually is the program.
I am trying to find out how this whole sourceforge thing works...but it's a maze.
Could you please for now tell me where I can find the original .txt file, that contains the code? So that I can keep that aside my book, and see how the theory is put to good use?
Or is there no .txt file, just a class or java file that I should decompile first?
Well, you're basically right about the code files, except that the code files are text files with a .java extension instead of .txt.
The source code files are then sort of 'compiled' by a compiler such as ant, eclipse, javac, etc. which results in a .jar file.
The resulting .jar file can then be run by the jvm or java virtual machine which will take the compiled instructions and interpret them into platform specific code as you run it on a computer. The reason java can run on Windows, Linux, and Mac is because the .jar files are interpreted, so each computer can run it using the correct .jar file interpreter.
When you get the source code files, you can open them with any text editor, such as Notepad or Wordpad.
To run the source code, you can use a 'compiler' called Apache Ant along with the jdk or java developer kit. You can get Apache Ant from: http://ant.apache.org/ and the java jdk from http://www.oracle.com/technetwork/java/javase/downloads/index.html. For the jdk, I would recommend just downloading the JDK + Netbeans package. Netbeans is a great java IDE that also has a lot of nice features. Using an IDE will greatly improve your code development speed and will make your job a lot less stressful.
After you install Apache Ant and the JDK, you have to set a few Environment Variables to enable quick ant commands.
When you're done with that, you simply run the 'ant run' command from the root folder of the triplea source code folder to run the program using the original source code.
You can get a much more detailed guide by opening your existing triplea folder, opening the 'doc' folder, then opening the 'developer_documentation.html' file. That guide will give you detailed instructions on most of a new developers needs.
P.S. The process may sound intimidating, but once you get everything set up you will be glad you did it.
Thanks Wisconsin. It does sound a bit intimidating indeed (why do I need ant run if I already have a compiler called Eclipse? ) but I'll continue studying first and browsing the code a bit, before I start asking probable obvious questions
You're right... if you use eclipse you probably don't need to install Apache Ant.
When I first saw the TripleA code myself, I was overwhelmed by the complexity. You see, a few months ago I decided I wanted to make a few improvements to TripleA. I downloaded the code and took a look, and I was surprised by the number of classes and such. It took a few more months, but now I understand the code enough to help now and then.
I already had some experience with the Microsoft Visual C# language, so changing my main language to java wasn't nearly as hard as learning programming from the ground up. Now that I'm trying to use java as my primary language, I'm working on creating version 2 of the map creator that will work on all operating systems. (At least all that java supports, which is almost all.)
Damn...one week passed without the time to do anything. Not making much progress this way...
A little q for Veqryn: Are you still in the lead of creatnig a P40, E40 and G40 map?
I was going through this post and I at least could help with writing the rules or such already, just to get something more scratched from the list.