Be a Supporter!

Game Help and suggestions

  • 345 Views
  • 16 Replies
New Topic Respond to this Topic
burgerandfries
burgerandfries
  • Member since: Mar. 25, 2012
  • Offline.
Forum Stats
Member
Level 08
Programmer
Game Help and suggestions 2012-10-02 20:12:44 Reply

Hello, I'm currently trying to make a top down view game with enemy's that can chase you, but at the same time avoiding the walls and environment around it. But so far i only got the enemy to follow the player, and I ran out of ideas for the enemy to follow the player. If anyone has helpful suggestions it would be very helpful.

burgerandfries
burgerandfries
  • Member since: Mar. 25, 2012
  • Offline.
Forum Stats
Member
Level 08
Programmer
Response to Game Help and suggestions 2012-10-02 20:18:13 Reply

I messed up on the top post, Read this instead(sorry)

Hello, I'm currently trying to make a top down view game with enemy's that can chase you, but at the same time avoiding the walls and environment around it. But so far i only got the enemy to follow the player, and I ran out of ideas for the enemy to avoid walls. If anyone has helpful suggestions it would be very helpful.

egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to Game Help and suggestions 2012-10-02 20:28:20 Reply

read the Flash Reg Lounge, I remember seeing something like that on there. Maybe two pages back, at most.


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
burgerandfries
burgerandfries
  • Member since: Mar. 25, 2012
  • Offline.
Forum Stats
Member
Level 08
Programmer
Response to Game Help and suggestions 2012-10-02 20:34:55 Reply

could not find it, sorry

MintPaw
MintPaw
  • Member since: Jun. 11, 2006
  • Offline.
Forum Stats
Member
Level 10
Programmer
Response to Game Help and suggestions 2012-10-02 20:38:20 Reply

AI is a complex and heavily researched topic. I'd suggest reading some articles on AI and brushing up on your maths. Worst comes and it's too tough for you, check out what some frameworks have to offer.


If ya have something to say, PM me. I have a lot of time to spare.
Also never PM egg82.

BBS Signature
burgerandfries
burgerandfries
  • Member since: Mar. 25, 2012
  • Offline.
Forum Stats
Member
Level 08
Programmer
Response to Game Help and suggestions 2012-10-02 20:41:38 Reply

I have been recently, but the Ai your thinking of is too complex. What im looking for is just a simple hit test and avoid.

MintPaw
MintPaw
  • Member since: Jun. 11, 2006
  • Offline.
Forum Stats
Member
Level 10
Programmer
Response to Game Help and suggestions 2012-10-02 21:16:44 Reply

Oh, heh, that's the thing, it doesn't work like that, you'll need to draw out a path from the enemy to the player avoiding walls. The best you can do with that is zombie like characters that run straight into walls while following you.


If ya have something to say, PM me. I have a lot of time to spare.
Also never PM egg82.

BBS Signature
DannyDaNinja
DannyDaNinja
  • Member since: Mar. 14, 2010
  • Offline.
Forum Stats
Member
Level 04
Game Developer
Response to Game Help and suggestions 2012-10-03 00:29:37 Reply

At 10/2/12 09:16 PM, MintPaw wrote: Oh, heh, that's the thing, it doesn't work like that, you'll need to draw out a path from the enemy to the player avoiding walls. The best you can do with that is zombie like characters that run straight into walls while following you.

And your excuse could just be that the zombies are really stupid :D
Seriously, it'ld probably work.


Trying to post in topics that have no replies. Trust me it's a horrible feeling when nobody replies to your topic :{

Kwing
Kwing
  • Member since: Jul. 24, 2007
  • Offline.
Forum Stats
Member
Level 45
Game Developer
Response to Game Help and suggestions 2012-10-03 00:50:47 Reply

Pathfinding is not an easy thing to code. Does your game have a level editor? If not, you should be able to code the enemies to follow a set path. Try drawing a vector between the enemy and the player, then adjusting its destination points based off of which walls that vector is colliding with.


If I offer to help you in a post, PM me to get it. I often forget to revisit threads.
Want 180+ free PSP games? Try these links! - Flash - Homebrew (OFW)

Sandremss128
Sandremss128
  • Member since: Aug. 22, 2009
  • Offline.
Forum Stats
Supporter
Level 11
Programmer
Response to Game Help and suggestions 2012-10-03 05:35:33 Reply

Just make a tilebased game and throw a pathfinding algorithm on it, its not like this is the hardest thing in the world.
You don't have to think of this algorithm yourself, you don't even have to understand it, just implement it.
Now when you're talking about avoiding moving objects and finding optimal paths for a large group of units through an area its getting more interesting, but I'm not thinking you're aiming at that.

Just look up pathfinding algorithm and you should be fine.

64base
64base
  • Member since: Apr. 18, 2012
  • Offline.
Forum Stats
Member
Level 02
Programmer
Response to Game Help and suggestions 2012-10-03 10:10:17 Reply

I suggest you use a tile-map instead of vector maps. The reason being is so you can easily implement a path-finding solution such as A* (A Star) or else you'll need to implement a pixel-perfect implementation using trig-I've tried this and it's impossible with current processing power.

If you want, just divide your vector maps into a tileset and store it into an array. I suggest creating a level-editor first. More info on A Star pathfinding algorithm here: http://www.policyalmanac.org/games/aStarTutorial.htm


