Game Maker's Garage Forum

Game Creation => Code Exchange => Topic started by: Gan on May 12, 2009, 07:36:31 AM

Title: [Java] Getting Started with Java
Post by: Gan on May 12, 2009, 07:36:31 AM
I have bad news....  I ran out of tutorial space in the post. Ghost, would it be possible for you to add an empty post under my username after this one?

I've created 2 extra tuts. You can view the whole thing here:
http://web.mac.com/avisaria/javatuts.txt

-Gandolf
Title: Re: [Java] Getting Started with Java
Post by: Gnome on May 12, 2009, 02:32:48 PM
 ;D
Title: Re: [Java] Getting Started with Java
Post by: Silverwind on May 14, 2009, 02:43:31 AM
I'm dreadfully confused by practically everything Java related. I understand that to make stuff in Java I need the following: a Java compiler, a Java virtual machine, a Java application programming environment and the Java application programming environment's documentation. So, do Java integrated development environments consist of all those? I've downloaded NetBeans, is that all I need? Is the API documentation included as well?
Title: Re: [Java] Getting Started with Java
Post by: Gan on May 14, 2009, 06:34:49 AM
Yeah, Netbeans was made to be all in one.  All you need is to have your machine to be able to run Java, and have Netbeans to make Java apps.

Netbeans has the compiler, the Java IDE, and all the documentation. A feature you will come to know and love is when you type a command and a list box pops up with all the possible commands that are related to what you type with the definitions and an example usage.

On the tutorials, I will have pictures at every step to keep you guys going. I won't have time to start on the first one until this weekend.


-Gandolf
Title: Re: [Java] Getting Started with Java
Post by: GMG Hendo on May 14, 2009, 10:02:51 AM
To be honest I think java is pretty useless. I've never seen an attractive java application, and obj-c is much more powerful. Sure java is cross compatible, but Windowsis so terriblei would neverseea point in making anything for it. Nowadays the UI of an application is so important and there's just no good way to make a good UI in java without extensive time wasting coding.  
Title: Re: [Java] Getting Started with Java
Post by: WarHampster on May 14, 2009, 11:49:45 AM
Quote
Windowsis so terriblei would neverseea point in making anything for it.


Maybe because the majority of the world uses windows?

In my opinion, Java is good for web apps and nothing else.
Title: Re: [Java] Getting Started with Java
Post by: Tireas Dragon on May 14, 2009, 01:35:25 PM
Quote
Maybe because the majority of the world uses windows?
That is why most companies make games for only windows. (Usually xbox ps3 and other platforms too, but why every platform except mac)
Title: Re: [Java] Getting Started with Java
Post by: Gan on May 14, 2009, 05:01:03 PM
Have you guys ever played RuneScape? You gotta admit that they did a pretty good job.


-Gandolf
Title: Re: [Java] Getting Started with Java
Post by: Mystor on May 14, 2009, 05:10:01 PM
Yeah, I am making games in XNA atm.

Windows only, but I am hoping for it to be ported to mac soon.
I think that there is a project that will let me make mac games with it in production atm.
Really nice coding, easy to use, and I have a good book for it too!

Mist
Title: Re: [Java] Getting Started with Java
Post by: WarHampster on May 14, 2009, 06:38:09 PM
Do you think that Microsoft would port their SDK for making Microsoft xbox games to Apple computers?

Quote
Have you guys ever played RuneScape? You gotta admit that they did a pretty good job.

Runescape is a web app  ;)
Title: Re: [Java] Getting Started with Java
Post by: Gan on May 14, 2009, 07:43:03 PM
Have you ever tried the RuneScape desktop application?

Java runs the same as both applet and application, only exceptions in browser can limit capability.


-Gandolf
Title: Re: [Java] Getting Started with Java
Post by: Mystor on May 14, 2009, 08:14:46 PM
Quote
Do you think that Microsoft would port their SDK for making Microsoft xbox games to Apple computers?


Runescape is a web app  ;)
No, but a open source company is...

Mist
Title: Re: [Java] Getting Started with Java
Post by: Silverwind on May 15, 2009, 02:23:36 AM
Quote
Yeah, I am making games in XNA atm.

Windows only, but I am hoping for it to be ported to mac soon.
I think that there is a project that will let me make mac games with it in production atm.
Really nice coding, easy to use, and I have a good book for it too!

Mist
Nice. I too purchased a shiny new book recently. A book on Java.
Title: Re: [Java] Getting Started with Java
Post by: WarHampster on May 15, 2009, 07:55:06 AM
Quote
Have you ever tried the RuneScape desktop application?

Java runs the same as both applet and application, only exceptions in browser can limit capability.

I stand corrected. Does Runescape use java's built in graphics library?
Title: Re: [Java] Getting Started with Java
Post by: Gan on May 15, 2009, 09:38:40 AM
Yeah, Java has many built in libraries. I have currently started studying a few 3D tutorials, though I'm going to hold them off until I get some decent work done on my current projects.

Also, it appears that Java has nearly the same syntax and uses many commands similar to C/C++/Obj-C/C#. So similar that you can convert your Java code to C and compile it to work on individual platforms as native byte code. I believe that making a UI in Java on TextEdit, is about as hard as making a UI in Obj-C on TextEdit. Though that's where Netbean's graphical IDE comes in. Just drag all the buttons, windows, or text fields you want in the field and you can easily create your interface in a matter of moments.


-Gandolf  
Title: Re: [Java] Getting Started with Java
Post by: WarHampster on May 15, 2009, 11:34:32 AM
The problem with java is that it leaves out so many important features in an attempt to be safe... you can't use pointers, access memory directly, ect.
Title: Re: [Java] Getting Started with Java
Post by: Gan on May 15, 2009, 03:59:57 PM
Those safe precautions only take effect for Java applets. They can be thrown away by having a security window pop-up asking the user to trust this applet.


