How to make an AI in an exactly way?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
ilovelove2019
Citizen
Posts: 78
Joined: Wed Sep 11, 2019 10:38 am

How to make an AI in an exactly way?

Post by ilovelove2019 »

Hi everyone, I have a question, hope you will answer it for me. I'm making a platformer game, when creating simple enemies, they only need to go back and forth a certain range so creating it is quite simple. But when it comes to working with larger objects, such as bosses? I want to create a cool boss fight, this requires a lot of logic, but I don't know exactly how I need to do it? I thought about creating multiple paths for the boss to move to each position (combining multiple paths together, we will get the complex movement of the boss) or boss states? I don't know what I'm saying, I'm stupid.. But that idea is theoretical, I need a specific algorithm. What a shame :(( But can you teach me? And I don't know if my idea is right?) I'm really poor. I would be delighted if you take the time and answer it. Please forgive my foolishness. Thank you so much.

Edit: For example, a specific problem: I want to create a bird enemy flying a certain range, when the player comes close enough, it chases the player. Perhaps more broadly, the bird also has a random break while flying, can pick up some objects and release them to attack the player, for example? Oh, when I thought about it, I felt wonderful. :)) But I don't know what to do. Sadly: (((
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: How to make an AI in an exactly way?

Post by raidho36 »

You are verbally formulating your problem, that's first step. Now try making a flowchart for what the boss should be doing. Use pen and paper, or a whiteboard. From there you will see how to implement that in code and maybe raise more specific questions.
ilovelove2019
Citizen
Posts: 78
Joined: Wed Sep 11, 2019 10:38 am

Re: How to make an AI in an exactly way?

Post by ilovelove2019 »

Thanks for your advice. Maybe I was too hurry. I will learn from experience next time. Well,
If I already have a specific question, do I post to this post or create a new post? And I wonder if when I edit, will you receive notifications from my posts? Or is it just a random access and will my posts fade away?
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: How to make an AI in an exactly way?

Post by raidho36 »

You'd need to make a new post.

Sorry but your question is about as vague as one can make it. There are million different approaches to doing this and which one is more suitable than others depends on exactly what you want to accomplish. So we can help you with questions like "how to make a boss follow specific pattern of actions" or "how to make a boss aim projectiles such that it will hit a moving player". The "how do I make a boss" question is the one that you answer yourself. So, again, try making a flowchart, because from a complete flowchart it's pretty easy to tell what program needs to be made (flowcharts are free-style besides some loose conventions about shapes).
Attachments
program-flowchart.png
program-flowchart.png (27.48 KiB) Viewed 2649 times
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 149 guests