|
Post by snotskie on Nov 8, 2008 14:12:58 GMT -5
im so happy the other week i thought of a really good way to generate some ai decisions based off of path and game theory, the technique itself i dubbed shadow theory, b/c it makes shadows on the path to represent where the character would RATHER not go, instead of only saying where it CANT go. this way it creates the most efficient path instead of just the quickest, allowing it to walk around any obstacles/walls in its way (just think of those dumb ai's where the guy just runs into the wall trying to get to you on the other side) well, today i was making a crap version of pong where you can make an "arena" to play in as a bitmap. your paddle can go anywhere on the screen, the really dark things are walls, the greyish make the ball change direction/slow down, and bright things are just normal. well, i made this "arena" to play in, and noticed that the paths the ball liked to take (no matter how randomly generated) would always remind me of paths taken in my shadow theory, so i drew in colors where the bad shadows, good shadows, and recommended paths would be, and what do you know, the ball would ALWAYS have a trend of following the paths. red - bad shadows/ blue - good shadows/ green - paths i might post the game itself up and the arena to go with it later if anybody would like to play it (or watch it play itself, more ai )
|
|
|
Post by Skillz3905™ on Nov 8, 2008 14:33:33 GMT -5
Wow sounds good. I don't do much of that stuff but still sounds good.
|
|
|
Post by snotskie on Nov 8, 2008 15:15:55 GMT -5
made it leave dots along its path it seems to follow really well up until it interacts with something, at which point the shadows would have changed anyway to compensate for the change and heres a DL for anybody who wants to waste a few mins: www.box.net/shared/xodexf4hlt#Arena_Pong
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 8, 2008 15:28:32 GMT -5
Best few minutes I've ever wasted XD. I like it, if you hold down left you always win. By the way, how do you close the program, it went full screen, and alt+f4 didn't work, neither did alt+enter. But anyway, nice work. ;D
|
|
|
Post by snotskie on Nov 8, 2008 15:45:40 GMT -5
sry, forgot to mention the controls esc - exit f1 - red is human f2 - red is ai f3 - blue is human f4 - blue is ai arrows - blue controls awsd - red controls and its always in full screen mode, sry if that bugs anybody, ill add a button combo for switching between and repost when i get the chance
also, you can draw your own arenas if you want values < 100 are walls values 150-200 are the in between thing values > 200 are normal
|
|