How do I best automate enemy movement in a Pong type game?

Get help using Construct 2

Post » Sun Feb 08, 2015 7:37 am

Hey guys!

I'm making a pong style minigame in my current project. I tried using Pathfinding to make my AI move (essentially, every tick, find location (0, Puck.Y), and when you find it, move to it. My theory is that Pathfinding is taking more than 1 tick to execute, because my poor AI just sat there, confused.

I've found a workaround that does alright (If Monster.Y > Puck.Y, Monster.Y = Monster.Y - 3), but is there a more effective solution than just translating the AI up and down the Y axis? Is there a way to make pathfinding work? Thanks!
B
13
S
3
G
2
Posts: 51
Reputation: 2,255

Post » Sun Feb 08, 2015 8:47 am

First, I know what do you mean by Pong, but after you mentioned Monster... I started to get unsure about your Pong game...

What is the monster doing in the Pong game? Without understanding further comtext, we can't help you validly.
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
28
S
11
G
11
Posts: 410
Reputation: 8,382

Post » Sat Feb 14, 2015 8:15 am

@keroberos Sorry about that! The monster is the AI playing pong with you, instead of a paddle.
B
13
S
3
G
2
Posts: 51
Reputation: 2,255

Post » Sat Feb 14, 2015 8:26 am

Playable games:
http://jamesxxxyz.newgrounds.com/
Newest: Blue and red arrows
Latest update: Blue and red arrows

What you want in C3?
viewtopic.php?f=146&t=122050

Youtube: https://www.youtube.com/channel/UCLE7Ml ... /playlists
B
11
S
4
Posts: 281
Reputation: 1,543

Post » Sat Feb 14, 2015 10:53 am

@JamesXXXYZ thanks mate
B
13
S
3
G
2
Posts: 51
Reputation: 2,255


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests