3 x Blah was asking for tutorials in another thread. This is one I wrote a while back. I did a quick Composer job on the text so the html isn't so great and of course IE messes with the fixed width tags so the source looks screwy on IE.

Its all AWT and applets. It assumes the user already knows some java. It was intended as a starting point to java gamedev. It includes source and an example applet.

Its way out of date now, both with java and my own skills. So feel free to critique it and make suggestions.

Seems pretty good actually. Apart from some omissions - like explaining why you overrode update(): the para looks self-contradicting without the explanation. Also some errors (stuff which I suspect you probably understand better now if you were rewriting this).

Would you (or someone else who's been doing applet coding recently) consider updating this a bit, making a few corrections, and then I'll put it on JGF.

Which makes me realise: if I'm going to post articles on JGF, I need a pool of volunteer article-reviewers, who can quickly read through them before they get published, and check for places where things are incorrectly described, or something is done wrong.

E.g. in a swing tutorial, if I saw *any* use of

1

paint( GraphicsG )

I know it's wrong (unless there's a para explaining why the author is breaking Swing deliberately - for Swing, you're always supposed to use paintComponent( Graphics g ) where in AWT you would have used paint(...)).

I can do this kind of review myself for a considerable number of the libraries, but there are big areas where I wouldn't recognize such mistakes (especially with any of the techs I don't use, like ODE).

Reviewing articles is a LOT less work than writing them (by a factor of about 10-20) but is equally helpful in getting articles on the web for other peopl to use. So, if you have the skills but not the time for writing articles, please could you help with this? Email me or message me, saying what areas (e.g. "swing, JOGL, OpenGL") you feel capable of reviewing articles for.

I thought about converting the tutorial and example code to a JApplet using a canvas + bufferstrategy. No problem there. But what stopped me was the loading images bit; to preserve transparency I use the image loader class from the wiki and I didn't want to 'steal' the code and put it in the tutorial.

I thought about converting the tutorial and example code to a JApplet using a canvas + bufferstrategy.

Have you done much with JApplets? Last time I did anything graphics intensive, I found 1.4.x was brkoen (probably 1.4.1) and couldn't handle JApplet's properly on any platform, and I don't recall if the bug has been fixed yet (it was semi-repeatable: a race conditoin would cause JApplet's sometimes to initialise with an invalid Graphics. The whole applet would run fine, but without any graphics, and there was no way of getting the graphics to come to life wihtout restarting appletviewer / plugin).

To get transparency you have to save the transparent color with the image like in a gif.

I use Microsoft Paint that comes with windows. The version of paint I have on this computer won't save a transparent gif or png, so I draw with ms paint and then i use the the free program irfranview to load the image save it with a trans color.

You could use any image program though, like gimp, photoshop, paintshop pro etc...

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