Bullet-dodging AI

For questions about using Classic.

Post » Sat Oct 22, 2011 11:00 am

How would I go about creating an object that will dodge the bullets i shoot, or dodge any other object for that matter.I tried, but i can't think of anything simple.
The reason I'm asking is because i have a plane shooting game , and i want the boss battle to be more entertaining, by making the boss plane to dodge the bullets you shoot as much as it can.
B
6
S
1
G
1
Posts: 69
Reputation: 1,019

Post » Sat Oct 22, 2011 12:41 pm

A simple way to do it without math, is have an invisible(visible until you get it working) sprite of a long thick line sticking out of the front of the bullets, you can adjust it's length according to how early you want the enemy to begin dodging or depending on bullet speed, and make the enemy move laterally when overlapping the line.   If you want to increase the intelligence not to dodge into other bullets or take into account other bullets on their way the problem begins to get more complex, but alot can still be solved by invisible detector sprites, like a horizontal line sticking left and right out of your ship, and if it overlaps a bullet detector in one direction and not the other it can dodge in the correct direction
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sat Oct 22, 2011 2:21 pm

here's an example cap.

Bulletavoid
B
22
S
3
G
6
Posts: 1,356
Reputation: 7,141

Post » Sun Oct 23, 2011 9:47 am

Great tips people, here's what I've come up with :
http://www.hostmyfilez.com/mvpa4okvxjqt/bullet_dodger.cap


Now the only thing missing is walls...

By the way, how do i make my link clickable like DravenX did? shadowlord2011-10-23 09:50:27
B
6
S
1
G
1
Posts: 69
Reputation: 1,019

Post » Sun Oct 23, 2011 10:13 am

[QUOTE=shadowlord]By the way, how do i make my link clickable like DravenX did?[/QUOTE]
With the uniform resource locator tag, url /url
Just click on the little world icon with the chain link and complete it with the address and title
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests