gdalgorithms-list Mailing List for Game Dev Algorithms (Page 19)
Brought to you by:
vexxed72
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(390) |
Aug
(767) |
Sep
(940) |
Oct
(964) |
Nov
(819) |
Dec
(762) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(680) |
Feb
(1075) |
Mar
(954) |
Apr
(595) |
May
(725) |
Jun
(868) |
Jul
(678) |
Aug
(785) |
Sep
(410) |
Oct
(395) |
Nov
(374) |
Dec
(419) |
2002 |
Jan
(699) |
Feb
(501) |
Mar
(311) |
Apr
(334) |
May
(501) |
Jun
(507) |
Jul
(441) |
Aug
(395) |
Sep
(540) |
Oct
(416) |
Nov
(369) |
Dec
(373) |
2003 |
Jan
(514) |
Feb
(488) |
Mar
(396) |
Apr
(624) |
May
(590) |
Jun
(562) |
Jul
(546) |
Aug
(463) |
Sep
(389) |
Oct
(399) |
Nov
(333) |
Dec
(449) |
2004 |
Jan
(317) |
Feb
(395) |
Mar
(136) |
Apr
(338) |
May
(488) |
Jun
(306) |
Jul
(266) |
Aug
(424) |
Sep
(502) |
Oct
(170) |
Nov
(170) |
Dec
(134) |
2005 |
Jan
(249) |
Feb
(109) |
Mar
(119) |
Apr
(282) |
May
(82) |
Jun
(113) |
Jul
(56) |
Aug
(160) |
Sep
(89) |
Oct
(98) |
Nov
(237) |
Dec
(297) |
2006 |
Jan
(151) |
Feb
(250) |
Mar
(222) |
Apr
(147) |
May
(266) |
Jun
(313) |
Jul
(367) |
Aug
(135) |
Sep
(108) |
Oct
(110) |
Nov
(220) |
Dec
(47) |
2007 |
Jan
(133) |
Feb
(144) |
Mar
(247) |
Apr
(191) |
May
(191) |
Jun
(171) |
Jul
(160) |
Aug
(51) |
Sep
(125) |
Oct
(115) |
Nov
(78) |
Dec
(67) |
2008 |
Jan
(165) |
Feb
(37) |
Mar
(130) |
Apr
(111) |
May
(91) |
Jun
(142) |
Jul
(54) |
Aug
(104) |
Sep
(89) |
Oct
(87) |
Nov
(44) |
Dec
(54) |
2009 |
Jan
(283) |
Feb
(113) |
Mar
(154) |
Apr
(395) |
May
(62) |
Jun
(48) |
Jul
(52) |
Aug
(54) |
Sep
(131) |
Oct
(29) |
Nov
(32) |
Dec
(37) |
2010 |
Jan
(34) |
Feb
(36) |
Mar
(40) |
Apr
(23) |
May
(38) |
Jun
(34) |
Jul
(36) |
Aug
(27) |
Sep
(9) |
Oct
(18) |
Nov
(25) |
Dec
|
2011 |
Jan
(1) |
Feb
(14) |
Mar
(1) |
Apr
(5) |
May
(1) |
Jun
|
Jul
|
Aug
(37) |
Sep
(6) |
Oct
(2) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
(7) |
Mar
|
Apr
(4) |
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(10) |
2013 |
Jan
|
Feb
(1) |
Mar
(7) |
Apr
(2) |
May
|
Jun
|
Jul
(9) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(14) |
Feb
|
Mar
(2) |
Apr
|
May
(10) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(12) |
Nov
|
Dec
(1) |
2016 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
From: Sam M. <sam...@ge...> - 2009-12-21 12:01:40
|
I’d agree with Gino. Positional shake just wasn’t obvious enough and looked wrong to me in both 3rd person and 1st person cameras when I last tried it. Rotational shake was the way to go. I didn’t run into a conflict between frame rate and shake rate, although I can see how this could be a problem. Perhaps because the changing shake rate changed fast enough that you didn’t notice any aliasing. Straightforward sine waves looks a bit too smooth though. In order to get the jittery look I just clamped them beyond some threshold so you got the ‘shaking a penny in a box’ effect. Just my 2p. Ta, Sam From: Gino van den Bergen [mailto:gin...@gm...] Sent: 21 December 2009 09:46 To: gda...@li... Subject: Re: [Algorithms] Frame independent Camera Shake You may consider to leave out position shake altogether because slight position changes do not show on objects that are further than a few meters away. Also, ease back on the camera roll because it makes people nauseous. For a racing game I simulated the offset on the yaw and pitch by a point mass that was suspended by a spring damper just as how John described. The impulses where fed from the actual game physics so the camera shake would look more natural (more vertical shake while driving, random shake when colliding.) Gino On 19-12-2009 18:20, Jon Watte wrote: In general, shake is a sum of almost-instantaneous impulses off-center, plus the attempts of the camera person to center the camera. Thus, you can implement camera shake as a sequence of random impulses (Brownian motion style), and a first-order error correction dampened spring. The rate and magnitude of impulses are two main tweakables, plus how much the shake affects camera orientation vs position (turns out, orientation is much wilder than position :-) I'd start with 3 degrees of orientation affect at 5 Hz, and then tweak from there (or set it at that and let the artists make it right :-) Sincerely, jw -- Americans might object: there is no way we would sacrifice our living standards for the benefit of people in the rest of the world. Nevertheless, whether we get there willingly or not, we shall soon have lower consumption rates, because our present rates are unsustainable. On Fri, Dec 18, 2009 at 11:17 PM, Amir H. Fassihi <ah...@ad...> wrote: Hello everyone, I am trying to implement a camera shake feature and I was wondering what a robust and standard technique for it could be. Currently I am using this formula : value = a * sin(nx)/mx; to come up with the displacement necessary for the camera node in time, however, variable frame rates can cause the final result to behave differently. I was wondering what other developers do for implementing camera shakes. Regards, Amir ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |
From: Gino v. d. B. <gin...@gm...> - 2009-12-21 09:45:40
|
You may consider to leave out position shake altogether because slight position changes do not show on objects that are further than a few meters away. Also, ease back on the camera roll because it makes people nauseous. For a racing game I simulated the offset on the yaw and pitch by a point mass that was suspended by a spring damper just as how John described. The impulses where fed from the actual game physics so the camera shake would look more natural (more vertical shake while driving, random shake when colliding.) Gino On 19-12-2009 18:20, Jon Watte wrote: > In general, shake is a sum of almost-instantaneous impulses > off-center, plus the attempts of the camera person to center the > camera. Thus, you can implement camera shake as a sequence of random > impulses (Brownian motion style), and a first-order error correction > dampened spring. The rate and magnitude of impulses are two main > tweakables, plus how much the shake affects camera orientation vs > position (turns out, orientation is much wilder than position :-) > I'd start with 3 degrees of orientation affect at 5 Hz, and then tweak > from there (or set it at that and let the artists make it right :-) > > Sincerely, > > jw > > > -- > Americans might object: there is no way we would sacrifice our living > standards for the benefit of people in the rest of the world. > Nevertheless, whether we get there willingly or not, we shall soon > have lower consumption rates, because our present rates are > unsustainable. > > > > On Fri, Dec 18, 2009 at 11:17 PM, Amir H. Fassihi <ah...@ad... > <mailto:ah...@ad...>> wrote: > > Hello everyone, > > I am trying to implement a camera shake feature and I was > wondering what a robust and standard technique for it could be. > Currently I am using this formula : value = a * sin(nx)/mx; to > come up with the displacement necessary for the camera node in > time, however, variable frame rates can cause the final result to > behave differently. > > I was wondering what other developers do for implementing camera > shakes. > > Regards, > > Amir > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution > fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > <mailto:GDA...@li...> > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |
From: Jon W. <jw...@gm...> - 2009-12-19 17:20:40
|
In general, shake is a sum of almost-instantaneous impulses off-center, plus the attempts of the camera person to center the camera. Thus, you can implement camera shake as a sequence of random impulses (Brownian motion style), and a first-order error correction dampened spring. The rate and magnitude of impulses are two main tweakables, plus how much the shake affects camera orientation vs position (turns out, orientation is much wilder than position :-) I'd start with 3 degrees of orientation affect at 5 Hz, and then tweak from there (or set it at that and let the artists make it right :-) Sincerely, jw -- Americans might object: there is no way we would sacrifice our living standards for the benefit of people in the rest of the world. Nevertheless, whether we get there willingly or not, we shall soon have lower consumption rates, because our present rates are unsustainable. On Fri, Dec 18, 2009 at 11:17 PM, Amir H. Fassihi <ah...@ad...> wrote: > Hello everyone, > > I am trying to implement a camera shake feature and I was wondering what a > robust and standard technique for it could be. > Currently I am using this formula : value = a * sin(nx)/mx; to come up with > the displacement necessary for the camera node in time, however, variable > frame rates can cause the final result to behave differently. > > I was wondering what other developers do for implementing camera shakes. > > Regards, > > Amir > > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |
From: Jason H. <jh...@st...> - 2009-12-19 09:28:44
|
Yes. You don't want the camera position to wander away, so the random amount is an offset from where the camera 'actually' is, before applying any shake. Every frame, you just pick a new spot to put the camera. The intensity is controlled by the scale factor. You might want to make sure the shake vector is a randomized unit vector within the plane parallel to the near plane (ie. XY in camera local space), so you can get more reliable results. Or perhaps non-unit will appeal to you. That's more a matter of taste than science at this point. JH Jason Hughes President Steel Penny Games, Inc. Austin, TX Amir H. Fassihi wrote: > Thank you Jason for the descriptions, would you elaborate the > non-periodic shake a bit more. Does this : camTrans = vector.random() > * scale mean that a random translation is computed every frame and > applied to the camera? > > |
From: Amir H. F. <ah...@ad...> - 2009-12-19 09:13:35
|
Thank you Jason for the descriptions, would you elaborate the non-periodic shake a bit more. Does this : camTrans = vector.random() * scale mean that a random translation is computed every frame and applied to the camera? On Sat, Dec 19, 2009 at 11:05 AM, Jason Hughes <jh...@st...>wrote: > Camera shake is inherently tied to frame rate. A shake that looks good at > 20hz will not necessarily be impressive at 30hz. Even so, if you make sure > the shake occurs according to delta-time rather than a fixed step per frame, > that's at least going in the right direction. For very low framerates, you > may lose all sense of shake at all, just because the frequency of the shake > is a multiple of the frequency of the frames! Nothing much you can do > there. > > If you have that problem, the best I can suggest is try using a > translation-based, non-periodic shake, rather than a rotationally-based > one. The benefit of that is, you get the same sensation of shake regardless > of the scale of your scene (rotation affects distant objects more, > obviously), and non-periodic prevents you from losing the shaking sensation > just because your framerate varies or drops. Eg. camTrans = vector.random() > * scale > > On Wing Commander: Prophecy (or was it WC4?) I put in a camera shake that > was framerate independent in different way... when you got hit, I computed > an axis and angle based on where the shot contacted your ship and how much > damage you had taken, then rotated the camera (for both the HUD and the 3D > scene) + on even frames, - on odd frames, and lerped the angle down toward > zero over time. This gave a kind of drunken-image that worked at high or > low frame rates. > > Two different approaches, two different situations. > > Best, > JH > > Jason Hughes > President > Steel Penny Games, Inc. > Austin, TX > > > > Amir H. Fassihi wrote: > > Hello everyone, > > I am trying to implement a camera shake feature and I was wondering what a > robust and standard technique for it could be. > Currently I am using this formula : value = a * sin(nx)/mx; to come up with > the displacement necessary for the camera node in time, however, variable > frame rates can cause the final result to behave differently. > > I was wondering what other developers do for implementing camera shakes. > > Regards, > > Amir > > ------------------------------ > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customershttp://p.sf.net/sfu/verizon-dev2dev > > ------------------------------ > > _______________________________________________ > GDAlgorithms-list mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives:http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |
From: Jason H. <jh...@st...> - 2009-12-19 07:54:23
|
Camera shake is inherently tied to frame rate. A shake that looks good at 20hz will not necessarily be impressive at 30hz. Even so, if you make sure the shake occurs according to delta-time rather than a fixed step per frame, that's at least going in the right direction. For very low framerates, you may lose all sense of shake at all, just because the frequency of the shake is a multiple of the frequency of the frames! Nothing much you can do there. If you have that problem, the best I can suggest is try using a translation-based, non-periodic shake, rather than a rotationally-based one. The benefit of that is, you get the same sensation of shake regardless of the scale of your scene (rotation affects distant objects more, obviously), and non-periodic prevents you from losing the shaking sensation just because your framerate varies or drops. Eg. camTrans = vector.random() * scale On Wing Commander: Prophecy (or was it WC4?) I put in a camera shake that was framerate independent in different way... when you got hit, I computed an axis and angle based on where the shot contacted your ship and how much damage you had taken, then rotated the camera (for both the HUD and the 3D scene) + on even frames, - on odd frames, and lerped the angle down toward zero over time. This gave a kind of drunken-image that worked at high or low frame rates. Two different approaches, two different situations. Best, JH Jason Hughes President Steel Penny Games, Inc. Austin, TX Amir H. Fassihi wrote: > Hello everyone, > > I am trying to implement a camera shake feature and I was wondering > what a robust and standard technique for it could be. > Currently I am using this formula : value = a * sin(nx)/mx; to come up > with the displacement necessary for the camera node in time, however, > variable frame rates can cause the final result to behave differently. > > I was wondering what other developers do for implementing camera shakes. > > Regards, > > Amir > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > ------------------------------------------------------------------------ > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |
From: Amir H. F. <ah...@ad...> - 2009-12-19 07:17:28
|
Hello everyone, I am trying to implement a camera shake feature and I was wondering what a robust and standard technique for it could be. Currently I am using this formula : value = a * sin(nx)/mx; to come up with the displacement necessary for the camera node in time, however, variable frame rates can cause the final result to behave differently. I was wondering what other developers do for implementing camera shakes. Regards, Amir |
From: <lei...@co...> - 2009-12-19 02:06:51
|
Thanks Jon. Its a j2me game with very limited resources so I am not supporting anything I don't need. I realize that a matrix mul is a mul whether there is a scaling in it or not so there isn't really a performance issue for rendering. It's more for the game logic where I am using basis vectors for direction or determining distance between parts. Also I hate debugging data that requires me to remember everything is scaled for no good reason. As it turns out XSI's freeze scaling leaves all the pivot points unchanged so it's of limited use. For now I am going to fix up the pivot points inside of XSI since the project is small enough. I will cut and paste your suggestion into my build to since I do want to get it going correct at some point. Thanks again! Leigh Jon Watte wrote: > First: Why don't you make your runtime support scaling? > > Second: If you can't do that, then what you said you were doing would > be the right thing to do, assuming you implement it correctly. For the > hierarchy: > > Remove scale from the node transform (times parent extracted scale) > Bake scale into any attached geometry > foreach child: > do the same, passing along any scale you've extracted > > Extracting scale from a matrix is easy as long as there is no skew or > rotated scale center; simply measure the length of each of the basis > vectors (X, Y, Z) and normalize to 1. No full decomposition needed. > > Sincerely, > > jw > > > -- > Americans might object: there is no way we would sacrifice our living > standards for the benefit of people in the rest of the world. > Nevertheless, whether we get there willingly or not, we shall soon > have lower consumption rates, because our present rates are > unsustainable. > > > > On Fri, Dec 18, 2009 at 3:11 PM, lei...@co... > <mailto:lei...@co...> <lei...@co... > <mailto:lei...@co...>> wrote: > > Hello everyone. > > My XSI exporter supports exporting a small hierarchy of objects. One > of it's uses is to allow the game to find parts like the tracks, body, > wheel, turret etc. All works fine until I purchased some models that > are the wrong scale and I decide to scale them in XSI to 1 unit is 1m. > Now my hierarchy has scaling in it. This becomes a mess with bounding > volumes on parts and frame of references having scaling in it. I > finally found an option in XSI to freeze all the scaling but I was > wondering how can I have my build tool do the same thing so that I > won't > have problems down the road? Also its bugging me. > > I tried resolving all the nodes into model space and then using > inverse > transforms to resolve the local transforms on each part. It > didn't work. > > Leigh > > > > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution > fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > <mailto:GDA...@li...> > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > ------------------------------------------------------------------------ > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |
From: Jon W. <jw...@gm...> - 2009-12-19 01:51:13
|
First: Why don't you make your runtime support scaling? Second: If you can't do that, then what you said you were doing would be the right thing to do, assuming you implement it correctly. For the hierarchy: Remove scale from the node transform (times parent extracted scale) Bake scale into any attached geometry foreach child: do the same, passing along any scale you've extracted Extracting scale from a matrix is easy as long as there is no skew or rotated scale center; simply measure the length of each of the basis vectors (X, Y, Z) and normalize to 1. No full decomposition needed. Sincerely, jw -- Americans might object: there is no way we would sacrifice our living standards for the benefit of people in the rest of the world. Nevertheless, whether we get there willingly or not, we shall soon have lower consumption rates, because our present rates are unsustainable. On Fri, Dec 18, 2009 at 3:11 PM, lei...@co... < lei...@co...> wrote: > Hello everyone. > > My XSI exporter supports exporting a small hierarchy of objects. One > of it's uses is to allow the game to find parts like the tracks, body, > wheel, turret etc. All works fine until I purchased some models that > are the wrong scale and I decide to scale them in XSI to 1 unit is 1m. > Now my hierarchy has scaling in it. This becomes a mess with bounding > volumes on parts and frame of references having scaling in it. I > finally found an option in XSI to freeze all the scaling but I was > wondering how can I have my build tool do the same thing so that I won't > have problems down the road? Also its bugging me. > > I tried resolving all the nodes into model space and then using inverse > transforms to resolve the local transforms on each part. It didn't work. > > Leigh > > > > > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |
From: <lei...@co...> - 2009-12-18 23:12:37
|
Hello everyone. My XSI exporter supports exporting a small hierarchy of objects. One of it's uses is to allow the game to find parts like the tracks, body, wheel, turret etc. All works fine until I purchased some models that are the wrong scale and I decide to scale them in XSI to 1 unit is 1m. Now my hierarchy has scaling in it. This becomes a mess with bounding volumes on parts and frame of references having scaling in it. I finally found an option in XSI to freeze all the scaling but I was wondering how can I have my build tool do the same thing so that I won't have problems down the road? Also its bugging me. I tried resolving all the nodes into model space and then using inverse transforms to resolve the local transforms on each part. It didn't work. Leigh |
From: Jeff R. <je...@8m...> - 2009-12-18 17:09:02
|
As I recall, If you're doing environment mapping using a normal map, sometimes depending on your normal map content and your view angle you can get normals that point away from the camera (i.e. N dot V < 0), and this can sometimes end up looking into "wrong", or at least unexpected, sections of the cube map. Don't know if this is your problem, but if it is it can probably be fixed with modified art content (easy), or limiting the normal to at most be 90 degress off the view vector (a little shader work, a little harder). -- Jeff Russell Engineer, 8monkey Labs www.8monkeylabs.com |
From: Zafar Q. <zaf...@co...> - 2009-12-18 15:42:02
|
Hi James, This looks very interesting. Thanks to all of those who responded. Very much appreciated. Cheers Zaf -----Original Message----- From: James Robertson [mailto:ja...@fu...] Sent: 18 December 2009 11:32 To: Game Development Algorithms Subject: Re: [Algorithms] Flipping/Rotating through all possible combinations If you can assign values to your axes and index them through those values, something like this should do it: src[ 0 ] = x; src[ 1 ] = y; src[ 2 ] = z; for( dx = -2; dx <= 2; dx++ ) { for( dy = -2; dy <= 2; dy++ ) { if( dx != dy ) { for( dz = -2; dz <= 2; dz++ ) { if(( dx != dz ) && ( dy != dz )) { x = src[ abs( dx )] * sign( dx ); y = src[ abs( dy )] * sign( dy ); z = src[ abs( dz )] * sign( dz ); } } } } } Zafar Qamar wrote: > Hi, > I have done a water-shader but it looks like some of the values I'm > refracting to may be wrong, hence picking up wrong sides of an > environment map. > > So, I want to try _all possible iterations_ of swapping or negating > x,y and z axes > > eg. > 1) x = -x > > 2) x= y > > 3) x = y > y = z > 4) x= -z > y = x > > etc > etc > etc > > Does anyone know of an algorithm for going through all possible > iterations? > > Cheers > Zafar Qamar > > > > > ********************************************************************** > ************ > Disclaimer > > The information and attached documentation in this e-mail is intended for the use of the addressee only and is confidential. If you are not the intended recipient please delete it and notify us immediately by telephoning or e-mailing the sender. Please note that without Codemasters' prior written consent any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. > > Attachments to this e-mail may contain software viruses. You are advised to take all reasonable precautions to minimise this risk and to carry out a virus check on any documents before they are opened. > > Any offer contained in this communication is subject to Codemasters' standard terms & conditions and must be signed by both parties. Except as expressly provided otherwise all information and attached documentation in this e-mail is subject to contract and Codemasters' board approval. > Any views or opinions expressed are solely those of the author and do not necessarily represent those of Codemasters. > > This footnote also confirms that this email message has been swept by > SurfControl for the presence of computer viruses. > ********************************************************************** > ************ > > ---------------------------------------------------------------------- > -- > > ---------------------------------------------------------------------- > -------- This SF.Net email is sponsored by the Verizon Developer > Community Take advantage of Verizon's best-in-class app development > support A streamlined, 14 day to market process makes app distribution > fast and easy Join now and get one step closer to millions of Verizon > customers http://p.sf.net/sfu/verizon-dev2dev > ---------------------------------------------------------------------- > -- > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-l > ist ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list ********************************************************************************** Disclaimer The information and attached documentation in this e-mail is intended for the use of the addressee only and is confidential. If you are not the intended recipient please delete it and notify us immediately by telephoning or e-mailing the sender. Please note that without Codemasters’ prior written consent any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. Attachments to this e-mail may contain software viruses. You are advised to take all reasonable precautions to minimise this risk and to carry out a virus check on any documents before they are opened. Any offer contained in this communication is subject to Codemasters’ standard terms & conditions and must be signed by both parties. Except as expressly provided otherwise all information and attached documentation in this e-mail is subject to contract and Codemasters’ board approval. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Codemasters. This footnote also confirms that this email message has been swept by SurfControl for the presence of computer viruses. ********************************************************************************** |
From: James R. <ja...@fu...> - 2009-12-18 12:44:30
|
If you can assign values to your axes and index them through those values, something like this should do it: src[ 0 ] = x; src[ 1 ] = y; src[ 2 ] = z; for( dx = -2; dx <= 2; dx++ ) { for( dy = -2; dy <= 2; dy++ ) { if( dx != dy ) { for( dz = -2; dz <= 2; dz++ ) { if(( dx != dz ) && ( dy != dz )) { x = src[ abs( dx )] * sign( dx ); y = src[ abs( dy )] * sign( dy ); z = src[ abs( dz )] * sign( dz ); } } } } } Zafar Qamar wrote: > Hi, > I have done a water-shader but it looks like some of the values I'm > refracting to may be wrong, hence picking up wrong sides of an > environment map. > > So, I want to try _all possible iterations_ of swapping or negating > x,y and z axes > > eg. > 1) x = -x > > 2) x= y > > 3) x = y > y = z > 4) x= -z > y = x > > etc > etc > etc > > Does anyone know of an algorithm for going through all possible > iterations? > > Cheers > Zafar Qamar > > > > > ********************************************************************************** > Disclaimer > > The information and attached documentation in this e-mail is intended for the use of the addressee only and is confidential. If you are not the intended recipient please delete it and notify us immediately by telephoning or e-mailing the sender. Please note that without Codemasters’ prior written consent any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. > > Attachments to this e-mail may contain software viruses. You are advised to take all reasonable precautions to minimise this risk and to carry out a virus check on any documents before they are opened. > > Any offer contained in this communication is subject to Codemasters’ standard terms & conditions and must be signed by both parties. Except as expressly provided otherwise all information and attached documentation in this e-mail is subject to contract and Codemasters’ board approval. > Any views or opinions expressed are solely those of the author and do not necessarily represent those of Codemasters. > > This footnote also confirms that this email message has been swept by > SurfControl for the presence of computer viruses. > ********************************************************************************** > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > ------------------------------------------------------------------------ > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |
From: Richard F. <ra...@gm...> - 2009-12-18 12:44:11
|
That's a combinatorics "picking" problem where you have three picks. Six choices for the first, four for the second, and two for the third. that gives you 6 * 4 * 2 choices to run through... thats a lot. You'd be better off figuring out what's wrong as you might not even recognise the correct case as there may be other errors. 2009/12/18 Zafar Qamar <zaf...@co...> > Hi, > I have done a water-shader but it looks like some of the values I'm > refracting to may be wrong, hence picking up wrong sides of an environment > map. > > So, I want to try *all possible iterations* of swapping or negating x,y > and z axes > > eg. > 1) x = -x > > 2) x= y > > 3) x = y > y = z > 4) x= -z > y = x > > etc > etc > etc > > Does anyone know of an algorithm for going through all possible iterations? > > Cheers > Zafar Qamar > > > > > > ********************************************************************************** > Disclaimer > > > The information and attached documentation in this e-mail is intended for the use of the addressee only and is confidential. If you are not the intended recipient please delete it and notify us immediately by telephoning or e-mailing the sender. Please note that without Codemasters’ prior written consent any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. > > > Attachments to this e-mail may contain software viruses. You are advised to take all reasonable precautions to minimise this risk and to carry out a virus check on any documents before they are opened. > > > Any offer contained in this communication is subject to Codemasters’ standard terms & conditions and must be signed by both parties. Except as expressly provided otherwise all information and attached documentation in this e-mail is subject to contract and Codemasters’ board approval. > > Any views or opinions expressed are solely those of the author and do not necessarily represent those of Codemasters. > > This footnote also confirms that this email message has been swept by > SurfControl for the presence of computer viruses. > > ********************************************************************************** > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > -- fabs(); Just because the world is full of people that think just like you, doesn't mean the other ones can't be right. |
From: Zafar Q. <zaf...@co...> - 2009-12-18 11:16:22
|
Hi, I have done a water-shader but it looks like some of the values I'm refracting to may be wrong, hence picking up wrong sides of an environment map. So, I want to try all possible iterations of swapping or negating x,y and z axes eg. 1) x = -x 2) x= y 3) x = y y = z 4) x= -z y = x etc etc etc Does anyone know of an algorithm for going through all possible iterations? Cheers Zafar Qamar ********************************************************************************** Disclaimer The information and attached documentation in this e-mail is intended for the use of the addressee only and is confidential. If you are not the intended recipient please delete it and notify us immediately by telephoning or e-mailing the sender. Please note that without Codemasters’ prior written consent any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. Attachments to this e-mail may contain software viruses. You are advised to take all reasonable precautions to minimise this risk and to carry out a virus check on any documents before they are opened. Any offer contained in this communication is subject to Codemasters’ standard terms & conditions and must be signed by both parties. Except as expressly provided otherwise all information and attached documentation in this e-mail is subject to contract and Codemasters’ board approval. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Codemasters. This footnote also confirms that this email message has been swept by SurfControl for the presence of computer viruses. ********************************************************************************** |
From: Johan G. <spi...@gm...> - 2009-12-18 09:36:24
|
Hi just wanted to share how we did it for a very small project which was more or less a hobby project aswell, the AI was very simplistic and the way we chose to implement it was also very simplistic and was based on a binary decision tree, within code we created a number of decision nodes, we had 2 kind of nodes, binary and unary. This didnt prevent us from having multiple choices since we simply added branching nodes that depending on the input would branch left or right, by stringing them together we could create switch like statements. The neat part about this solution was that we created a graphical tool that allowed us to drag & drop nodes on a blank sheet and create both very simple or more complex AI brains very fast. This solution will not suit more advanced AI but if your game is not that demanding of the AI I can really encourage you to try it out. You also get to write a simply GUI editor! It could also be very interesting to expand on the concept and incorporate the decision trees into states etc, we never took it that far though. |
From: Stuart G. <gda...@gx...> - 2009-12-16 21:38:53
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> Ryan Juckett wrote: <blockquote cite="mid:e86...@ma..." type="cite"> <div class="gmail_quote"> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"> <div text="#000000" bgcolor="#ffffff"> <div class="im"> <blockquote type="cite">To be honest, I hadn't got much further than the design I originally suggested (well, I have a few more diagrams this end). By "composite behaviour" I guess I effectively meant branch nodes in a behaviour tree. I'd realised there were going to be some concurrency issues involved when I got round to building the behaviour trees, but I hadn't really come across the idea of a concurrent HFSM. I think it possibly sounds a little over my head at this point :), but it does seem an interesting approach. Are you thinking that a standard HFSM won't be ideal for what I'm trying to do though? I'm trying to come up with something I can do in the time really (I'm writing up a PhD thesis at the same time and trying to get the game up and running so I can use it as a demo for job interviews among other things, although I ideally also want it to be quite flexible). </blockquote> </div> </div> </blockquote> <div>I simple HFSM should be fine. Lots of games have used that approach. It might have some more code duplication between behaviours, but has the benefit of being very explicit. Don't overcomplicate things until you find a need for it.</div> <div> </div> <div><br> </div> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"> <div text="#000000" bgcolor="#ffffff">Automatically-generated transitions sound interesting - any useful links by any chance? (I tried Googling for "fsm automatic transition generation goal action" but got a load of stuff on automatic code generation instead unfortunately...)<br> </div> </blockquote> <div> </div> <div>What I was refering to was somthing like a mix between a HFSM and the GOAP (<a moz-do-not-send="true" href="http://web.media.mit.edu/%7Ejorkin/goap.html">http://web.media.mit.edu/~jorkin/goap.html</a>) stuff from F.E.A.R. It can maintain the explicit higher level transitions and let the system automatically figure the rest out. Regardless, a non-concurrent HFSM should be fine for what you are doing.</div> </div> </blockquote> Cheers for the link :)<br> <br> Stu<br> <blockquote cite="mid:e86...@ma..." type="cite"> <div class="gmail_quote"></div> <br> - Ryan <pre wrap=""> <hr size="4" width="90%"> ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers <a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/verizon-dev2dev">http://p.sf.net/sfu/verizon-dev2dev</a> </pre> <pre wrap=""> <hr size="4" width="90%"> _______________________________________________ GDAlgorithms-list mailing list <a class="moz-txt-link-abbreviated" href="mailto:GDA...@li...">GDA...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list">https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list</a> Archives: <a class="moz-txt-link-freetext" href="http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list">http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list</a></pre> </blockquote> </body> </html> |
From: Ryan J. <rya...@gm...> - 2009-12-16 19:55:15
|
> > To be honest, I hadn't got much further than the design I originally > suggested (well, I have a few more diagrams this end). By "composite > behaviour" I guess I effectively meant branch nodes in a behaviour tree. I'd > realised there were going to be some concurrency issues involved when I got > round to building the behaviour trees, but I hadn't really come across the > idea of a concurrent HFSM. I think it possibly sounds a little over my head > at this point :), but it does seem an interesting approach. Are you thinking > that a standard HFSM won't be ideal for what I'm trying to do though? I'm > trying to come up with something I can do in the time really (I'm writing up > a PhD thesis at the same time and trying to get the game up and running so I > can use it as a demo for job interviews among other things, although I > ideally also want it to be quite flexible). > > I simple HFSM should be fine. Lots of games have used that approach. It might have some more code duplication between behaviours, but has the benefit of being very explicit. Don't overcomplicate things until you find a need for it. > Automatically-generated transitions sound interesting - any useful links by > any chance? (I tried Googling for "fsm automatic transition generation goal > action" but got a load of stuff on automatic code generation instead > unfortunately...) > What I was refering to was somthing like a mix between a HFSM and the GOAP ( http://web.media.mit.edu/~jorkin/goap.html) stuff from F.E.A.R. It can maintain the explicit higher level transitions and let the system automatically figure the rest out. Regardless, a non-concurrent HFSM should be fine for what you are doing. - Ryan |
From: Stuart G. <gda...@gx...> - 2009-12-16 15:25:04
|
I know you can save compiled bytecode and reload it, although the generated bytecode isn't cross-platform. Not sure about compiling it to C++. I'm not at the point where it might be a performance bottleneck yet (since I'm still designing the AI), so I haven't experimented too much with the compilation approach so far. Stu Adrian Hirst wrote: > Hi, > > I know little about AngelScript, but from memory, I remember being > told that it provides an option to convert directly into C++ code that > can then be compiled (and if necessary manually optimised) as a > solution to any speed issue? > > Adrian > > Stuart Golodetz wrote: >> On a scripting language note - I'm using AngelScript at the moment (+ >> a home-built wrapper to make the binding process easy), just >> wondering what you guys think of it as a viable alternative to Lua? >> It seems ok for a hobby project (and I actually thought it seemed >> easier to integrate than Lua when I was making the decision), but is >> it suitable for a commercial game? (I've come across performance and >> ease-of-scripting as potential downsides - just wondering whether >> those are the key issues when you're deciding. For my purposes, the >> ease-of-scripting wasn't really an issue because I'm a programmer >> working on my own, and the performance wasn't a killer problem >> because my game's not cutting-edge, so AngelScript seemed like a good >> fit.) >> >> Cheers (and thanks for the feedback), >> Stu >> >> der...@he... wrote: >>> I've been playing around with Lua for AI HFSM and state implementations and I'd also suggest it as a good match for the OP's case. >>> >>> A code base I worked with a lot recently used Ruby to generate CPP files and data structures offline and that could have been used very elegantly to build AI. The only thing I'm unsure of there is whether Ruby is a useful runtime option. At least with Lua you know that it can and has been significantly used at runtime on some not particularly powerful platforms. >>> >>> On the topic raised, the scheme the OP is proposing to implement sounds like a solid approach to me. >>> >>> Cheers >>> Derek >>> >>> Sent via BlackBerry® from Vodafone >>> >>> -----Original Message----- >>> From: "lei...@co..." <lei...@co...> >>> Date: Tue, 15 Dec 2009 17:02:04 >>> To: Game Development Algorithms<gda...@li...> >>> Subject: Re: [Algorithms] Ideas for an AI scheme >>> >>> I actually dumped all my xml except for exporting assets from XSI. I >>> switched to lua. Even if you have a tool to edit the files you still >>> have to write code for DOM and/or SAX parsing. I found I could just get >>> more done much faster with lua. >>> >>> Leigh >>> >>> Nicholas "Indy" Ray wrote: >>> >>>> The largest problem I see is that XML (or really any text based >>>> format) is terrible for design and editing of any complicated FSM, I >>>> think a FSM is one of the instances where a graphical editing tool >>>> actually makes sense. >>>> >>>> Indy >>>> >>>> On Tue, Dec 15, 2009 at 11:35 AM, Stuart Golodetz >>>> <gda...@gx...> wrote: >>>> >>>> >>>>> Hi, >>>>> >>>>> I've been having a think about how to approach the AI for my game and >>>>> was wondering if I could have some thoughts on the scheme I'm pondering >>>>> before I sit down and implement it please? I'd like to make sure I'm not >>>>> over-engineering it (it's not something I've tried before) :) >>>>> >>>>> What I'm thinking of is a hybrid hierarchical FSM / behaviour tree >>>>> scheme. The hierarchical FSM structure would be defined in XML, and each >>>>> state/transition could be defined either to reference a state/transition >>>>> coded in C++ or a script. A state would yield a behaviour when executed >>>>> (possibly a composite behaviour, which is where the behaviour trees come >>>>> in). The behaviour could either be one defined in C++ or a behaviour >>>>> tree defined in XML which has C++ behaviours as its nodes. A behaviour >>>>> should ultimately yield object commands, such as "accelerate in >>>>> direction d", or "fire weapon", etc. Steering-related behaviours (such >>>>> as going to a particular position) could delegate to a steering pipeline. >>>>> >>>>> Does this make sense as a scheme? I realise there's a lot to code there, >>>>> which is why I'm asking beforehand - but is it a sensible way to go? >>>>> Also, does anyone have any alternative suggestions please? >>>>> >>>>> Cheers, >>>>> Stuart >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> This SF.Net email is sponsored by the Verizon Developer Community >>>>> Take advantage of Verizon's best-in-class app development support >>>>> A streamlined, 14 day to market process makes app distribution fast and easy >>>>> Join now and get one step closer to millions of Verizon customers >>>>> http://p.sf.net/sfu/verizon-dev2dev >>>>> _______________________________________________ >>>>> GDAlgorithms-list mailing list >>>>> GDA...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >>>>> Archives: >>>>> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >>>>> >>>>> >>>>> >>>> ------------------------------------------------------------------------------ >>>> This SF.Net email is sponsored by the Verizon Developer Community >>>> Take advantage of Verizon's best-in-class app development support >>>> A streamlined, 14 day to market process makes app distribution fast and easy >>>> Join now and get one step closer to millions of Verizon customers >>>> http://p.sf.net/sfu/verizon-dev2dev >>>> _______________________________________________ >>>> GDAlgorithms-list mailing list >>>> GDA...@li... >>>> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >>>> Archives: >>>> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >>>> >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF.Net email is sponsored by the Verizon Developer Community >>> Take advantage of Verizon's best-in-class app development support >>> A streamlined, 14 day to market process makes app distribution fast and easy >>> Join now and get one step closer to millions of Verizon customers >>> http://p.sf.net/sfu/verizon-dev2dev >>> _______________________________________________ >>> GDAlgorithms-list mailing list >>> GDA...@li... >>> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >>> Archives: >>> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >>> ------------------------------------------------------------------------------ >>> This SF.Net email is sponsored by the Verizon Developer Community >>> Take advantage of Verizon's best-in-class app development support >>> A streamlined, 14 day to market process makes app distribution fast and easy >>> Join now and get one step closer to millions of Verizon customers >>> http://p.sf.net/sfu/verizon-dev2dev >>> _______________________________________________ >>> GDAlgorithms-list mailing list >>> GDA...@li... >>> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >>> Archives: >>> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast and easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> GDAlgorithms-list mailing list >> GDA...@li... >> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > ------------------------------------------------------------------------ > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |
From: Adrian H. <ad...@ad...> - 2009-12-16 15:06:44
|
Hi, I know little about AngelScript, but from memory, I remember being told that it provides an option to convert directly into C++ code that can then be compiled (and if necessary manually optimised) as a solution to any speed issue? Adrian Stuart Golodetz wrote: > On a scripting language note - I'm using AngelScript at the moment (+ > a home-built wrapper to make the binding process easy), just wondering > what you guys think of it as a viable alternative to Lua? It seems ok > for a hobby project (and I actually thought it seemed easier to > integrate than Lua when I was making the decision), but is it suitable > for a commercial game? (I've come across performance and > ease-of-scripting as potential downsides - just wondering whether > those are the key issues when you're deciding. For my purposes, the > ease-of-scripting wasn't really an issue because I'm a programmer > working on my own, and the performance wasn't a killer problem because > my game's not cutting-edge, so AngelScript seemed like a good fit.) > > Cheers (and thanks for the feedback), > Stu > > der...@he... wrote: >> I've been playing around with Lua for AI HFSM and state implementations and I'd also suggest it as a good match for the OP's case. >> >> A code base I worked with a lot recently used Ruby to generate CPP files and data structures offline and that could have been used very elegantly to build AI. The only thing I'm unsure of there is whether Ruby is a useful runtime option. At least with Lua you know that it can and has been significantly used at runtime on some not particularly powerful platforms. >> >> On the topic raised, the scheme the OP is proposing to implement sounds like a solid approach to me. >> >> Cheers >> Derek >> >> Sent via BlackBerry® from Vodafone >> >> -----Original Message----- >> From: "lei...@co..." <lei...@co...> >> Date: Tue, 15 Dec 2009 17:02:04 >> To: Game Development Algorithms<gda...@li...> >> Subject: Re: [Algorithms] Ideas for an AI scheme >> >> I actually dumped all my xml except for exporting assets from XSI. I >> switched to lua. Even if you have a tool to edit the files you still >> have to write code for DOM and/or SAX parsing. I found I could just get >> more done much faster with lua. >> >> Leigh >> >> Nicholas "Indy" Ray wrote: >> >>> The largest problem I see is that XML (or really any text based >>> format) is terrible for design and editing of any complicated FSM, I >>> think a FSM is one of the instances where a graphical editing tool >>> actually makes sense. >>> >>> Indy >>> >>> On Tue, Dec 15, 2009 at 11:35 AM, Stuart Golodetz >>> <gda...@gx...> wrote: >>> >>> >>>> Hi, >>>> >>>> I've been having a think about how to approach the AI for my game and >>>> was wondering if I could have some thoughts on the scheme I'm pondering >>>> before I sit down and implement it please? I'd like to make sure I'm not >>>> over-engineering it (it's not something I've tried before) :) >>>> >>>> What I'm thinking of is a hybrid hierarchical FSM / behaviour tree >>>> scheme. The hierarchical FSM structure would be defined in XML, and each >>>> state/transition could be defined either to reference a state/transition >>>> coded in C++ or a script. A state would yield a behaviour when executed >>>> (possibly a composite behaviour, which is where the behaviour trees come >>>> in). The behaviour could either be one defined in C++ or a behaviour >>>> tree defined in XML which has C++ behaviours as its nodes. A behaviour >>>> should ultimately yield object commands, such as "accelerate in >>>> direction d", or "fire weapon", etc. Steering-related behaviours (such >>>> as going to a particular position) could delegate to a steering pipeline. >>>> >>>> Does this make sense as a scheme? I realise there's a lot to code there, >>>> which is why I'm asking beforehand - but is it a sensible way to go? >>>> Also, does anyone have any alternative suggestions please? >>>> >>>> Cheers, >>>> Stuart >>>> >>>> ------------------------------------------------------------------------------ >>>> This SF.Net email is sponsored by the Verizon Developer Community >>>> Take advantage of Verizon's best-in-class app development support >>>> A streamlined, 14 day to market process makes app distribution fast and easy >>>> Join now and get one step closer to millions of Verizon customers >>>> http://p.sf.net/sfu/verizon-dev2dev >>>> _______________________________________________ >>>> GDAlgorithms-list mailing list >>>> GDA...@li... >>>> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >>>> Archives: >>>> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >>>> >>>> >>>> >>> ------------------------------------------------------------------------------ >>> This SF.Net email is sponsored by the Verizon Developer Community >>> Take advantage of Verizon's best-in-class app development support >>> A streamlined, 14 day to market process makes app distribution fast and easy >>> Join now and get one step closer to millions of Verizon customers >>> http://p.sf.net/sfu/verizon-dev2dev >>> _______________________________________________ >>> GDAlgorithms-list mailing list >>> GDA...@li... >>> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >>> Archives: >>> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >>> >>> >>> >> >> >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast and easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> GDAlgorithms-list mailing list >> GDA...@li... >> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast and easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> GDAlgorithms-list mailing list >> GDA...@li... >> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > ------------------------------------------------------------------------ > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |
From: Stuart G. <gda...@gx...> - 2009-12-16 13:01:41
|
Ryan Juckett wrote: > > Given that you mention building a "composite behavior" from the tree, > I'm assuming you are looking to build a concurrent hierarchical finite > state machine rather than a standard HFSM. In a concurrent HFSM, a > node in the tree might have multiple active child states running at once. > To be honest, I hadn't got much further than the design I originally suggested (well, I have a few more diagrams this end). By "composite behaviour" I guess I effectively meant branch nodes in a behaviour tree. I'd realised there were going to be some concurrency issues involved when I got round to building the behaviour trees, but I hadn't really come across the idea of a concurrent HFSM. I think it possibly sounds a little over my head at this point :), but it does seem an interesting approach. Are you thinking that a standard HFSM won't be ideal for what I'm trying to do though? I'm trying to come up with something I can do in the time really (I'm writing up a PhD thesis at the same time and trying to get the game up and running so I can use it as a demo for job interviews among other things, although I ideally also want it to be quite flexible). > > I've used concurrent HFSMs on multiple titles in the past. The > heaviest use of the system was from a third person shooter. The > ability to reuse and combine small sub-states to create more > complicated behavior proved very useful. For example, different > behaviors of moving, aiming, and reloading could all be built > separately and then mixed and matched based on higher level > transitions (e.g. on a vehicle, hiding in cover, fighting from cover). > It was also fairly easy to append new concurrent behaviors onto an agent. > > There were two main downsides to the system that I recall. The first > was related to the complexity of it all. In a non-concurrent system, > you are only in a single branch at any given time. This makes it much > easier to visualize what is happening in the agent as well as debug > how you got to a given state. It is also a bit easier to grasp the > behavior design in a non-concurrent system. By the end we had ambient > animals, enemies, scripted allies, vehicles, bosses, and so on all > able to start mixing and matching these behavior building blocks. It > wasn't that fun to digest. > > The second issue was related to different concurrent behaviors > fighting for control of a similar feature (e.g. movement). When new > features are added, it is easy for conflicts to crop up which require > messing with the hierarchy a bunch to work out. To alleviate this > nightmare, we ended up supporting multiple "requests" to different > systems. For example, if one behavior was telling an agent to move > towards cover and then another behavior was telling him to evade an > incoming vehicle, the commands from the vehicle evasion could be set > as a higher priority. I don't think this is the best solution, but it > was much more successful in creating a stable game on schedule than > trying to constantly rework the hierarchy. > > As for editing the state machines, it was all in the custom scripting > language used by the rest of the game. Having a graphical interface > would have been great, but the priority of it never worked its way > high enough up the todo list. The states were basically just data > structures (similar to the XML approach you suggest but probably much > less verbose with syntax). At least 99% of the transitions and states > were written in C++ for performance reasons although we did support > scripted ones. > > If you are doing a smaller indie game, I think it would be fine to > text edit stuff and the system as a whole should work. As for doing a > very large scale big budget game, I'd definitely weigh all your > options. I've since become a fan of systems where the transitions were > automatically generated for lower level AI behavior - something like a > goal/action approach. Automatically-generated transitions sound interesting - any useful links by any chance? (I tried Googling for "fsm automatic transition generation goal action" but got a load of stuff on automatic code generation instead unfortunately...) Cheers, Stu > - Ryan > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > ------------------------------------------------------------------------ > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |
From: Stuart G. <gda...@gx...> - 2009-12-16 12:40:09
|
Tom Plunket wrote: > Stuart Golodetz <gda...@gx...> wrote: > > >> I've been having a think about how to approach the AI for my game and >> was wondering if I could have some thoughts on the scheme I'm pondering >> before I sit down and implement it please? >> > > The approach I like to take when starting on an unknown task is to just start building tests for what I expect the functionality to do. Against a unit testing library like UnitTest++ this is really easy. > > In cases where you truly don't know what you want to do, just spew out one possible option at a time and see if it makes sense to code against. This happens to me regularly enough, especially in cases where the stated requirements are fairly vague. I may change directions after every test attempt, or I may even rough out something fairly complete before deciding to change tacks, the key is that the tests that you're writing serve as a prototypical client of your new code. The nice bang-on effect of making your API simple to reduce typing in your tests just sweetens the pot! > I find the way I usually end up doing the actual design of the code architecture is to write a lot of stub classes (every method just throws an exception initially - I'm not trying to run the program) in a separate single-file test project and play around with them until they all fit together :) That's worked quite well in the past, actually, because shoving everything in one file for test purposes makes it really easy to change things without too much faffing around. The test code can become the basis for a proper unit test once the system's up and running. The problem I tend to have more is one of not planning all the way to the end - i.e. not always considering future requirements when planning a system (sometimes it's not possible, but still). There've been a few occasions when writing this game when I've realised that a subsystem that worked perfectly well earlier for what it was designed for just wasn't up to the task for something I was doing now. Then again, I suppose you get good at refactoring that way... I guess being able to plan things to the end is something that comes with a fuller understanding of what you're trying to build. > For what it's worth, hierarchical finite state machines are known to work for many problems, even when the data is represented by XML. While a graphical tool can ease development of medium-sized HFSMs, they can still get unwieldy fast. > Thanks. The main reason I was thinking XML for the file format is actually because I have a parser for it already up and running and I'm getting fed up with writing new file loaders at this point...! I think my state machines aren't likely to be on an industrial scale, so it sounds like it should be possible to make it work. Stu > Good luck, > -tom! > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > ------------------------------------------------------------------------ > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |
From: Stuart G. <gda...@gx...> - 2009-12-16 12:39:50
|
On a scripting language note - I'm using AngelScript at the moment (+ a home-built wrapper to make the binding process easy), just wondering what you guys think of it as a viable alternative to Lua? It seems ok for a hobby project (and I actually thought it seemed easier to integrate than Lua when I was making the decision), but is it suitable for a commercial game? (I've come across performance and ease-of-scripting as potential downsides - just wondering whether those are the key issues when you're deciding. For my purposes, the ease-of-scripting wasn't really an issue because I'm a programmer working on my own, and the performance wasn't a killer problem because my game's not cutting-edge, so AngelScript seemed like a good fit.) Cheers (and thanks for the feedback), Stu der...@he... wrote: > I've been playing around with Lua for AI HFSM and state implementations and I'd also suggest it as a good match for the OP's case. > > A code base I worked with a lot recently used Ruby to generate CPP files and data structures offline and that could have been used very elegantly to build AI. The only thing I'm unsure of there is whether Ruby is a useful runtime option. At least with Lua you know that it can and has been significantly used at runtime on some not particularly powerful platforms. > > On the topic raised, the scheme the OP is proposing to implement sounds like a solid approach to me. > > Cheers > Derek > > Sent via BlackBerry® from Vodafone > > -----Original Message----- > From: "lei...@co..." <lei...@co...> > Date: Tue, 15 Dec 2009 17:02:04 > To: Game Development Algorithms<gda...@li...> > Subject: Re: [Algorithms] Ideas for an AI scheme > > I actually dumped all my xml except for exporting assets from XSI. I > switched to lua. Even if you have a tool to edit the files you still > have to write code for DOM and/or SAX parsing. I found I could just get > more done much faster with lua. > > Leigh > > Nicholas "Indy" Ray wrote: > >> The largest problem I see is that XML (or really any text based >> format) is terrible for design and editing of any complicated FSM, I >> think a FSM is one of the instances where a graphical editing tool >> actually makes sense. >> >> Indy >> >> On Tue, Dec 15, 2009 at 11:35 AM, Stuart Golodetz >> <gda...@gx...> wrote: >> >> >>> Hi, >>> >>> I've been having a think about how to approach the AI for my game and >>> was wondering if I could have some thoughts on the scheme I'm pondering >>> before I sit down and implement it please? I'd like to make sure I'm not >>> over-engineering it (it's not something I've tried before) :) >>> >>> What I'm thinking of is a hybrid hierarchical FSM / behaviour tree >>> scheme. The hierarchical FSM structure would be defined in XML, and each >>> state/transition could be defined either to reference a state/transition >>> coded in C++ or a script. A state would yield a behaviour when executed >>> (possibly a composite behaviour, which is where the behaviour trees come >>> in). The behaviour could either be one defined in C++ or a behaviour >>> tree defined in XML which has C++ behaviours as its nodes. A behaviour >>> should ultimately yield object commands, such as "accelerate in >>> direction d", or "fire weapon", etc. Steering-related behaviours (such >>> as going to a particular position) could delegate to a steering pipeline. >>> >>> Does this make sense as a scheme? I realise there's a lot to code there, >>> which is why I'm asking beforehand - but is it a sensible way to go? >>> Also, does anyone have any alternative suggestions please? >>> >>> Cheers, >>> Stuart >>> >>> ------------------------------------------------------------------------------ >>> This SF.Net email is sponsored by the Verizon Developer Community >>> Take advantage of Verizon's best-in-class app development support >>> A streamlined, 14 day to market process makes app distribution fast and easy >>> Join now and get one step closer to millions of Verizon customers >>> http://p.sf.net/sfu/verizon-dev2dev >>> _______________________________________________ >>> GDAlgorithms-list mailing list >>> GDA...@li... >>> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >>> Archives: >>> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >>> >>> >>> >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast and easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> GDAlgorithms-list mailing list >> GDA...@li... >> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >> >> >> > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |
From: Jose M. <jos...@ya...> - 2009-12-16 10:02:09
|
I agree! Lua it's a great choice to represent AI (and other things) in a game. Google FSM Lua and you will see some implementations samples, like this one: http://lua-users.org/wiki/FiniteStateMachine By the way, I'm replacing all my XML stuff by Lua tables. Much easier to handle. --- Em ter, 15/12/09, der...@he... <der...@he...> escreveu: > De: der...@he... <der...@he...> > Assunto: Re: [Algorithms] Ideas for an AI scheme > Para: "Game Development Algorithms" <gda...@li...> > Data: Terça-feira, 15 de Dezembro de 2009, 22:28 > I've been playing around with Lua for > AI HFSM and state implementations and I'd also suggest it as > a good match for the OP's case. > > A code base I worked with a lot recently used Ruby to > generate CPP files and data structures offline and that > could have been used very elegantly to build AI. The only > thing I'm unsure of there is whether Ruby is a useful > runtime option. At least with Lua you know that it can and > has been significantly used at runtime on some not > particularly powerful platforms. > > On the topic raised, the scheme the OP is proposing to > implement sounds like a solid approach to me. > > Cheers > Derek > > Sent via BlackBerry® from Vodafone > > -----Original Message----- > From: "lei...@co..." > <lei...@co...> > Date: Tue, 15 Dec 2009 17:02:04 > To: Game Development Algorithms<gda...@li...> > Subject: Re: [Algorithms] Ideas for an AI scheme > > I actually dumped all my xml except for exporting assets > from XSI. I > switched to lua. Even if you have a tool to edit the > files you still > have to write code for DOM and/or SAX parsing. I > found I could just get > more done much faster with lua. > > Leigh > > Nicholas "Indy" Ray wrote: > > The largest problem I see is that XML (or really any > text based > > format) is terrible for design and editing of any > complicated FSM, I > > think a FSM is one of the instances where a graphical > editing tool > > actually makes sense. > > > > Indy > > > > On Tue, Dec 15, 2009 at 11:35 AM, Stuart Golodetz > > <gda...@gx...> > wrote: > > > >> Hi, > >> > >> I've been having a think about how to approach the > AI for my game and > >> was wondering if I could have some thoughts on the > scheme I'm pondering > >> before I sit down and implement it please? I'd > like to make sure I'm not > >> over-engineering it (it's not something I've tried > before) :) > >> > >> What I'm thinking of is a hybrid hierarchical FSM > / behaviour tree > >> scheme. The hierarchical FSM structure would be > defined in XML, and each > >> state/transition could be defined either to > reference a state/transition > >> coded in C++ or a script. A state would yield a > behaviour when executed > >> (possibly a composite behaviour, which is where > the behaviour trees come > >> in). The behaviour could either be one defined in > C++ or a behaviour > >> tree defined in XML which has C++ behaviours as > its nodes. A behaviour > >> should ultimately yield object commands, such as > "accelerate in > >> direction d", or "fire weapon", etc. > Steering-related behaviours (such > >> as going to a particular position) could delegate > to a steering pipeline. > >> > >> Does this make sense as a scheme? I realise > there's a lot to code there, > >> which is why I'm asking beforehand - but is it a > sensible way to go? > >> Also, does anyone have any alternative suggestions > please? > >> > >> Cheers, > >> Stuart > >> > >> > ------------------------------------------------------------------------------ > >> This SF.Net email is sponsored by the Verizon > Developer Community > >> Take advantage of Verizon's best-in-class app > development support > >> A streamlined, 14 day to market process makes app > distribution fast and easy > >> Join now and get one step closer to millions of > Verizon customers > >> http://p.sf.net/sfu/verizon-dev2dev > >> _______________________________________________ > >> GDAlgorithms-list mailing list > >> GDA...@li... > >> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > >> Archives: > >> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > >> > >> > > > > > ------------------------------------------------------------------------------ > > This SF.Net email is sponsored by the Verizon > Developer Community > > Take advantage of Verizon's best-in-class app > development support > > A streamlined, 14 day to market process makes app > distribution fast and easy > > Join now and get one step closer to millions of > Verizon customers > > http://p.sf.net/sfu/verizon-dev2dev > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > > > > > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer > Community > Take advantage of Verizon's best-in-class app development > support > A streamlined, 14 day to market process makes app > distribution fast and easy > Join now and get one step closer to millions of Verizon > customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer > Community > Take advantage of Verizon's best-in-class app development > support > A streamlined, 14 day to market process makes app > distribution fast and easy > Join now and get one step closer to millions of Verizon > customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > ____________________________________________________________________________________ Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com |
From: Ryan J. <rya...@gm...> - 2009-12-16 06:02:57
|
Given that you mention building a "composite behavior" from the tree, I'm assuming you are looking to build a concurrent hierarchical finite state machine rather than a standard HFSM. In a concurrent HFSM, a node in the tree might have multiple active child states running at once. I've used concurrent HFSMs on multiple titles in the past. The heaviest use of the system was from a third person shooter. The ability to reuse and combine small sub-states to create more complicated behavior proved very useful. For example, different behaviors of moving, aiming, and reloading could all be built separately and then mixed and matched based on higher level transitions (e.g. on a vehicle, hiding in cover, fighting from cover). It was also fairly easy to append new concurrent behaviors onto an agent. There were two main downsides to the system that I recall. The first was related to the complexity of it all. In a non-concurrent system, you are only in a single branch at any given time. This makes it much easier to visualize what is happening in the agent as well as debug how you got to a given state. It is also a bit easier to grasp the behavior design in a non-concurrent system. By the end we had ambient animals, enemies, scripted allies, vehicles, bosses, and so on all able to start mixing and matching these behavior building blocks. It wasn't that fun to digest. The second issue was related to different concurrent behaviors fighting for control of a similar feature (e.g. movement). When new features are added, it is easy for conflicts to crop up which require messing with the hierarchy a bunch to work out. To alleviate this nightmare, we ended up supporting multiple "requests" to different systems. For example, if one behavior was telling an agent to move towards cover and then another behavior was telling him to evade an incoming vehicle, the commands from the vehicle evasion could be set as a higher priority. I don't think this is the best solution, but it was much more successful in creating a stable game on schedule than trying to constantly rework the hierarchy. As for editing the state machines, it was all in the custom scripting language used by the rest of the game. Having a graphical interface would have been great, but the priority of it never worked its way high enough up the todo list. The states were basically just data structures (similar to the XML approach you suggest but probably much less verbose with syntax). At least 99% of the transitions and states were written in C++ for performance reasons although we did support scripted ones. If you are doing a smaller indie game, I think it would be fine to text edit stuff and the system as a whole should work. As for doing a very large scale big budget game, I'd definitely weigh all your options. I've since become a fan of systems where the transitions were automatically generated for lower level AI behavior - something like a goal/action approach. - Ryan |