Yesterday, for a change, I spent the entre day learning about Java because I want to incorporate some of it into a final project. I downloaded it from here:
I read a few sections of this:
then, "myfirstjava.java" and "myfirstjava.class" are the file and compiler for a tester "hello world" thing that I did get to work before trying to make a game. However I'll need to remove those if I run the whole folder for the game! Anyway...
I just jumped in and followed a tutorial that created a game. Got most of the way through- I have several questions I'd like to ask, I'd like to try and get the thing running even though I'm not using Eclipes, the preferred editor for Java. I'm using atom. I have three major questions about it- if these questions can be answered I think the thing will work, with some review.
I know (from my brief time in the C tutorial) that in C you need to create a header file, link it to each individual file, then compile them all together. It seems like java is halfway between C and higher level languages. I don't know if I need to run the entire folder and all of its objects, to get individual objects to work, or not, and not sure how to try that yet. will keep messing around with it.
The guy in this tutorial is doing things at the head of each file that I just don't understand, although there is definitely a pattern that is easy enough to see. I'm not sure what information is being put in on the spot and what is being imported, and how that works. So I'm not grabbing the info I need to make this work. I've tried looking up what "public, private, public-private" class stuff means but its a bit over my head.
Finally, there are several moments in the tutorial where he is creating an object and he hovers over a variable name and he creates something called a "private static final long serialversionid" with his editor and I don't know how to do that outside of eclipes or what that does exactly. I tried following the link below to figure it out, but did not particularly understand the explanations, will keep trying;
I wrote notes about it in the window.java file, like indicated specifically what the problem is if you wanted to see it. Otherwise I understand what is happening here, a window is being created sort of like in python, the dimensions set etc- so its a matter of making the thing appear.
and here are the links to the two game tutorials I followed:
all of part one:
and half of part 2:
|Game.java||Tue Dec 05 2023 08:33 am||2.7K|
|GameObject.java||Tue Dec 05 2023 08:33 am||594B|
|Handler.java||Tue Dec 05 2023 08:33 am||281B|
|ID.java||Tue Dec 05 2023 08:33 am||240B|
|Window.java||Tue Dec 05 2023 08:33 am||839B|
|myFirstJava.class||Tue Dec 05 2023 08:33 am||476B|
|myFirstJava.java||Tue Dec 05 2023 08:33 am||228B|