Java - tutorials done but request advice

Gday

Background -
I have had minor programming exposure (through turbo pascal at school, to a bit of self taught C++ over a few months) and now working on Java (which I was taught a bit of a while ago but cannot remember anything worthwhile now!)
I started a bit of an ascii game in turbo pascal at school which involved the character as an arrow moving around the screen from reading arrow keys, having random encounters and getting exp etc. (standard RPG fare) It also incoroprated an ascii castle central to the screen and staus bar at the bottom.
Encounters and castle entry involved clearing the screen and replacing with a menu, scrolling again by an arrow highlighting menu choices and getting the key pressed to move up/down etc. (done by clearing the screen and redrawing with the arrow next to the new selection)

6 months ago I tried to make this in C++ with a basic amount of success (noting the potential of object oriented programming!) however when I encountered obstacles and asked for help, I didnt get much as most people recommended I attempt something different or pursued the ascii format using another language.

After a break of 6 months, I am back again, trying with Java this time. I am starting from the beginning with the plan of getting a better overall base before jumping in. Whilst the overall motivation is to ressurect this game, I am keen to expand overall knowledge and may pass over the old game completely.
I am leaning towards java again because it seems to offer easy flexibility for graphics over C++ (I remember being able to make a picture move around a screen after not too much time last time I tried Java) as well as applets etc.

Ok - Background done (I appreciate your patience if you are still with me!)
A few things I am struggling with at the moment - Despite designing stuff primarly for ascii/console I am not really keen to use console for compiling etc. and I always try to use an editing/compiling program. I am currently using NETBEANS which definitely has some strong pros however:
I cannot work out how to make standalone class files as they all seem to be forced into a package (which i have not even encountered in my beginners tutorial hunt yet). This has also somehow resulted in an error when I try to run the compiled class files from the command prompt (compiles fine in NETBEANS though)
Dev-CPP is what I use for C++, which is working quite well.

Q1 - What is the best software to use as far as a compiler/editor etc. goes? (java)
Q2 - Is it possible to make a .jar file that will run in a console window? Eg. hello world?
Q3 - If anyone is happy to look at the C++ code from the game (next post) - comments are much appreciated!
NB: I have posted this on a few forums as I am interested in as wide a view range as possible, apologies if this is not the 'done' thing.

Cheers,

M

Comments

  • Q1: I say net beans is good because you can compile your project in that and it'll go smoothly.

    Q2: All you have to do is pick the Clean & Build option from the toolbar and it will create a jar in the project folder wherever you saved it and then you can either run it by clicking on it or bringing up CMD and cding to your desktop or wherever the jar is and then typing java -jar Game.jar and it will run.

    Q3: no response as I don't do C++.
  • Q1: I say net beans is good because you can compile your project in that and it'll go smoothly.

    Q2: All you have to do is pick the Clean & Build option from the toolbar and it will create a jar in the project folder wherever you saved it and then you can either run it by clicking on it or bringing up CMD and cding to your desktop or wherever the jar is and then typing java -jar Game.jar and it will run.

    Q3: no response as I don't do C++.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion