Jump to content
Sign in to follow this  
stefanhendriks

Java?

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.

Share this post


Link to post
Share on other sites

You want to rebuild D2TM again?

To be honest, I don't mind how you do it, so long as

a) I don't have to redo all the graphics

b) we end up with a working game, and ideally...

c) that game is reasonably moddable

Share this post


Link to post
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 ;)

Share this post


Link to post
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 ;)

Share this post


Link to post
Share on other sites

Although I can in no way be counted as a person who can give valuable advice on programming issues, I think it's worth a try. Just compare the results and decide what's better :) It won't hurt anyway, will it?

Share this post


Link to post
Share on other sites

Does redoing in java mean that the java process will be running in background? Much like azureas uses java and the java process that is needed takes up 100+mb of ram when the program is running?

Share this post


Link to post
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!

Share this post


Link to post
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 ;)

Share this post


Link to post
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 . ;)

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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 ;)

Share this post


Link to post
Share on other sites

hi

planning to use java? but allegro is also cross-platform... just some minor changes and it can run on other platforms :) (no phones though)

but its up to you hehehe... just my 0.02

cheers

spekkio

Share this post


Link to post
Share on other sites

I have decided not to recode it in Java. So thats good news ;) Also, the experience with Java can be used in C++ anyway.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...