BerryBots forums

It is currently Tue Jul 27, 2021 1:56 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Apr 02, 2013 8:15 pm 
Offline
Site Admin
User avatar

Joined: Sat Nov 17, 2012 5:03 am
Posts: 88
Justin wrote:
1- I believe touchedZone(ship,tag) is opperating like: inZone(ship,tag). (I'm tring to use TouchedZone to determine if I crossed a "zone" line )
You're right, I see why this is happening. The implementation works for stages, which are run at the end of a tick after physics processing, but not for ships. So it only really checks the inZone part. I'll fix this asap. Thanks!

Justin wrote:
2- I assume the zone tags in the raceTrack stage would be a good indicator for intended direction of race.. but the first zone line "z1" is the second zoneLine away: etherdirection.. (I look forward to seeing complicated tracks with many, many bots! :)) I'm hoping you might change to encouraging future raceTracks (if using zones) to do the same... (eg: bottomzone = z1, top right zone = z2, top left =z3)
Hmm, I see your point. It made sense when coding the stage to have a lap be completed after z1 / z2 / z3. But completing a lap when you reach z1 again (z1 / z2 / z3 / z1) also makes sense and provides a better hint about direction. I'll make this change to racetrack and racer.

Justin wrote:
3- I also having issue with my code below, itterating to the next "target zone" (maybe racer would be a good bot to demostrate)
I think "next" doesn't work how you're thinking. next(zones) will always return the same thing. If you want to iterate, you need to pass the index as the second argument, like next(zones, i). And if it returns nil, you'll need to notice that and go back to the top. I use this site a lot for reference: http://pgl.yoyo.org/luai/i/next

(I think I only use "next" in the sample ships/stages to check for the first element, so that might have been confusing.)

Huge thanks for all the testing and bug reports!


Top
 Profile  
 
PostPosted: Wed Apr 03, 2013 2:28 am 
Offline
Site Admin
User avatar

Joined: Sat Nov 17, 2012 5:03 am
Posts: 88
Ok, whipped up a bug fixed Windows binary if you're interested: berrybots_windows_1.1.4-rc1.zip ... Fixes World.touchedZone and .touchedAnyZone for ships, and changed the zone tags on racetrack. Both changes will be in the next release.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

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:  
cron
Powered by phpBB® Forum Software © phpBB Group