-Gandolf
Title: Re: [Java] Getting Started with Java
Post by: WarHampster on May 15, 2009, 09:52:38 PM
I think that you still can't directly change memory...
Title: Re: [Java] Getting Started with Java
Post by: Gan on May 15, 2009, 09:57:42 PM
I'm unsure what you mean when you say "access memory directly" or "directly change memory".


-Gandolf
Title: Re: [Java] Getting Started with Java
Post by: Silverwind on May 16, 2009, 03:08:35 AM
I never pay heed to those technical "details" surrounding programming languages. The bottom line is that any language is capable of creating good games, and I'd I'd be inclined to think that anyone who says otherwise isn't a particularly good programmer.

Java's going pretty well for me btw, I've built a few output test apps and am learning the syntax structure. Once I become a veteran I'm gonna write an article or a short book describing it in plain English.
Title: Re: [Java] Getting Started with Java
Post by: WarHampster on May 16, 2009, 12:49:43 PM
Quote
I'm unsure what you mean when you say "access memory directly" or "directly change memory".

For example, making a pointer that explicitly references something in the computer's memory, and then directly manipulating said pointer.

Or using inline assembly... that kind of really complicated stuff :P


Quote
I never pay heed to those technical "details" surrounding programming languages.

-_-


On a random note, has anyone else here tried to learn C++? It's so similar to Java (which is really easy to learn in my opinion), but when ever I open an SDK and try some tutorials it seems really hard.
Title: Re: [Java] Getting Started with Java
Post by: Silverwind on May 16, 2009, 02:09:25 PM
Quote
On a random note, has anyone else here tried to learn C++? It's so similar to Java (which is really easy to learn in my opinion), but when ever I open an SDK and try some tutorials it seems really hard.
Yeah, that's the way Java was for me last week, and yet what I've learned so far seems simple to me now. I think the reason I (and possibly many other aspiring programmers) find learning languages so hard is that nobody has written plain enough explanations.
Title: Re: [Java] Getting Started with Java
Post by: Gan on May 16, 2009, 04:10:26 PM
Just updated the post a little. Getting ideas solid, though I may not have time to actually finish a tutorial until 2 weeks from now.

Silverwind, it would be great if you could read #7 on my post about the game; I'd like to know what you think about it or if you could help me out.


-Gandolf
Title: Re: [Java] Getting Started with Java
Post by: Silverwind on May 16, 2009, 06:00:53 PM
Sure Gan, how can I help? Do you want me to make an RPG example, or is it just a grid nav you're looking for?

EDIT:

btw, I don't think I have the Java API docs Gan. Do you have a download link for the up to date version?
Title: Re: [Java] Getting Started with Java
Post by: Gan on May 16, 2009, 07:41:11 PM
A simple grid nav with npc support would be great.

As for the API docs:
http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u10-docs.zip?BundledLineItemUUID=oNRIBe.lwzYAAAEh9Q4_7Ev_&OrderID=n0pIBe.l.acAAAEh5A4_7Ev_&ProductID=vEZIBe.pSRoAAAEb288vh9aV&FileName=/jdk-6u10-docs.zip

It seems that all the java docs came when I installed Netbeans on my computer, when I installed Netbeans on another computer; it came with no javadoc. I am unsure how to install javadoc.
Though you may have some success experimenting with Tools -> Libraries.


-Gandolf
Title: Re: [Java] Getting Started with Java
Post by: Silverwind on May 17, 2009, 05:42:25 AM
Ah, thanks for the docs. :) I'm on Sora's computer at the moment, but when I get back I'll start work on the nav right away. I think it's a great idea btw. :)
Title: Re: [Java] Getting Started with Java
Post by: Gan on May 18, 2009, 07:35:49 AM
:) Thanks.

Quote
On a random note, has anyone else here tried to learn C++? It's so similar to Java (which is really easy to learn in my opinion), but when ever I open an SDK and try some tutorials it seems really hard.
Yeah, I've tried that before. Very tough stuff, so I just decided to go with the next thing up.


-Gandolf
Title: Re: [Java] Getting Started with Java
Post by: Silverwind on May 18, 2009, 03:17:44 PM
I've updated the V6 Grid Navigation example to include an NPC routine. You can download the update on the Roguesoft Website: http://www.roguesoft.co.uk/MacGameMakerStuff.html

If you want me to add more just ask. :)
Title: Re: [Java] Getting Started with Java
Post by: Gan on May 18, 2009, 05:39:27 PM
Awesome. :D
I'm thinking it'll only take an hour for the first few tutorials, than a couple for the last. I will make time, though these 2 weeks will be extremely hectic.


-Gandolf
Title: Re: [Java] Getting Started with Java
Post by: Gan on May 18, 2009, 06:01:18 PM
Small change. The tutorials will be video tutorials with detailed instructions under the tutorial.


-Gandolf
Title: Re: [Java] Getting Started with Java
Post by: Gan on May 18, 2009, 06:41:10 PM
First tutorial is up, it's extremely small and simple. Though it's a good start.


-Gandolf
Title: Re: [Java] Getting Started with Java
Post by: Gan on May 29, 2009, 12:29:02 PM
Hey guys, 2 more tutorials posted. Ghost, if you're reading this; it would be wonderful it you could read my first post.


-Gandolf
Title: Re: [Java] Getting Started with Java
Post by: Gnome on May 29, 2009, 12:58:23 PM
almost impossible to read, please fix BBcodes, or HTML
Title: Re: [Java] Getting Started with Java
Post by: Gan on May 29, 2009, 01:01:01 PM
Ah well, it's in post ready form. I just need to have another post to paste half of it in and it will be entirely readable.


-Gandolf