Code mods

Jump to navigation Jump to search

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

Return to Thread:Talk:Épéeist/Code mods/reply (6).

Think I'll go with Yatagan, I'll package when I get home. Although I found a bug in the one optimization I did, so I'm going to have to find something else to shrink, it is at 251.

Skilgannon13:33, 20 March 2013

I might've found something to shrink. Here it is:

Change the chancesOfReversing to 30, 15, and 0; and then, change this line from:

direction *= (chancesOfReversing.charAt(deathCount) - (2 * Math.random()));

to:

direction *= (chancesOfReversing.charAt(deathCount) / integer - Math.random());

I didn't compile, so I don't know if it will work.

Sheldor13:53, 20 March 2013
 

That will be integer division, so won't give fractional results. I'll find something though.

Skilgannon14:13, 20 March 2013
 

One byte down, one to go!

Skilgannon16:27, 20 March 2013
 

I made a little breakthrough, and now have 4 more bytes to play with. So, is it worth changing the bullet power to 3 if I can add back setAdjustGunForRobotTurn() ? Or is there something else I should go for? I need bullet velocities to be in integers, so bullet powers of 2, 2.333333, 2.666666 or 3 are the options. I don't have much experience for making these kind of judgement calls in nanoland =)

Skilgannon20:03, 20 March 2013

Awesome!!!

Power 3's are fine, especially since the distancing is so aggressive. Though, if you're not worried about rambots, 2.667 might be a better general purpose bullet power.

Getting the setAdjustGunForRobotTurn(true); back is low-priority, but if you can fit it, go ahead. On my compiler, setAdjustGunForRobotTurn(true); costs 5 bytes, not 4. If it doesn't fit, we can save a byte by switching the constant in the energy monitoring code from 1.09 to 1, though it would be slightly less accurate. I forgot to mention that earlier. Oops.

Sheldor21:02, 20 March 2013
 

Turns out that version also had a bug, but it is up now, bullet power 2.66666 and 247 bytes, just need to wait for results. I also noticed that the LiteRumble hasn't properly stabilised the nanorumble, so we'll need to wait for that to happen too. I re-enabled priority battles for all of the rumbles (it was off for the nanos, micros and minis), it seems that my 'it will give them all battles' theory didn't mesh with a lossy 'eventually correct' implementation.

Skilgannon21:08, 20 March 2013

FYI I have a client running, but it lacks a bunch of bots with broken URLs on the participants list. One of us should take a pass at fixing those sometime. I'll see about it in the next couple days if nobody else does.

Voidious21:09, 20 March 2013
 

Can't you just dump the contents of the latest zip from Rednaxela's site?

Skilgannon21:14, 20 March 2013
 

Yeah, maybe I'll just do that for now, but I definitely want to fix any broken links on the participants lists too. On first pass I wanted to build the minimal set required for a superpack so I had it download everything individually.

Voidious21:18, 20 March 2013