Duel Board - Free multiplayer online games

Duel Board => Questions => Topic started by: BladeSabre on June 16, 2005, 01:02:33 PM

Title: Java
Post by: BladeSabre on June 16, 2005, 01:02:33 PM
Well matlu, you offered to help me with my Java programming (dangerous ;)), so would you be happy to talk about it on the board where we have "code" tags, or would you prefer email? I'm not going to ask much about how to make things work, because that's all research and trial-and-error and practice. But the only tutorial I could find for what I wanted to do is ancient, and a lot of it doesn't seem quite right any more. So I'd like to try and kick as many as possible of the "bad and wrong" things before they become habits.
Title: Re: Java
Post by: matlu on June 16, 2005, 02:23:19 PM
Oh, more competition :)

You can start with discussing it here, and if it becomes too technical (or too uninteresting for other people) we can switch to email.

Btw if you want to see some existing and (hopefully) working source code (of anything, in any programming language, including multiplayer games in java), then try www.sourceforge.net
Till one year ago they had very nice "advanced search" feature, but they made it paid service, and now it's not so easy to find what are you looking for (with only "basic search") but it's still very useful
Title: Re: Java
Post by: exiledragon on June 16, 2005, 02:45:40 PM
I would be very interested in listening in if you posted instead of email  :P
Title: Re: Java
Post by: BladeSabre on June 16, 2005, 03:48:15 PM
I don't suppose it would get very technical for a while. I've had a look for other people's open source Java games, and those have all been a bit technical for me so far. That other forum you linked has a newbie section, which might be more useful - I wonder why I didn't find that in my searches?

Before I post anything I'll need to wait for my brother to come home so I can borrow his USB key and fetch some bits of code off my laptop. A rather unsatisfactory arrangement - I should buy one of my own. In some ways I would rather have a floppy drive though, because it's good for backups...

(Edited to add) Hmm, looks like the info is mostly out there already now it's been pointed out to me, maybe I be back later, after doing quite a lot more reading.
Title: Re: Java
Post by: BladeSabre on June 17, 2005, 11:21:29 AM
Hey, I got the beginnings of my breakout game working. At least, it's working for me, although the sound is a little temperamental. So the next question is, does it work for anyone else?

http://www.geocities.com/bladethecoder/batball.htm

If any of you here want to try it, please let me know how well it's working for you.
Title: Re: Java
Post by: matlu on June 17, 2005, 11:31:59 AM
Works great :) Odin will be  happy :) (he seems to be fanatic arcanoid player :p )

<edit> fixed typo
Title: Re: Java
Post by: BladeSabre on June 17, 2005, 12:54:11 PM
Next I need to implement levels, scoring and power-ups ;).
Title: Re: Java
Post by: Odin on June 18, 2005, 03:51:40 AM
I got the wondrous "load: class BatBall not found" error when I tried. Thanks for the link Blitz!
Title: Re: Java
Post by: matlu on June 18, 2005, 12:37:27 PM
Quote from: Odin on June 18, 2005, 03:51:40 AM
I got the wondrous "load: class BatBall not found" error when I tried. Thanks for the link Blitz!

=> BladeSabre - WELCOME to Java world  ;)  Many people still run Windows 98 with 1.1 Java from Microsoft (or maybe newer Windows but with very old Java), and your game just isn't Java 1.1  friendly.
So if you want to stick to java-applet-game programming you can either:
- use very SLOW and OBSOLETE techniques (that's what I'm doing)
OR
- use nice, modern and fast features, but at least 50% of people won't be able to run your game


good luck with your choice :p
Title: Re: Java
Post by: BladeSabre on June 18, 2005, 12:50:43 PM
Yeah, I'd read something about that. At university though they taught us on Java 1.5, because they wanted us to be ahead of the times, and they said that we would need to make stuff Java 1.4 compatible for most people to be able to use it.

