Jump to content

Java?


stefanhendriks

Recommended Posts

Ok, so here i am, working all day with Java , Servlets, JSP, etc. I am learning and going to do a course Java Certified Programmer. I also looked at the d2tm source and thought "wow, i have learned so much already, this can be done better.. again ;)". Its an ongoing process ofcourse.

So a little idea began to develop, would it be possible to do a dune 2 game in Java? perhaps. I wonder how you think about that. Like, would you vision it as an applet and battle against someone? Or do you think this whole Java thing is just too much of an hassle (you have to download the runtime environment only). The benefit is though that it is multi-os and the performance is ok (afaik). I don't know about any graphical fancystuff you can do, i did not even began to research that, i DO know you can do stuff with OpenGL so if that is possible, i think a lot is possible.

Let me know what you think.

Link to comment
Share on other sites

Me what i would like is you to finish that one complety first...Then if you want a java version then it's okay.

But i will realy like that you finish that version now that version is stall in the last version for a while now.. a new version will be nice ;)

Link to comment
Share on other sites

To be honest, i don't know if i will redo D2TM in Java.

Java is highly OOP oriented. And ofcourse i want it to be highly modable. If done right i think writing a game like this in Java is going to be more efficient and more easy in Java. A lot of bugs (due memory management) will not happen because Java takes care of it. And, its more OS oriented since it will work on all OS's. It also has a built-in networking library which i already tried at my work (i wrote a very little MSN like thingy).

I will investigate this possibility, but perhaps some people have experience with it and would like to share so i can form a better opinion.

Since i will be following a course to a Certified Java Programmer, i thought i could perhaps do this together, so i can get more skill and take the course at once. Also, D2TM will be open source then.

@ Nema:

a) no way! :) the only possibility COULD be that the shadows will NOT be blended, but even that is highly uncertain.

b) thats the point

c) it should be highly modable in the end, ofcourse ;)

Link to comment
Share on other sites

Java is excelent for gestion programming(in buisness uses). But it's really not appropriate for game.

It's heavy on the system and memory, need plugins.

C++ is really adapted to game programming and way more powerful. The manadgement of memory is the key to performance, try to improve you skill in this domain and you will be impress with the gain's you can obtain. Also in c++ you can break incapsulation rules more easely if the needs are there.

All the knoledge you learned in java will be easly transferable to c++. I learned java and when i came to c++, i just realysed the power of it!

ps can't wait to see some new beta of d2tm to test out :P I'm missing the crazy progress you made since last winter!

Link to comment
Share on other sites

I perfectly see what you mean The_Beast. You're right, C/C++ is way more powerful because of the lack of memory management and allowing a lot of stuff with pointers which you cannot do in Java.

Using a Java based game means indeed that you have to use its VM which takes about 100MB of memory. I never really realised that, basicly at my work the machines have atleast 2GB of ram and a 3GHZ CPU so everything goes smooth as buter.

I think i will stick at C, but i will surely rewrite a lot of parts just because of the uglyness i see now.

About the progress last winter, that was because mainly i had a lot of spare time. I lack that now, but now when holidays end i can probably get myself some free evenings (my gf goes to school then hehe). Also, the macbook runs Windows perfectly and i already transform stuff to it. D2TM runs VERY well on this laptop, around 1300 FPS ;)

Link to comment
Share on other sites

Tiny update. I am recoding my INI loader now. It is very old (dating from 2002 or something). It totally lacks any OOing architecture, etc.  I do miss Java here now. I am not sure if i will stick to C++ anyway. But we'll see, i also find it kind of hard to start over AGAIN . ;)

Link to comment
Share on other sites

I am a java-programmer and I can recommend java or c# for a rts like "dune 2".

The advantage is that you can bug-fix it more easily and that java (or c#) are much more robust then c or c++ where memory leaks can easily happen.  So if designed well (learn about design-patterns) a java program is easy to maintain.

Another advantage is that you are not limited to an OS, as long as java is installed.  So "dune 2" could even run on a smart-phone.

And I think there is a greater chance of people helping you, because java is quite popular.  If you want to port "dune 2" to java, I'd advise using sourceforge for community-programming.

Another great thing about java is that you can use java-webstart, which allows for online-updating.

Link to comment
Share on other sites

As far as I know, you could use OpenGL to display framebuffer style.

You write an entire screen to a piece of memory, and after that, you tell openGL to display that piece of memory.

Java will be a lot slower though. Might not be the biggest issue in the world, but for smart phones and such ("slow" systems) I doubt it'll work out.

Link to comment
Share on other sites

For the Java programmers around us, what graphical lib is adviced? i have seen some, but there must be some kind of generic/good one which is easy to use on other OS's.

I am still doubting, you can do a lot of stuff way more powerful in C++. But Java is also good learning practice for me with the upcoming Java Certified Programmer course. So i might do that anyway, just for practice, write a dune 2 game in Java ;)

Link to comment
Share on other sites

  • 2 weeks later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...