Frequently Asked Forum Questions | ||||
Search Older Posts on This Forum: Posts on Current Forum | Archived Posts | ||||
AI Script | |
Posted By: scarab | Date: 8/5/11 4:50 a.m. |
I don't know if anyone has done this before but I transcribed the (Halo3?) AI/level-designer script code from the ViDoc. Its not a language that I recognize. It looks like its hand rolled. Does anyone recognize the language? OMG its Lisp! Its been so long that I forgot. scarab, you're a dumbass! I'm so embarrassed that I'm tempted to not post this but if there are any lisp programmers reading then maybe you could dissect the script. Can anyone quess the level? Is it firefight or campaign? There is a mention of docks. Is it the factory section where we fight the scarab? The editor uses syntax highlighting - various parts are color coded by the editor. I see:
Constants are pieces of information that are given a value once and then never change. Reserved words are words that are part of the programming language and you can't use them for the names of your own variables or functions. Examples in this script are:
Of course, since this is Lisp, I suspect that you can redefine them. (But you'd probably be mad to do so.) There are 3 functions in this script:
A function is a self contained bit of code that you write once and then you can call it as many times as you want in the rest of your program. A good function does one simple (or easy to understand) task. An example from this script is ai_place which looks as if it spawns squads. You can often pass extra pieces of information to the function so that it can operate on different things in different calls. For example in this script, ai_place takes a parameter that tells it which squad to place. We see various examples of this, just look at the calls to ai_place in the script below. Note that ai_place isn't being told where to put the squads; that information must be stored in the squads themselves. The call could have taken two parameters for example: (ai_place sq_ss_squadname whereto_put_the_squad) but instead it just has (ai_place sq_ss_squadname) so these squads are quite complicated objects with lots of information in them (doh they are lists you fool). I thought this language was kind of neat and I was going to have fun dissecting it and how it works. But now that I have recognized it as Lisp I realize that I just need to look it up online and read a gazillion tutorials. I have one final comment/question about Lisp - why did they use parentheses? On my keyboard I have to hold down the shift key whilst typing ( or ). Why didn't the creators of List use [ and ]. It would save typing effort [yes I'm that lazy]. Anyway here is the script. Can you understand it? Work out which level its for?
|
|
Replies: |
AI Script | scarab | 8/5/11 4:50 a.m. |
Re: AI Script | scarab | 8/5/11 5:00 a.m. |
Fixed: AI Script | scarab | 8/5/11 5:26 a.m. |
Re: Fixed: AI Script | Moorpheusl9 | 8/5/11 6:07 a.m. |
Re: Fixed: AI Script | scarab | 8/5/11 7:20 a.m. |
Should've used Python *NM* | JDQuackers | 8/5/11 7:30 a.m. |
Re: AI Script | General Vagueness | 8/5/11 12:30 p.m. |
HaloScript | kornman00 | 8/5/11 3:17 p.m. |
Re: HaloScript | scarab | 8/7/11 9:06 a.m. |
Re: AI Script | dmiller | 8/7/11 1:17 a.m. |
Re: AI Script | scarab | 8/7/11 8:54 a.m. |
Re: AI Script | dmiller | 8/7/11 9:29 a.m. |
Re: AI Script | Moorpheusl9 | 8/7/11 9:33 a.m. |
Re: AI Script | dmiller | 8/7/11 9:35 a.m. |
Re: AI Script | scarab | 8/7/11 10:12 a.m. |
Re: AI Script | ZackDark | 8/7/11 2:40 p.m. |
Re: AI Script | dmiller | 8/7/11 5:02 p.m. |
Re: AI Script | Louis Wu | 8/7/11 5:15 p.m. |
Re: AI Script | dmiller | 8/7/11 5:23 p.m. |
Re: AI Script | scarab | 8/8/11 3:34 p.m. |
Re: AI Script | dmiller | 8/8/11 9:51 p.m. |
Re: AI Script | JonnyOThan | 8/11/11 12:42 p.m. |
Re: AI Script | scarab | 8/11/11 4:32 p.m. |
Re: AI Script | dmiller | 8/13/11 2:21 p.m. |
Re: AI Script | scarab | 8/13/11 5:27 p.m. |
Re: AI Script | RC Master | 8/7/11 7:41 p.m. |
Re: AI Script | ZackDark | 8/7/11 8:30 p.m. |
Re: AI Script | General Vagueness | 8/7/11 8:36 p.m. |
Re: AI Script | ZackDark | 8/7/11 8:42 p.m. |
Re: AI Script | dmiller | 8/7/11 8:57 p.m. |
Re: AI Script | Hyokin | 8/7/11 9:21 p.m. |
Re: AI Script | dmiller | 8/7/11 11:03 p.m. |
Re: AI Script | ZackDark | 8/7/11 11:19 p.m. |
Re: AI Script | dmiller | 8/7/11 11:23 p.m. |
Re: AI Script | Hyokin | 8/7/11 11:20 p.m. |
Re: AI Script | ZackDark | 8/7/11 11:22 p.m. |
Re: AI Script | dmiller | 8/7/11 11:26 p.m. |
Re: AI Script | ZackDark | 8/7/11 11:27 p.m. |
Welcome to the forums, Dan! | Hyokin | 8/7/11 11:34 p.m. |
Re: AI Script | dmiller | 8/7/11 11:44 p.m. |
Re: AI Script | dmiller | 8/7/11 11:45 p.m. |
Re: AI Script | RC Master | 8/8/11 7:10 a.m. |
Re: AI Script | Avateur | 8/7/11 11:50 p.m. |
Re: AI Script | Hyokin | 8/7/11 11:57 p.m. |
Re: AI Script | dmiller | 8/8/11 1:17 a.m. |
Re: AI Script | SonofMacPhisto | 8/8/11 6:11 p.m. |
Re: AI Script | dmiller | 8/8/11 9:54 p.m. |
Seriously dude, you're awesome *NM* | ZackDark | 8/8/11 10:46 p.m. |
Re: AI Script | ZackDark | 8/7/11 11:50 p.m. |
Re: AI Script | Leviathan | 8/8/11 12:11 a.m. |
I also share this question *NM* | ZackDark | 8/8/11 12:13 a.m. |
Re: AI Script | dmiller | 8/8/11 1:21 a.m. |
Re: AI Script | General Vagueness | 8/8/11 1:34 p.m. |
Re: AI Script | FyreWulff | 8/8/11 12:41 a.m. |
Re: AI Script | dmiller | 8/8/11 10:54 a.m. |
Re: AI Script | bluerunner | 8/8/11 11:04 a.m. |
Re: AI Script | dmiller | 8/8/11 8:54 p.m. |
Re: AI Script | FyreWulff | 8/9/11 4:56 p.m. |
Re: AI Script | Hyokin | 8/8/11 11:09 a.m. |
Re: AI Script | RC Master | 8/8/11 1:40 p.m. |
Re: Thanks. | Joe Duplessie (SNIPE 316) | 8/8/11 2:44 p.m. |
Re: Thanks. | General Vagueness | 8/8/11 5:25 p.m. |
x3 thanks for awesome | SonofMacPhisto | 8/8/11 6:06 p.m. |
Combat sandbox and mission design | GhaleonEB | 8/8/11 1:10 a.m. |
Re: Combat sandbox and mission design | dmiller | 8/8/11 1:26 a.m. |
Re: Combat sandbox and mission design | dmiller | 8/8/11 1:29 a.m. |
Re: AI Script | Lord Friendship | 8/8/11 12:33 p.m. |
Re: AI Script | dmiller | 8/8/11 8:55 p.m. |
Re: AI Script | Gravemind | 8/8/11 3:29 p.m. |
Re: AI Script | scarab | 8/8/11 3:49 p.m. |
Re: AI Script | Lurono | 8/8/11 6:52 p.m. |
Re: AI Script | SonofMacPhisto | 8/8/11 7:00 p.m. |
Yes to both *NM* | Lurono | 8/8/11 7:15 p.m. |
Ok, I'm not nuts. Well, I am... but... n/m :) *NM* | SonofMacPhisto | 8/8/11 7:22 p.m. |
Re: AI Script | dmiller | 8/8/11 9:42 p.m. |
Re: AI Script | RC Master | 8/9/11 9:34 a.m. |
Re: AI Script | dmiller | 8/9/11 9:47 p.m. |
Re: AI Script | JonnyOThan | 8/10/11 3:27 p.m. |
Re: AI Script | RC Master | 8/10/11 7:21 p.m. |
Re: AI Script | ZackDark | 8/10/11 10:37 p.m. |
Re: AI Script | Hyokin | 8/10/11 11:36 p.m. |
Re: AI Script | ZackDark | 8/10/11 11:59 p.m. |
Re: AI Script | RC Master | 8/11/11 8:30 p.m. |
343i, hire him too! *NM* | Hyokin | 8/11/11 10:02 p.m. |
Re: 343i, hire him too! | RC Master | 8/13/11 10:34 a.m. |
Re: AI Script | ZackDark | 8/11/11 11:02 p.m. |
Re: AI Script | RC Master | 8/12/11 7:28 a.m. |
Re: AI Script | ZackDark | 8/12/11 6:26 p.m. |
Re: AI Script | dmiller | 8/13/11 2:39 p.m. |
Re: AI Script | FyreWulff | 8/9/11 5:23 p.m. |
Re: AI Script | Lurono | 8/9/11 8:07 p.m. |
The worst kind *NM* | scarab | 8/10/11 1:03 a.m. |
And a serious answer... | Lurono | 8/9/11 8:13 p.m. |
Re: AI Script | dmiller | 8/9/11 9:39 p.m. |
Re: AI Script | ZackDark | 8/9/11 10:37 p.m. |
Re: AI Script | dmiller | 8/9/11 10:41 p.m. |
Re: AI Script | ZackDark | 8/9/11 10:45 p.m. |
Re: AI Script | dmiller | 8/9/11 10:47 p.m. |
Re: AI Script | ZackDark | 8/9/11 10:52 p.m. |
Re: AI Script | dmiller | 8/9/11 11:13 p.m. |
Re: AI Script | scarab | 8/10/11 1:28 a.m. |
Re: AI Script | dmiller | 8/10/11 9:18 a.m. |
Re: AI Script | scarab | 8/11/11 4:49 a.m. |
Re: AI Script | dmiller | 8/11/11 9:49 a.m. |
Re: AI Script | Dagoonite | 8/11/11 10:31 a.m. |
Re: AI Script | RC Master | 8/11/11 11:41 a.m. |
Re: AI Script | dmiller | 8/12/11 1:20 a.m. |
Re: AI Script | RC Master | 8/12/11 7:05 p.m. |
Re: AI Script (ooh! Question!) | RC Master | 8/13/11 5:52 a.m. |
Re: AI Script (ooh! Question!) | dmiller | 8/13/11 2:28 p.m. |
Re: AI Script (ooh! Question!) | dmiller | 8/13/11 2:34 p.m. |
Re: AI Script (ooh! Question!) | RC Master | 8/13/11 8:37 p.m. |
Re: AI Script | General Vagueness | 8/9/11 11:38 p.m. |
Re: AI Script | mrbig | 8/10/11 12:50 a.m. |
Re: AI Script | dmiller | 8/10/11 9:11 a.m. |
Aww crap | RC Master | 8/8/11 7:22 a.m. |
The HBO Forum Archive is maintained with WebBBS 4.33. |