For every other plugin on the planet, users are expected to upgrade their plugin when a new version comes out. But with Java, the programmer is expected to carry on using the old version?
Title: Re: Java
Post by: BladeSabre on June 18, 2005, 12:58:45 PM
Hey everyone, go to http://java.com/ and install Java 1.5.0 to help make the world a better place!
Title: Re: Java
Post by: Odin on June 18, 2005, 10:30:48 PM
As much as I dislike Microsoft, I hate Sun's version of Java more (even my brothers notice it is much slower - at least when they try rs hehe. Another good reason to have left a looong time ago). Aside from that, I don't use Java enough to make it worthwhile. Same with flash where I refuse to upgrade to 8 or whatever they are pimping out. Still using the version that came with xp unless someone else upgrades it.  :)

P.S. I would only end up installing Sun Java and then uninstalling it after using it for like 5 minutes or however long. Some people don't notice the differences in performance, but I do and am overly critical of it. Maybe on the "professional" version it is better though.
Title: Re: Java
Post by: matlu on June 18, 2005, 11:36:54 PM
It's a bit complicated thing but you are right - sad but true - microsoft's java is faster when you play runescape, or other games which are designed for "old" java.
Title: Re: Java
Post by: BladeSabre on June 18, 2005, 11:46:09 PM
For a good while this computer had Firefox with Sun Java 1.4 and Internet Explorer with MS Java 1.1: I could even have both open at the same time. So it's quite feasible to get the best of both worlds, if you wanted to. I get that you don't use Java enough to make it worth the effort though.

So, I have a decision to make. Is there anywhere I could still get a version of the Sun compiler that goes back to 1.1? I've got the 1.5 version, and it will only compile back as far as 1.2.
Title: Re: Java
Post by: matlu on June 19, 2005, 12:38:33 AM
What compiler/ide are you using? I would suggest to use Eclipse (www.eclipse.org)
Title: Re: Java
Post by: BladeSabre on June 19, 2005, 02:16:24 PM
I don't like using an IDE. I'm using the Sun compiler "javac" with the text editor "SciTE".
Title: Re: Java
Post by: matlu on June 19, 2005, 02:37:47 PM
Quote from: BladeSabre on June 19, 2005, 02:16:24 PM
I don't like using an IDE. I'm using the Sun compiler "javac" with the text editor "SciTE".

If you still have this 350Mhz computer it's probably best solution. But as soon as you upgrade, you should definitelly switch to Eclipse.
Title: Re: Java
Post by: BladeSabre on June 19, 2005, 02:42:40 PM
Why do you say that? (Oh yes, I use GNU Make too, to build my projects.)

Regarding Microsoft Java, is 1.1 only a Windows 98 thing, or did they never update it?

(Edited to add) Ok, a little bit of reasearch is the thing. Straight from Microsoft's web site:

QuoteRecognizing the need to provide a smooth transition for current users of the Microsoft® Java Virtual Machine (MSJVM), Sun Microsystems and Microsoft have agreed to extend Microsoft's license to use Sun's Java source code and compatibility test suites. This extension allows Microsoft to support the MSJVM until December 31, 2007, providing customers with the ability to transition from the MSJVM on a schedule and plan that is most effective for them.

The MSJVM will reach its end of life on December 31, 2007. Customers are encouraged to take proactive measures to stay informed about obsolete software and move away from the MSJVM in a timely fashion. The MSJVM is no longer available for distribution from Microsoft and there will be no enhancements to the MSJVM. Microsoft products and SKUs currently including the MSJVM will continue to be retired or replaced by versions not containing the MSJVM on a schedule to be announced.
Title: Re: Java
Post by: matlu on June 19, 2005, 02:54:38 PM
Quote from: BladeSabre on June 19, 2005, 02:42:40 PM
Why do you say that? (Oh yes, I use GNU Make too, to build my projects.)
Blade, that is without discussion. I don't know how to explain it. It has many features which will make your programming MUCH more easier and MUCH more effective. I'm serious.

