BerryBots forums

It is currently Sat Nov 27, 2021 2:57 am

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Re: Caught some bugs
PostPosted: Mon Feb 24, 2014 12:48 am 
Site Admin
User avatar

Joined: Sat Nov 17, 2012 5:03 am
Posts: 88
Here's the original post, which I accidentally deleted:
Hi Void,

I came across some small bugs and improvements but couldn't find a dedicated topic or function on for bugreports and feature requests so here are a couple:

- If I have some new ship-code I want to test and I already have a battle running (or paused) with the ship in question using old code I can press restart to load the code. But if there is a compile-time error in the new code the client crashes. Run-time errors are handled properly though.
I recreated it using just a single bot (but also happens with more) on the "empty" stage. The crash doesn't seem to be related to what the compile error actually was or what the shipcode looked like.

- Second bug is that the print() function doesn't seem to accept multiple arguments. It only prints the first argument and the rest is ignored. I also noticed that it doesn't trigger the __tostring event on tables if it is defined. Does this have something to do with LuaJit?

- And now a request: It would be nice to have a function in the DebugGfx module that returns how many more of a certain type of graphic can be drawn before reaching the limit.
Also, it might make more sense to have a global limit shared by all graphic types (#circle + #line + ... <= limit). If I've drawn 4096 lines but no circles I can't make more lines. I can make more circles so apparently there is more cpu time left to draw but still my lines-budget is used up. It's not that big of a deal though since 4096 is more than enough for most purposes :)
(and maybe I should stop drawing gradients with a rectangle for every point to fill the entire screen XD)


PS: I'm on windows 7

Cool, thanks for the reports! I'll take a look at them this week sometime.

I've overridden "print" because I need to do a couple things with it - save to replay data, and print to either output consoles or STDERR, depending on the platform. So I may need to do something additional to make it observe __tostring like the original implementation. Also I didn't think it could take multiple arguments, but if it can I will definitely implement that too.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group