This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-03-12 17:20:19

StarscreamClone
Scratcher
Registered: 2012-05-19
Posts: 1000+

Racecar AI

A car has artificial intelligence... is it a Transformer then?  lol

Okay, so I'm in a collaboration, and one of the the ideas is a racing scroller.  Problem is, a random set x-vel wouldn't be very, er, probable to win if they have a faster x-vel than the player  (unless they encountered traps along the way...).  But anyhoo, any ideas on how to do this?  Thanks!

Also: In response to my above question, it's no because Cybertronians don't have artificial intelligence, and the car probably doesn't transform.  tongue


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i1154.photobucket.com/albums/p522/lizzyhipo/Angelica101-1-1-1.jpg&link2=http://i46.tinypic.com/2elqwdy.png&link3=http://i1273.photobucket.com/albums/y404/Hulydooly/decepticon.jpg&link4=http://i44.tinypic.com/34rvb07.png

Offline

 

#2 2013-03-12 17:29:04

ianthestuntman
Scratcher
Registered: 2013-01-02
Posts: 100+

Re: Racecar AI

let's think about this, maybe they build up speed gradually, and if they bonk into something they slow down? But the steering is a problem.

Offline

 

#3 2013-03-12 19:33:11

StarscreamClone
Scratcher
Registered: 2012-05-19
Posts: 1000+

Re: Racecar AI

ianthestuntman wrote:

let's think about this, maybe they build up speed gradually, and if they bonk into something they slow down? But the steering is a problem.

What I'm trying to find is how, though.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i1154.photobucket.com/albums/p522/lizzyhipo/Angelica101-1-1-1.jpg&link2=http://i46.tinypic.com/2elqwdy.png&link3=http://i1273.photobucket.com/albums/y404/Hulydooly/decepticon.jpg&link4=http://i44.tinypic.com/34rvb07.png

Offline

 

#4 2013-03-12 22:31:20

ianthestuntman
Scratcher
Registered: 2013-01-02
Posts: 100+

Re: Racecar AI

[scratchblocks]
when gp clicked
forever
if (not touching obstacle or car)
set [xv] to <(xv)*(1.1)>
end
end

Offline

 

#5 2013-03-12 22:32:28

ianthestuntman
Scratcher
Registered: 2013-01-02
Posts: 100+

Re: Racecar AI

when gp clicked
forever
if (not touching obstacle or car)
set [xv] to <(xv)*(1.1)>
end
end

Offline

 

#6 2013-03-12 22:34:25

ianthestuntman
Scratcher
Registered: 2013-01-02
Posts: 100+

Re: Racecar AI

I mean when gf clicked

Offline

 

#7 2013-03-12 22:53:02

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: Racecar AI

ianthestuntman wrote:

when gf clicked
forever
if < not < <touching? [obstacle v]> or <touching? [car v]> > >
set [xv v] to < (xv) * [1.1] >
end
end

Offline

 

#8 2013-03-13 19:37:23

StarscreamClone
Scratcher
Registered: 2012-05-19
Posts: 1000+

Re: Racecar AI

Ahh... okay.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i1154.photobucket.com/albums/p522/lizzyhipo/Angelica101-1-1-1.jpg&amp;link2=http://i46.tinypic.com/2elqwdy.png&amp;link3=http://i1273.photobucket.com/albums/y404/Hulydooly/decepticon.jpg&amp;link4=http://i44.tinypic.com/34rvb07.png

Offline

 

Board footer