From: Harold Hausman Date: 2005-11-25T13:26:23+09:00 Subject: Re: RRobots - ducks, armed and dangerous On 11/24/05, Simon Kr�ger wrote: > Harold Hausman wrote: > > You get a gold star on the chart for the day! > > > > Today we can all be thankful for rrobots.rb. > > > Here's the listing of my first bot, affectionately titled BotOne. He > > lays a savage beat down on the aptly named NervousBot, but he is by no > > means invincible. > > to cool. no, you're too cool. ;) > > > #Begin listing > > [...] > > #End listing > > > > This bot prefers long matches, as he fires low power shots. This, on > > my machine at least exposes some performance problems associated with > > shooting a lot. Matching a couple of rapid firing bots brings the app > > to it's knees after only a few thousand ticks. My first idea where > > maybe that the bullets were not being cleaned up properly, but looking > > at the source it looks like they are being remove from the hash and > > canvas, so I don't know. > > I will dive into that (i was able to finish the match, but it slows > down considerably) maybe i have to 'reuse' old bullets. > I've seen some code for circular lists (Gavin K?) that might be a more efficient way to manage @battlefield.bullets than a hash, but as far as optimizing the TK stuff, I haven't the foggiest. I'm super interested in this game improving though, thanks again for taking the lead on this, that thread went on too long for *someone* not to put the rubber to the road. Keep up the good work, -Harold