Integration of AI in cocos Creator

Hey guys,
I want to integrate AI in my cocos creator peoject. Have you any idea or project, how will i do that?

I guess that depends upon what you want your AI to accomplish…

i want to move a sprite continuously in up and down in y direction and when a object comes near to sprite .sprite touch the object automatically. so that object get hit.

Sounds like you don’t need any AI for that, keep scanning what is visible on screen, choose a target by pre-computing if your sprite can collide with given object on time(considering your object position, target position, object up/down movement bounds etc etc). Once a target is acquired start moving your object in that direction. Once hit repeat. If in case none of the targets are close enough to hit in given time then you can still make a false attempt by moving your sprite towards closest target object to give a impression of “Tried but Failed!”.

1 Like

yes it is . i m beginner in game development …thank you

if you ever find that you actually do want/need an AI -> i would recommend that you check out these js AIs,
however the topic of training learning and evolving is complicated, i don’t understand it myself but the examples show the proof of concepts

2 Likes

thanks skara for this valuable notes.

A lot of the time in game development, you can get away with simple movement patterns and the player will believe it is some kind advanced AI. You can implement some simple movement patterns, make characters follow one another or even shoot with timers if a particular character is nearby. All of this can be implemented with simple if checks and your players can be made to believe your game has advanced AI.

What I"m trying to say is that you don’t have to implement a specific “AI module” or something into your project. Make your game elements move around and be interactive and you’ll simulate AI! :slight_smile:

ok thanks @Raspilicious