If I was making a game, how would I add AI to something like an enemy? I've never done it
In case AI means something else in LÖVE, I'm talking about artificial intelligence.
Also, would it be illegal to make a snake clone and put it on the LÖVE forums? I was thinking of making one but I'm not too sure... obviously not using a copyrighted soundtrack and just the concept itself!
Thanks! Any help is appreciated!
Adding AI?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Adding AI?
"In those quiet moments, you come into my mind" - Liam Reilly
Re: Adding AI?
Link
Sorry but, try searching things on your own. You created ~20 topics in this short amount of time you are
registeried on this forum. Try harder finding what you wanna know. -.-*
Sorry but, try searching things on your own. You created ~20 topics in this short amount of time you are
registeried on this forum. Try harder finding what you wanna know. -.-*
- Hexenhammer
- Party member
- Posts: 175
- Joined: Sun Feb 17, 2013 8:19 am
Re: Adding AI?
That is a pretty general question. It depends on your engine design. The most basic AI would be some entity having an AI which causes it to chase the player. Assuming the entities in your game world have simple (x,y) positions it would look something like thisEamonn wrote:If I was making a game, how would I add AI to something like an enemy? I've never done it
In case AI means something else in LÖVE, I'm talking about artificial intelligence.
Code: Select all
if player.x < self.x then
self.x = self.x - 1
end
if player.x > self.x then
self.x = self.x +1
end
if player.y < self.y then
self.y = self.y - 1
end
if player.y > self.y then
self.y = self.y +1
end
Code: Select all
if distance(self, player) == 1 then
self:attack(player)
end
No, game mechanics aren't subject to copyright and there is no patent covering "snake" and there will never be one either (it would be easy to find "prior art").Also, would it be illegal to make a snake clone and put it on the LÖVE forums?
Re: Adding AI?
Thank youHexenhammer wrote:That is a pretty general question. It depends on your engine design. The most basic AI would be some entity having an AI which causes it to chase the player. Assuming the entities in your game world have simple (x,y) positions it would look something like thisEamonn wrote:If I was making a game, how would I add AI to something like an enemy? I've never done it
In case AI means something else in LÖVE, I'm talking about artificial intelligence.
self (your actor with AI) would now chase the player.. that's some - very basic - AI. There is nothing special about AI code really. Basic principle of a simple AI is that your AI code looks at the world state (here the current position of the player) and reacts to it e.g. by moving the actor the AI controls or making the actor do something else e.g. attack:Code: Select all
if player.x < self.x then self.x = self.x - 1 end if player.x > self.x then self.x = self.x +1 end if player.y < self.y then self.y = self.y - 1 end if player.y > self.y then self.y = self.y +1 end
.. or something like that.Code: Select all
if distance(self, player) == 1 then self:attack(player) end
No, game mechanics aren't subject to copyright and there is no patent covering "snake" and there will never be one either (it would be easy to find "prior art").Also, would it be illegal to make a snake clone and put it on the LÖVE forums?
"In those quiet moments, you come into my mind" - Liam Reilly
- Sheepolution
- Party member
- Posts: 264
- Joined: Mon Mar 04, 2013 9:31 am
- Location: The Netherlands
- Contact:
Re: Adding AI?
Nope, it's called the same everywhere.Eamonn wrote:In case AI means something else in LÖVE
As long as you're not making money off of it, don't worry about copyright. Nintendo is not going to sue you when you're remaking the original Zelda and put it on the forums, unless you're actually selling it.Eamonn wrote: Also, would it be illegal to make a snake clone and put it on the LÖVE forums? I was thinking of making one but I'm not too sure... obviously not using a copyrighted soundtrack and just the concept itself!
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Adding AI?
As long as you're not using Nintendo's image and sound assets, original reverse engineered code or things like that.Sheepolution wrote:Nintendo is not going to sue you when you're remaking the original Zelda and put it on the forums, unless you're actually selling it.
Help us help you: attach a .love.
- Sheepolution
- Party member
- Posts: 264
- Joined: Mon Mar 04, 2013 9:31 am
- Location: The Netherlands
- Contact:
Re: Adding AI?
You can still get sued, even though you're not selling it? Oh because you're using and sharing something that's not yours right?Robin wrote:As long as you're not using Nintendo's image and sound assets, original reverse engineered code or things like that.Sheepolution wrote:Nintendo is not going to sue you when you're remaking the original Zelda and put it on the forums, unless you're actually selling it.
Still wondering how Mari0 got away with it..
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Adding AI?
Copyright law as shaped by the Berne Convention is not about profit, but about the right of the author to control distribution of their work.Sheepolution wrote:You can still get sued, even though you're not selling it?
Luck, relative obscurity and more luck.Sheepolution wrote:Still wondering how Mari0 got away with it..
Help us help you: attach a .love.
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Adding AI?
As long as they aren't selling it, it's a fan game. Super Mario Crossover does the same thing with Mario and a bunch of other Nintendo, Capcom, Konami and other properties. But they do it for fun and not for profit.
Just don't try to charge anyone money or take donations to make the game and you most likely won't have a problem. There were projects in the early 2000s that tried to charge or otherwise take money and got shut down for good reason. If you're just making a silly fan game for people who love these games you should be fine.
I say should because this stuff could change at any time. Usually they're left alone because it's good publicity. But then again there is Nintendo taking advertising money from Nintendo LP's and Sega shutting down accounts that refused to remove LP's of an older game they had just released a sequel to.
Just don't try to charge anyone money or take donations to make the game and you most likely won't have a problem. There were projects in the early 2000s that tried to charge or otherwise take money and got shut down for good reason. If you're just making a silly fan game for people who love these games you should be fine.
I say should because this stuff could change at any time. Usually they're left alone because it's good publicity. But then again there is Nintendo taking advertising money from Nintendo LP's and Sega shutting down accounts that refused to remove LP's of an older game they had just released a sequel to.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 5 guests