.

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to Game Help and suggestions 2012-10-03 10:20:59 Reply

At 10/3/12 10:10 AM, 64base wrote: I suggest you use a tile-map instead of vector maps. The reason being is so you can easily implement a path-finding solution such as A* (A Star) or else you'll need to implement a pixel-perfect implementation using trig-I've tried this and it's impossible with current processing power.

Wut?

Vector maps (maps constructed by points each being connected to other points) have nothing to do with pixel-perfect implementation (what does that even mean?)

Using vector maps are way faster in terms of processing since you don't process as many useless nodes, the only reason you might not want to use them is that they can be hard to construct (through use of a level-editor).

Of course, if you want to get into some library using (which isn't complicated, but I wouldn't recommend it for total beginners either), NAPE has a good tool that converts a shape into lots of polygons, which makes using vector maps even easier than tiles (and again, faster).

It absolutely pisses me off when I see people saying that you can only use A* with vector maps.

That aside, to begin using it and understanding it, it might be simpler to use a tile map, but just remember that A* isn't limited to tiles in any way.

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to Game Help and suggestions 2012-10-03 10:23:41 Reply

At 10/3/12 10:20 AM, PSvils wrote: It absolutely pisses me off when I see people saying that you can only use A* with vector maps.

*It absolutely pisses me off when I see people saying that you can use A* only with tile maps.

64base
64base
  • Member since: Apr. 18, 2012
  • Offline.
Forum Stats
Member
Level 02
Programmer
Response to Game Help and suggestions 2012-10-03 10:34:12 Reply

At 10/3/12 10:20 AM, PSvils wrote:
At 10/3/12 10:10 AM, 64base wrote: I suggest you use a tile-map instead of vector maps. The reason being is so you can easily implement a path-finding solution such as A* (A Star) or else you'll need to implement a pixel-perfect implementation using trig-I've tried this and it's impossible with current processing power.
Wut?

Vector maps (maps constructed by points each being connected to other points) have nothing to do with pixel-perfect implementation (what does that even mean?)

Using vector maps are way faster in terms of processing since you don't process as many useless nodes, the only reason you might not want to use them is that they can be hard to construct (through use of a level-editor).

Of course, if you want to get into some library using (which isn't complicated, but I wouldn't recommend it for total beginners either), NAPE has a good tool that converts a shape into lots of polygons, which makes using vector maps even easier than tiles (and again, faster).

It absolutely pisses me off when I see people saying that you can only use A* with vector maps.

That aside, to begin using it and understanding it, it might be simpler to use a tile map, but just remember that A* isn't limited to tiles in any way.

Vector as in the vector graphics (i.e., the APIs and drawing classes) utilised in Flash. Basically anything that extends DisplayObject and beyond. I was referring to the OP because he specifically said he wanted to use hitTesting and my point was using a method like that would be too precise and require a lot of processing power.

Please explain to me how A* Isn't limited?

Pixel-perfect meaning: consistency in detection and path pathfinding where an object is relative to a specific pixel's point.


.

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to Game Help and suggestions 2012-10-03 11:43:09 Reply

At 10/3/12 10:34 AM, 64base wrote: Vector as in the vector graphics (i.e., the APIs and drawing classes) utilised in Flash. Basically anything that extends DisplayObject and beyond. I was referring to the OP because he specifically said he wanted to use hitTesting and my point was using a method like that would be too precise and require a lot of processing power.

Please explain to me how A* Isn't limited?

Pixel-perfect meaning: consistency in detection and path pathfinding where an object is relative to a specific pixel's point.

Well yeah, then we just both understood different things with Vector maps. I was talking about node maps, where points are connected to each other. (Though like I mentioned, NAPE can convert any DisplayObject into a set of polygons that you can then use for pathfinding.)

In this case A* isn't limited...it will find you the shortest path to another node...

madsman
madsman
  • Member since: Jun. 19, 2010
  • Offline.
Forum Stats
Member
Level 08
Filmmaker
Response to Game Help and suggestions 2012-10-03 17:58:16 Reply

At 10/2/12 08:12 PM, burgerandfries wrote: Hello, I'm currently trying to make a top down view game with enemy's that can chase you, but at the same time avoiding the walls and environment around it. But so far i only got the enemy to follow the player, and I ran out of ideas for the enemy to follow the player. If anyone has helpful suggestions it would be very helpful.

Hi,
Your game sounds interesting and I'd love to give it a try when it comes out so I'll look out for it.
I think by 'top down view' you meen birds eye view?
I was thinking maybe over time more and different enermies start to chase you, and as you avoid objects, your enermies will be getting stoped or slowed down by them.

I hopw this helps,
Madsman.

P.S: Sorry if I've stolen anyone elses points, I didn't read any of the replies, but if more than one person's thinking the same thing, it's an idea worth trying!


Check my page for reasons to: Follow me on newgrounds and Check out my Youtube channel!

burgerandfries
burgerandfries
  • Member since: Mar. 25, 2012
  • Offline.
Forum Stats
Member
Level 08
Programmer
Response to Game Help and suggestions 2012-10-03 18:03:24 Reply

thanks guys for the suggestions, and yes it will be a top down game.