Talk:SuperWalls
Hi, question: What if SuperWalls first fire with HeadOn, then the next shot fire with LT, then HOT hit, but it will increase the rating of LT? » Nat | Talk » 17:47, 1 March 2009 (UTC)
Problem: If you use LT, but enemy energy is 8, your robot will fire at 2, but the code calculate using power 3 bullet! » Nat | Talk » 17:49, 1 March 2009 (UTC)
Well, I realized that that could happen, but I thought that it was a small enough problem that it wouldn't matter much. If the ratings for the two guns are close enough that it is switching on every shot, it means that the two guns are close enough in rating that which gun you use would not matter very much. About the bulletpower, thanks for pointing that out. I'll correct that--CrazyBassoonist 18:18, 1 March 2009 (UTC)
Okay, It's changed.(I didn't test the code change, I just assumed it would work. I hope it does.) I am also thinking about changing the movement to involve changing directions some, as it would still be incredibly easy to beat with simple linear targeting--CrazyBassoonist 18:25, 1 March 2009 (UTC)
That still incorrect, the bullet speed is calculated by 20 - 3 * power, not the power itself. And, 16 / 4 = 4!?! can you fire with bullet power of 4? » Nat | Talk » 18:26, 1 March 2009 (UTC)
More note, the shot/hit should be int/long instead of double! It execute faster, but when you calculate the rating, you should cast them to double, like (double)hit / shot
. And, the AdvancedRobot lost energy when hit the wall so... » Nat | Talk » 18:29, 1 March 2009 (UTC)
About changing the direction, every time the enemy fire is good ideas! Not very much of people use head fake targeting :) » Nat | Talk » 18:32, 1 March 2009 (UTC)
Ok, I'll work on that. About changing the direction, I think that changing it every single time they fire would be bad because SuperWalls would mostly stay in a small area and be vulnerable to Head-On Targeting. Rather, I might give it a random chance of changing direction every time they fire--CrazyBassoonist 18:38, 1 March 2009 (UTC)
I've clean the code up for you =D » Nat | Talk » 18:41, 1 March 2009 (UTC)
Nat, I changed part of the code back because for some reason it was only using the linear targeting gun--CrazyBassoonist 19:42, 1 March 2009 (UTC)
UPDATED: It now use both gun, I've found the mistake. » Nat | Talk »
Now the movement code moves at a constant speed too and does not change direction (Although it does do a good job of avoiding walls)--CrazyBassoonist 19:54, 1 March 2009 (UTC)
OK, now it change direction. (it doesn't good in avoid wall anymore.) » Nat | Talk » 19:58, 1 March 2009 (UTC)
Update again, a LOT more harder to hit and better direction invert. Now move at random velocity. » Nat | Talk » 20:03, 1 March 2009 (UTC)
The purpose for having it change speed the way it was was to make it so that it couldn't be easily targeted by simple targeting, but very easily targeted by more advanced targeting--CrazyBassoonist 20:16, 1 March 2009 (UTC)
Still advanced targeting hit easily! My Ocnirp almost get 100% hit rate! But, do you accept my code for now? » Nat | Talk » 20:20, 1 March 2009 (UTC)
I believe I found a way to make it avoid walls and still move in a pattern, still debugging though--CrazyBassoonist 20:48, 1 March 2009 (UTC)
Okay, well I have run into a strange bug which is preventing me from working on it at all. My idea was to bump into the wall once, then tell the robot to move ahead(getBattleFieldHeight()/10) and after moving that much 9 times, turn. But I guess we should just keep your code--CrazyBassoonist 21:05, 1 March 2009 (UTC)
- [View source↑]
- [History↑]
You cannot post new threads to this discussion page because it has been protected from new threads, or you do not currently have permission to edit.