Development of Naval Robocode(continued)

69 views
Skip to first unread message

colingh...@gmail.com

unread,
Feb 10, 2017, 6:52:16 AM2/10/17
to robocode-developers
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




Pavel Šavara

unread,
Feb 10, 2017, 7:01:24 AM2/10/17
to robocode-...@googlegroups.com
I looked at the latest commit and unfortunately there is copyrigt years fix in the same changeset. 

That makes it difficult to review. Could you please separate it into different commits ?

Thanks
Pavel

--

---
You received this message because you are subscribed to the Google Groups "robocode-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robocode-developers+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

colingh...@gmail.com

unread,
Mar 1, 2017, 3:55:26 AM3/1/17
to robocode-developers

Hello,

Yesterday I removed the year fixes and pushed it onto a different branch because I was kind of struggling to do it on the same branch.(https://github.com/colinheppener/robocode/tree/naval-robocode-workspace4)
I hope you can review it easier this way.
A couple of files sneaked into the commit that maybe should not be in there though(like some ".iml" files).

I would also like to apologize for the slow response, it was a busy couple of weeks because of the preparation for the event etc.

Kind regards,
Colin

colingh...@gmail.com

unread,
Apr 13, 2017, 5:39:54 AM4/13/17
to robocode-developers

Gentlemen,

After the missiles had been added to the game, we had an event to test them out.
The picture below is the group we did this event with.














It was a great success!
The thing about Robocode is, that it's a game where you have to know how to program(at least a little bit).
We wanted to make Robocode more suitable for people who don't!
So we created a visual programming interface which allows you to drag blocks instead of type code.
This was done by using Google's Blockly framework(licensed under Apache License, version 2.0(https://www.apache.org/licenses/LICENSE-2.0.html)).
This is a web-based framework, so we had an idea.
The idea was to create a little server which takes care of compiling and importing the generated(Blockly) ship for you.
Because of that, it became as simple as dragging some blocks, then clicking the publish button, and sinking all the other losers in the arena!
The server that handles that has a Java back end and uses the Vert.x framework(dual licensed under the Eclipse Public License 1.0 and Apache License 2.0)
So both Blockly and the Vert.x server are open source.
The server hosts the Blockly page as well.
This is an example of what it looks like

The page generates a java file which is saved as temp, after that its compiled during runtime by the server.
For more information about the server, check the README.md on the branch(https://github.com/colinheppener/robocode/tree/naval-robocode-workspace4)
and the README.txt in the Robocode_install folder on that branch(https://github.com/colinheppener/robocode/tree/naval-robocode-workspace4/Robocode_Install).
Or ask me of course.

My time as an intern at Thales is pretty much over (last day is tomorrow(Friday 14-4-2017). And I appreciate all of you for creating such an awesome game to work on.
Thank you and kind regards,
Colin



Auto Generated Inline Image 1
Auto Generated Inline Image 2
Reply all
Reply to author
Forward
0 new messages