It is a TOOL, and people make tools to get things easier. You are trying to dig a hole for swimming pool with your hands and one shovel, while there is big-machine-I-don't-know-how-it's-called  standing next to you for free.

Quote
Regarding Microsoft Java, is 1.1 only a Windows 98 thing, or did they never update it?
never updated. If you want to install it, I can upload it somewhere it's 5mb. It has no problem to live in peace together with sun's java, you can anytime switch which one you wish to use. (And runescape will run bit faster)
Title: Re: Java
Post by: BladeSabre on June 19, 2005, 03:16:19 PM
I recall at university they said that for making windowed applications it's helpful to have one of the tools that writes most of your user interface code for you. (Though they wanted us to learn how to do it by hand first, for the sake of our education. They started us off on javac and Emacs on Linux, and said that we should stick to that for one full term, and then we could switch to whatever we liked once we had the groundwork down solid and began to feel the need for better tools.) Similarly, one of the reasons I am reluctant to develop for 1.1 is that learning obsolete techniques might interfere with my course.

I used the Dev-C++ IDE when I started developing in C (it's supposed to be good for beginners) and I hated it. Then I found out that I could run GCC/MinGW from the command line, and use a separate text editor, and I felt so much more free with it, it was just so much easier to understand. And Make was the finishing touch, when my projects started to get bigger than one source file.

If you've got the installer for MSJVM then I would appreciate a copy of that - it would be nice to get RS behaving properly again. I don't suppose the folk here would let me intall it on the good computer, but RS worked fine on the 450Mhz machine until someone upgraded the Java on IE. We had Mozilla for that...
(It's a good thing to have a copy of in storage anyway.)
Title: Re: Java
Post by: matlu on June 19, 2005, 04:28:34 PM
www.duelboard.com/getjava  :D
Title: Re: Java
Post by: BladeSabre on June 19, 2005, 04:42:29 PM
Thanks.

I found the Sun JDK 1.2 on their web site after much wandering back and forth, and it does compile back to 1.1. If I decided to develop for 1.1 though, I'd have to give up a number of the things I've already learned, and learn the old ways instead. And as in the passage I quoted, MSJVM is dying. It is no longer supplied in any of Microsoft's new software, and it's not available on their website. So in a couple more years it will be gone from this world. Maybe I can wait.

And I downloaded Eclipse. I'll give it a try at some point, and see what I think.
Title: Re: Java
Post by: BladeSabre on July 07, 2005, 04:28:00 PM
Well, I found myself somewhat disheartened by this, even though there's little reason to be. I've got a book about Java 1.1 that my brother bought from a junk sale for 1% of its published price, and it would probably benefit me to work through it. And I can still develop games using Java 1.4, because the world will catch up in a couple of years. I just have this dreadful need to show things to people :(

Anyway, it's very nice to have RS working properly again. Eclipse isn't working, however, and I've looked into the "known issues" and they don't seem to help. I don't think it really matters until I'm looking at "bigger" projects though.

What was that book about game programming, which you mentioned on some other thread? I might look into it.
Title: Re: Java
Post by: matlu on July 07, 2005, 05:33:26 PM
QuoteWhat was that book about game programming, which you mentioned on some other thread? I might look into it.
the one I mentioned was "Black art of java game programming", though it's sure quite outdated. There exist many similar newer books, just try to search for keywords like "java", "game", "programming", "book" and you will find plenty of them :)

QuoteEclipse isn't working, however, and I've looked into the "known issues" and they don't seem to help.
that's really strange. I guess it needs java 1.4 installed (not sure but probably it asks for it during instalation), but I think you have it. Don't know, I never had problem with making it running.
Title: Re: Java
Post by: BladeSabre on July 07, 2005, 07:42:10 PM
After some research, it looks to me like that one is probably the best available. (And it still comes up first on Google ;).)

"Cutting-Edge Java Game Programming" has been said to be good for experienced people, but it's probably too advanced for me at the moment.