Hello,
Considering this is the Naval Robocode Developers group, I thought it would be more appropriate to post here instead.
The previous post i made was on the normal Robocode group(
https://groups.google.com/forum/#!topic/robocode/ew_59OUJajc).
I am having great fun working on implementing new features for Naval Robocode. At the start it was a little hard for me to get the grasp of how robocode works.
But after that you start to realize it's put together really well.
The missiles I implemented work a lot like bullets, but create a blast radius and detonate after a certain distance or impact with another object(except mines).
Because there is a lot of similarity in the Missile and Bullet classes, I created a Projectile class to inherit from to reduce the amount of duplicate code.
The scoring and ranking etc. has also been expanded with missiles.
I added a list at the bottom of this post with the added files regarding missiles, I won't list all the modified files.
The tests run again as well, there is no more need for the '
-DskipTests=true' argument.I also noticed that the performance on some machines became alot worse when View Scans was enabled.
I also removed the checking for version trough the internet because it kept giving an exception when I had no direct internet connection.
The Graphics2d.fill method was using alot of resources with View Scans enabled. However, on my machine this was fixed by adding the
JVM Argument '
-Dsun.java2d.opengl=true' to the 'naval-robocode.sh' file, or in the custom run configuration.
Apparently it wasn't enabled by default(might be the case for other machines too).
Since I'm working on the company's computers it was a little more difficult to fork and create a new branch, since there is no direct internet connection.
I have forked the repository now and created my own branch on my GitHub repository(
https://github.com/colinheppener/robocode/tree/naval-robocode-workspace3).This branch is based on naval-robocode-workspace2, but I re-based it to the master branch when I started.
Do I have to create a Pull Request now, or how do you want me to continue?
By the way, next Wednesday(15-02-2017) we will have an event among colleagues to test out the new features in Naval Robocode! So far there is a lot of interest.
Any form of feedback or comments is greatly appreciated.
Kind regards,
Colin
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Added files:
robocode.api/src/main/java/robocode/AdvancedShip.java
BulletHitMissileEvent.java
HitByMissileEvent.java
Missile.java
MissileHitEvent.java
MissileHitMissileEvent.java
MissileMissedEvent.java
Projectile.java
ScannedMissileEvent.java
robocode.battle/battle/peer/
ProjectilePeer.java
MissilePeer.java
MissileSnapshot.java
robocode.core/src/main/java/net/sf/robocode/peer
MissileCommand.java
MissileCommandShip.java
MissileStatus.java
robocode.samples/src/main/java/navalsample
MissileDetecter.java
MissileShip.java