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

#1 2013-01-05 23:29:00

BlueMockingBird
New Scratcher
Registered: 2013-01-03
Posts: 6

Artificial Intelligence?

Hi! I'm BlueMockingBird. I started scratch a few weeks ago, in the process of making a racing game w/acceleration, deceleration, etc.

Anyway on topic... I thought this idea might be a little too ambitious to tackle after only a few weeks of programming, but oh well...

I was wondering if it would be possible to make an entity with artificial intelligence on a Scratch-made game. If anybody posted ideas in this thread, almost anything would help me, since I only started and know only about acceleration, deceleration and the simplest of side-scrolling games.

Offline

 

#2 2013-01-05 23:57:54

mrn0body
Scratcher
Registered: 2012-12-11
Posts: 37

Re: Artificial Intelligence?

Add a script to make it move where you want. Kind of like an animation but in a game.
I hope this helps


Why Fit In When You Were Born To Stand Out

Offline

 

#3 2013-01-06 06:06:07

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Artificial Intelligence?

You could have a yellow line running down the entire length of the track, and have the car try and follow that line and keep a small coloured sensor on that line, if it gets off of the line, make it turn back towards it.


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#4 2013-01-06 15:08:57

BlueMockingBird
New Scratcher
Registered: 2013-01-03
Posts: 6

Re: Artificial Intelligence?

zammer990 wrote:

You could have a yellow line running down the entire length of the track, and have the car try and follow that line and keep a small coloured sensor on that line, if it gets off of the line, make it turn back towards it.

Hmm, I see. So maybe I could have a few individual invisible yellow line sprites for various AI cars? That seems like a pretty great idea. Thanks for the feedback!

I'm also working on an rpg project, which is going to be much like zelda or those top view, scrolling games. When enemies come should I just add different phases to the attack behavior of the enemy, or should I add a feature that makes it react intelligently to the player?

Offline

 

#5 2013-01-06 15:26:40

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Artificial Intelligence?

BlueMockingBird wrote:

zammer990 wrote:

You could have a yellow line running down the entire length of the track, and have the car try and follow that line and keep a small coloured sensor on that line, if it gets off of the line, make it turn back towards it.

Hmm, I see. So maybe I could have a few individual invisible yellow line sprites for various AI cars? That seems like a pretty great idea. Thanks for the feedback!

I'm also working on an rpg project, which is going to be much like zelda or those top view, scrolling games. When enemies come should I just add different phases to the attack behavior of the enemy, or should I add a feature that makes it react intelligently to the player?

It depends, though you could do both. For example, if you have a hard enemy, then you could make it more intelligent, and if you had an easy enemy, then you could make it follow attack patterns, which is what I think would be best.

Anyway, hello BlueMockingBird and welcome to Scratch! I wish you good luck on your Zelda project! :)

Last edited by ErnieParke (2013-01-06 15:27:56)


http://i46.tinypic.com/35ismmc.png

Offline

 

#6 2013-01-06 18:15:39

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Artificial Intelligence?

BlueMockingBird wrote:

zammer990 wrote:

You could have a yellow line running down the entire length of the track, and have the car try and follow that line and keep a small coloured sensor on that line, if it gets off of the line, make it turn back towards it.

Hmm, I see. So maybe I could have a few individual invisible yellow line sprites for various AI cars? That seems like a pretty great idea. Thanks for the feedback!

I'm also working on an rpg project, which is going to be much like zelda or those top view, scrolling games. When enemies come should I just add different phases to the attack behavior of the enemy, or should I add a feature that makes it react intelligently to the player?

You can make it as complex as you want, you could for example have it check the distance and direction of the player, if they're behind the player and close, they could do a longer attack to set up, but that does more damage, or they could observe the player, and wait until they're vulnrable


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

Board footer