Ozzie's Java pagesSad though I am, I quite enjoy a bit of Java programming in my spare time. One of my favourite time sinks over the last few months has been Robocode. Robocode is a robot combat game where programmers compete to create the most intelligent fighting robot using their own Java classes. Although I've played with Java on and off over the last few years and I've formally studied it as part of my IT degree, my knowledge is fairly rudimentary compared to a day-in day-out programmer. This game is an excellent way of sharpening up your Java skills - trust me. My own experiments with this game have been fairly basic, but I have been able to figure out some simple algorithms for features like predictive firing etc. on my own. I won't post my own 'bots here, as the embarrassment would kill me, although I am intending to put down some of the basic tips that I have picked up and figured out along the way. Tip 1Brush up on your trigonometry and the use of Math.sin and Math.cos within the Java library. Using these two methods you can calculate the x, y coordinates of a point using an angle and a distance. Below is a simple example of this in use: /**
Teach Yourself Trigonometry (Teach Yourself) Ozzie's appletsI do also create my own applets and other Java programs to serve specific needs. My current development project is a charting tool for Web pages as shown below. You can find out more about it on the Khartz page. Recommended readingThere are several books that I would recommend to get you going with Java. Book 1:Core Java 2: Fundamentals (The Sun Microsystems Press Java Series)
Book2:Core Java 2: Advanced Features (The Java Series) Book3: Effective Java: Programming Language Guide (AW Java Series) Book3:Java in a Nutshell |
Search
RobocodeKhartzChart | |
|
© Austin Warren 2001-2004
|
||