Hi, I am making a game, I got the multiplayer going (local in the same device) but I can’t do the AI, I mean, I have no idea how to manage AI, it’ always has been a problem for me, so if someone is avaible to help me making the AI from the beginning to the end I would really appreciate that, if you are avaible, pm me(if you have skype send me your skype), now some addional information, the game is kinda like a space invaders game, but without the aliens, so basically a player on one side, and the other player on the other side, both players only travel on the Y axis and shoot in a straight line, the thing is, I want the AI to be pretty smart and actually make it challenging.
AI is all about faking intelligence. You need to come up with strategies, and then write code to implement those strategies for the AI player.
This is not an easy field, and you won’t get it right on your first try. Just keep practicing, reading, and learning, and you’ll eventually get there.
Any guides you advise me, the AI for this project should be kinda simple, but I have no idea how to get started
For an arcade style AI like this you should take crawford’s advice. It’s gonna take mostly tweaking to get the AI to the point were it’s a challenge but not cheating.
Okay I haven’t started coding yet, I’ll start tomorrow, but I’m getting some stuff ready to make it easier, what do you think of this mind map as it is now? I still have to add shooting to it, but I think that should help me for tomorrow
That program looks legit. What is it and where do I get it? Seems like it could come in handy.
Nevermind, it’s called https://bubbl.us/ apparently.
Perhaps do something like this:
But I’m a bit nuts about coroutines and I keep using them with everything.
Okey, sorry if I’m being a captain obvious but before committing to something very elaborated first I would do just do a simple loop of a core behavior. Making AI feels much less taunting if you break it into small individual tasks.
Since you are making a game about shooting I would start with an AI loop for checking if you are within his range or not. Then I would add a targeting behaviour. Then add a shooting and so on. So you would end up with a basic logic something like this…
KeepLooping():
target = CheckIfInRange();
if target: Aim(); Shoot();
else: Reload(); WalkAround(); LightACigaretteIfNicotineTooLow();
if LungCancer(): BreakLoop()
In my rather limited experience often a very simple, straightforward AI works the best. More complex, smarter AI stuff usually hasn’t appeared any smarter but rather more confusing for players. But this is probably just a product of my own limited intelligence.
It is indeed bubbl.us
and for Yoska, I’ll first try using my mind map since I think it’s not that complicated, I’ll start with movement, then add shooting, then using power ups, and then special abilities
edit: now I’m trying to do the power up picking part, it’s not working correctly, I get a null reference exception error, can anyone tell me what’s wrong with it?
Ill give you the whole script so you can see what’s good and what’s bad in it: http://pastebin.com/LAFDkCvW