Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  which compiler (/IDE)?  (Read 10136 times)
0 Members and 1 Guest are viewing this topic.
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #30 - Posted 2009-08-24 15:04:52 »

I've been programming for well over 5 years. If you call that inexperienced I'd call you an idiot.

I love how everyone bandwaggons to jerk each other off about how harsh I am on someone who asked a stupid question. Please, don't let me stop your sweaty session of love, keep going.
I've been programming for over 12 years, and I'm plenty inexperienced. Once you're working with brilliant veteran programmers, you'll be surprised how inexperienced you feel.

See my work:
OTC Software
Offline fermixx

Senior Newbie





« Reply #31 - Posted 2009-08-25 19:36:03 »

The idea is that the JVM makes all optimizations when it runs in order to best optimize for the target machine. If you also start your game with -server you'll find it should run faster, but it'll take far longer to start up and I don't know if it's supported in the standard Java run times.


I heard something about HotSpot which makes intense optimization along with the JIT compiler (or something like that) which makes java to run at competitive speeds (compared to c++ for example)

So all that happens when the user plays my game but not when i compile it on my computer?

I think it should take some time to load then, coz it has to check some times the entire code before starting the app


so am i tellin pure bullshit or its something like that?

RTS game or a big rock-paper-sissors ?
Offline bienator

Senior Duke




OutOfCoffeeException


« Reply #32 - Posted 2009-08-25 20:13:52 »


I heard something about HotSpot which makes intense optimization along with the JIT compiler (or something like that) which makes java to run at competitive speeds (compared to c++ for example)

So all that happens when the user plays my game but not when i compile it on my computer?

I think it should take some time to load then, coz it has to check some times the entire code before starting the app
the application usually starts interpreted, while it is executing the vm collects information and starts earlier or later compiling hot sections of your application in a background thread. This is called mixed mode execution.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline JL235

JGO Coder


Medals: 10



« Reply #33 - Posted 2009-08-25 20:41:01 »

I heard something about HotSpot which makes intense optimization along with the JIT compiler (or something like that) which makes java to run at competitive speeds (compared to c++ for example)

So all that happens when the user plays my game but not when i compile it on my computer?
Yes. When you compile your code is only compiled to an intermediate bytecode, Java bytecode, which represents your program. When you run it the bytecode is first verified to ensure the app is correct and stable. For example that there are no branches that jump outside of a method. This ensures that if your app does crash, then it does so in a safe and managed way. It will interpret the bytecode when it is first run, but when the same code is run multiple times it is compiled behind the scenes to native code. Often when you do 'run this code 1 million times' types of benchmarks you'll find the first run is far worse then all others, I guess this is one reason why.

I've heard stories of HotSpot gathering information at run-time and using this to recompile sections later. For example to remove sections of the code that are never run. The fact that it is natively compiled with this extra information gives the theory that Java can outperform C, and does in certain benchmarks. Although in practice I don't find this to be true.

Java has always been known as having very slow start up time, but this has improved substantially over the last few years. However still the vast majority of interpreters and the apps built by various compilers start up in far less time. However I believe the main reason is because the Java API is compressed (and so the parts you use needs to be decompressed on each run), not because of the stuff above.

I think it should take some time to load then, coz it has to check some times the entire code before starting the app
Run a Java applet or a Java game on your desktop. Do you think the start up time is slow? Bear in mind that once you start adding sound effects, music, images, models and data files to your game it's own internal start up time will typically always be far slower then Java's.

Offline fermixx

Senior Newbie





« Reply #34 - Posted 2009-08-27 08:15:40 »

Run a Java applet or a Java game on your desktop. Do you think the start up time is slow?

Not that slow, but i was thinking what would happen with a way heavier app, like call of juarez 2 for example.

Or to avoid loading miscellaneous resources, think about math lab doing tons and tons of things in the cpu rathen in the hard drive. My main question was why to compile on the fly (while the app is running) instead of before it starts stressing the cpu. is this because of the famous "write once, run anywhere" policy?

RTS game or a big rock-paper-sissors ?
Offline JL235

JGO Coder


Medals: 10



« Reply #35 - Posted 2009-08-27 08:52:21 »

is this because of the famous "write once, run anywhere" policy?
Essentially. Plus even if you allowed it pre-compile, pre-compile for what? If you pre-compile on my machine then it might not take full advantage of yours or may not work at all.

Offline jezek2
« Reply #36 - Posted 2009-08-27 09:16:52 »

However I believe the main reason is because the Java API is compressed (and so the parts you use needs to be decompressed on each run), not because of the stuff above.

The biggest problem is disk seek time, JVM has to load many classes stored at different positions on disk, and disks are really slow when it comes to seek time. The classes are uncompressed (rt.jar).
Offline i30817

Junior Duke





« Reply #37 - Posted 2009-08-28 20:01:14 »

As soon as SSD's are mainstream (soon now) those startup times are history. NET supposedly has a cache for verified classes, but i'm not sure how it works.
Offline CyanPrime
« Reply #38 - Posted 2009-08-29 17:45:02 »

Please do not be insulting here at JGO
...
Once you enter the real world and get a real job with people who are actually smart to compare yourself against, then my comment will make sense to you.
I like where you tell me not to insult anyone than insult me a few lines down.
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #39 - Posted 2009-08-31 19:43:20 »

I like where you tell me not to insult anyone than insult me a few lines down.
Fair enough, I edited my text. I didn't mean to be insulting, but I understand my wording was not particularly nice. Apologies. What I meant by that was that comparing yourself to class mates (in high school or college) is typically a futile exercise, because most of them (in my experience) are not very driven and not very good at programming. Compared to my peers I was a know-it-all, but once I actually entered the work force I was immediately humbled by the massive amount my coworkers knew.

See my work:
OTC Software
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline CyanPrime
« Reply #40 - Posted 2009-08-31 21:29:41 »

Well I'm sorry I've been a jackass in this topic. I was actually having a very shitty day when I posted that first message, and than I got upset when people just wouldn't let it die.

Anyway, I'm sorry.


To be a little helpful I always felt that the IDE you choose normally comes down to personal preference. Just try 3-4 of them and find out which ones you like. I prefer J Creator myself.


Offline markmistry

Junior Duke





« Reply #41 - Posted 2009-09-07 13:36:56 »

I use notepad ++ for everything.
 ide's are for lazy ppl that dont like to type  Grin.
Im only jealous cause i dont know how to use them .lol
Offline fermixx

Senior Newbie





« Reply #42 - Posted 2009-09-07 20:31:35 »

ide's are for lazy ppl that dont like to type  Grin.

and for those who dont remember some things, and to have access to the javadocs.

oh and for fast and accurate error correction (and believe me, i have a lot of them Tongue)

RTS game or a big rock-paper-sissors ?
Offline SwampChicken
« Reply #43 - Posted 2009-09-07 21:39:48 »

IntelliJ IDEa 7.0.5 here.
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #44 - Posted 2009-09-08 00:44:50 »

I prefer (and use) NetBeans, but acknowledge that Eclipse is noticeably faster.
I find NetBeans is easier to use though.  If you aren't using an IDE then you are most certainly wasting a lot of your time in your editor.  In addition to the access to javadocs mentioned above, IDEs type most of your code for you and check your syntax and other errors on-the-fly.  They tell you what order the parameters are in for the method you are calling etc.  If you aren't using an IDE you must try them out until you find one that works well for you.  It will be worth the time invested.

Offline markmistry

Junior Duke





« Reply #45 - Posted 2009-09-08 15:19:36 »

i couldnt even figure out how to set up a project,
 too many big words and too many buttons that i have no idea what they are on about, i am great at figuring out what i did wrong when it comes to my program not working and i can normally tell if its not going to compile properly but i like to see what effect its going to have anyway..its the way i learn i guess.i will stick with notepad++  Smiley
Offline cylab

JGO Ninja


Medals: 52



« Reply #46 - Posted 2009-09-08 15:24:52 »

i couldnt even figure out how to set up a project,
ehrm... clicking [File]->[New Project] Huh

(...) its the way i learn i guess.i will stick with notepad++  Smiley
Nothing wrong with that, but the above was a cheap excuse Wink

Mathias - I Know What [you] Did Last Summer!
Offline fermixx

Senior Newbie





« Reply #47 - Posted 2009-09-09 06:50:59 »

its the way i learn i guess.i will stick with notepad++  Smiley

thats true. you'll learn a lot doing that.

my advice is that when you feel you learnt enough already, go and try out an ide and your coding will be speeded up a lot

---------------------------------------

By the way, im not using jbuilder, i sticked at netbeans. however, i dont like that it doesnt keep the original parameters name when i choose a function.

Lets say there is a fuction that is:   myFunction(int width, int height, String name, CertainObject myObject);

If i have something like this:

int myAge = 20;
int myWeight = 75;
String anUselessString = "";
this.myFunction(....);

as soon as i hit enter in myFunction (so it writes it for me), it automatically fills the function parameters with same type (not always) variables. In the case avobe:

int myAge = 20;
int myWeight = 75;
String anUselessString = "";
this.myFunction(myAge, myWeight, anUselessString, anObject);

Where anObject is something i declared way before (which nothing has to do with the function).

The problem is that i want to know what i need to put on each parameter, and myFunction(width, height, name, myObject)
gives me more information than (myAge, myWeight, anUselessString, anObject).



Another thing i dislike is that when i send wrong parameters to a constructor, it doesnt tell me which parameters i should send to it, it just says "i cannot find the symbol at ......." which is not really informative.

Then it has a couple of bugs not finding things that are just in front of it. for example i have all my classes in a folder called FC, then in my 10th class i added package FC and it keept telling me that it couldnt find the package. Deleting and re-copying the class fixed the problem.

RTS game or a big rock-paper-sissors ?
Offline cylab

JGO Ninja


Medals: 52



« Reply #48 - Posted 2009-09-09 08:27:07 »

The problem is that i want to know what i need to put on each parameter, and myFunction(width, height, name, myObject)
gives me more information than (myAge, myWeight, anUselessString, anObject).

Press STRG-P (or Menu: Source->Show Method Parameter) within the brackets of a method or constructor call. It will show up the available parameters and highlights the one needed at the current parameter position.


Another thing i dislike is that when i send wrong parameters to a constructor, it doesnt tell me which parameters i should send to it, it just says "i cannot find the symbol at ......." which is not really informative.

Hmm, the message is just from the java compiler. Don't know how to approve that. What does JBuilder do in this case?


Then it has a couple of bugs not finding things that are just in front of it. for example i have all my classes in a folder called FC, then in my 10th class i added package FC and it keept telling me that it couldnt find the package. Deleting and re-copying the class fixed the problem.

Make a clean build instead.

Mathias - I Know What [you] Did Last Summer!
Offline JL235

JGO Coder


Medals: 10



« Reply #49 - Posted 2009-09-09 11:34:35 »

If you go to the start of your function (I think just before the first parenthesis) and press ctrl+space it should bring up the auto-completion. There you can see the parameters for your function.

Clean & build errors are annoying, but typically they are rare (at least for me). After a while you used to it and naturally clean and build the moment anything odd happens.

Offline fermixx

Senior Newbie





« Reply #50 - Posted 2009-09-09 18:39:06 »

Press STRG-P (or Menu: Source->Show Method Parameter) within the brackets of a method or constructor call. It will show up the available parameters and highlights the one needed at the current parameter position.


Hmm, the message is just from the java compiler. Don't know how to approve that. What does JBuilder do in this case?

thanks for that hint, i'll try it out.
JBuilder used to told me:
expected : (int x, int whatever)
found :      (double x, String name)

anyways sometimes thats a problem because the constructors are overloaded, dunno which one it chooses (i think it chooses the most similar constructor parameters to what i've typed)


Make a clean build instead.

so for that is the clean build (the broom with the play or something like that?), i used it just to compile my source to a jar file Tongue. (by the way, jbuilder has a "refresh" function. never had to use it for this kind of bugs, its useful for example when you putted something inside a folder with the ide opened, so it does not find the resource till you press refresh)


thanks for the replies, guess you are some kind of netbeans experts Tongue

RTS game or a big rock-paper-sissors ?
Offline cylab

JGO Ninja


Medals: 52



« Reply #51 - Posted 2009-09-09 18:54:52 »

so for that is the clean build (the broom with the play or something like that?), i used it just to compile my source to a jar file Tongue. (by the way, jbuilder has a "refresh" function. never had to use it for this kind of bugs, its useful for example when you putted something inside a folder with the ide opened, so it does not find the resource till you press refresh)

Yes, its the broom with the hammer. Smiley

Mathias - I Know What [you] Did Last Summer!
Offline DzzD
« Reply #52 - Posted 2009-09-09 19:12:01 »

I love JCreator ! Smiley

somethig equivalent to Notepad++ but for Java

It's really stressing for me when I work with some peple using for example Maven+Netbeans and ask them to give me there project and see that they have not any idea of which JARs/librairies ther own project requiere ...

but anyways Netbeans seems very powerfull, maybe too much...

Offline bienator

Senior Duke




OutOfCoffeeException


« Reply #53 - Posted 2009-09-09 19:49:22 »

had to use it for this kind of bugs, its useful for example when you putted something inside a folder with the ide opened, so it does not find the resource till you press refresh
you don't have to do this in NetBeans. It discovers files automatically. (btw: to reduce the load on your F5 key you can teach eclipse to auto refresh too... the option is somewhere hidden in preferences)

Offline fermixx

Senior Newbie





« Reply #54 - Posted 2009-09-10 20:20:30 »

you don't have to do this in NetBeans. It discovers files automatically. (btw: to reduce the load on your F5 key you can teach eclipse to auto refresh too... the option is somewhere hidden in preferences)

yeah, i spent like 5 minutes in the preferences in jbuilder, but it was too complex. It scared me at the point of not wanting to take a look at netbeans properties. Sometimes they make it so complex (/complete) that its hard to do/see the easy part.

Guys developing ide's should take a read from time to time at the minimalistic concept (minimize to maximize)

RTS game or a big rock-paper-sissors ?
Pages: 1 [2]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (39 views)
2014-10-17 03:59:02

Norakomi (30 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (28 views)
2014-10-15 16:18:58

TehJavaDev (57 views)
2014-10-14 00:39:48

TehJavaDev (58 views)
2014-10-14 00:35:47

TehJavaDev (48 views)
2014-10-14 00:32:37

BurntPizza (64 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (78 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!