Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Artificial Intelligence / Re: Help making enemies more aware of walls. on: 2012-05-15 17:17:54
Finally got it working! Had to change quite a bit of code, but now it's behaving:)
Thanks for all the answers!
2  Game Development / Artificial Intelligence / Re: Help making enemies more aware of walls. on: 2012-05-12 00:00:04
Thanks for answering:)
I gave that a go, and while they are closer to managing corners and such, they still can't. As of now, the corner of their collision box will still hit the corner of the walls. They consider themselves to be standing in the tile that the center point of their collision box is positioned in. This of course means that they may believe that they should go left, from tile (3,5) to tile (3,4), even though parts of their collision box could reside in tile (4,5). If tile (4,4) is a wall, I got myself a problem:(
3  Game Development / Artificial Intelligence / Re: Help making enemies more aware of walls. on: 2012-05-11 23:55:15
I feel I might have been a bit unclear, I didn't know what information would be needed. The reason I can't calculate the correct vector in the manner you describe is because we designed the game so that there would only be 8 directions. I do like the idea though, thanks:)
4  Game Development / Artificial Intelligence / Re: Help making enemies more aware of walls. on: 2012-05-11 16:56:11
Sounds quite a bit like what I'd like to achieve! Do you mean that I should try to make the walls "push" the enemies away, or find some way for the enemies to behave a bit differently when close to walls?
5  Game Development / Artificial Intelligence / Re: Help making enemies more aware of walls. on: 2012-05-11 12:06:23
Thanks for your answer:)

I made sure they don't walk diagonaly close to walls, they consider themselves as standing in the tile the upper left corner of their collision box is positioned in. The problem is that the enemies think they are walking from one tile to another, while most part of their actual collision box is located in another. So while the upper left corner will never collide (thanks to them never walking diagonaly while close to a wall), the rest of the body will Sad
6  Game Development / Artificial Intelligence / Help making enemies more aware of walls. on: 2012-05-11 11:48:07
Hi!

I'm currently part of project group, writing a shoot 'em up java 2D game. Using the A* algorithm, I managed to sort out the basic enemy pathfinding, and they have no problem finding the players position and start attacking. While implementing the pathfinding, I didn't take into account that the actual enemies would have collision boxes, not just a position to keep track of, resulting in a enemy behavior that doesn't handle walls very well.

Basically, the calculated path is correct, but since the enemy only makes sure their upper left corner (their position) never enter a wall-tile, problems occur when any other corner is the one close to the walls. I don't really know how to handle this, and would be grateful for any tips I could get.
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (53 views)
2014-04-15 18:08:23

BurntPizza (51 views)
2014-04-15 03:46:01

UprightPath (65 views)
2014-04-14 17:39:50

UprightPath (48 views)
2014-04-14 17:35:47

Porlus (65 views)
2014-04-14 15:48:38

tom_mai78101 (89 views)
2014-04-10 04:04:31

BurntPizza (149 views)
2014-04-08 23:06:04

tom_mai78101 (245 views)
2014-04-05 13:34:39

trollwarrior1 (203 views)
2014-04-04 12:06:45

CJLetsGame (210 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!