Early proofs of concept indicate this might be a viable option. Here are some of the hurdles ahead of me:
Trigger condition evaluation: I'm planning on using VB.NET as the language for trigger condition expressions. I've built a simple test that takes an arbitrary boolean expression, compiles it via CodeDOM into an in-memory assembly, and returns a delegate to invoke it with all the necessary information that will be required of the bot. This works well so far, but of course it remains to be seen how well it'll work in practice. I may change this to having the expression compiled into a System.Linq.Expression, which I could then compile into a delegate - I think that would be faster than the CodeDOM method I'm using now. Profiling will tell.
Dynamic state machines: Part of the system will be handling different states. I'm using states as a logical grouping of events for a common scenario. For example, a Fighter bot could have many states that it could be in at any one time; an out of combat state, an in-combat state, a dead state, and so on. Each of these states can have their own grouping of events, possibly having actions that force the machine to transition between states. I have some experience with state machines so this shouldn't be too much of a challenge.
Ability mapping and timing: Another vital part of the system is my Ability Mapping concept. Instead of having each user modify their scripts to include their character's own personal spells and combat arts, scripts will instead reference ability mappings. These mappings are then configured by the user to refer to one or more in-game abilities, each of which has its own cast, reuse, and duration timers. When a script action invokes the mapping, the system will use the first ability it's able to, according to its position in the mapping (top to bottom) and the status of its timers. This way, said Fighter bot can have a mapping called 'attack' that its user could have configured with all his character's single-target combat arts, so that every time that 'attack' mapping is invoked, one of those combat arts is used. I'm still conceptualizing this particular feature so any more detail would be speculation / brainstorming, which I will save for another post.
Configuration and UI: Of course, all of this complexity needs to be presented as simply as possible. I do not intend for people to manually edit XML in order to change these scripts, so I'll be building a script editing UI for that purpose. In addition, the UI will need to include a mapping editor, as well as a place for entering script-declared variables. All of these things will need to be data-aware, and some of them dynamically created. I've been debating with myself whether I want to use XAML and WPF for the UI, and while this sounds like it might be a good use of WPF, I still haven't taken the time to crest the learning wall, and with my current job situation I don't know if I want to take that time now.
There's more, but this is getting long already - I'll post again either tomorrow or the next day with more.
Saturday, July 18, 2009
Tuesday, July 14, 2009
Big plans.
So I hinted, last time, about some big plans I have for a new EQ2 project. I think I may have gone off the deep end a bit with this one, but I'm thinking I might have a winner.
People have been begging for a hunter bot for a while now, and while I could make one, I don't think I could do it justice. EQ2 is a very complex beast, with combat being especially complex. Despite what many think, it's *not* as simple as walking around, targeting stuff, and mashing buttons until you're done. When you play EQ2, and you fight things, you create little strategies out of the abilities you're given, and considering that there are 24 classes and umpteen billion ways of customizing (AA, etc), there are far too many of these strategies to bake in to the software.
So, in order to appeal to everyone, I'm going to stop working on the hunter bot, and start working on my new project, a group assistant (or you could call it a two-box helper).
This will, however, be like no ordinary two-box helper. My system will be completely customizable, down to every last detail, thanks to a custom rules engine I plan to build. I'm scrapping my DSL idea for this - it works, but I don't want to trust it for a production build, not yet - and going with an XML rules system with a visual designer on top of it.
This will not be a general purpose scripting application. The rules engine will support the project's only goal - to make two-boxing (or three, four, five, twenty, etc) a hands-off endeavor.
But I have ulterior motives as well... This application will facilitate a rules-based system upon which the final hunter-bot can be built. Once the rules engine is in place, and all the wiring is complete, it'll be go time.
More details to come later. =)
People have been begging for a hunter bot for a while now, and while I could make one, I don't think I could do it justice. EQ2 is a very complex beast, with combat being especially complex. Despite what many think, it's *not* as simple as walking around, targeting stuff, and mashing buttons until you're done. When you play EQ2, and you fight things, you create little strategies out of the abilities you're given, and considering that there are 24 classes and umpteen billion ways of customizing (AA, etc), there are far too many of these strategies to bake in to the software.
So, in order to appeal to everyone, I'm going to stop working on the hunter bot, and start working on my new project, a group assistant (or you could call it a two-box helper).
This will, however, be like no ordinary two-box helper. My system will be completely customizable, down to every last detail, thanks to a custom rules engine I plan to build. I'm scrapping my DSL idea for this - it works, but I don't want to trust it for a production build, not yet - and going with an XML rules system with a visual designer on top of it.
This will not be a general purpose scripting application. The rules engine will support the project's only goal - to make two-boxing (or three, four, five, twenty, etc) a hands-off endeavor.
But I have ulterior motives as well... This application will facilitate a rules-based system upon which the final hunter-bot can be built. Once the rules engine is in place, and all the wiring is complete, it'll be go time.
More details to come later. =)
Saturday, July 4, 2009
Moving!
Despite a number of promising leads, all of my job resources have run dry. As such, in three days, I am moving back home to Charleston, SC. My spirits are up, actually - I expected to feel thoroughly defeated (which I did), but at the moment I'm happy. I'll get to see my friends and family again. That's the important thing.
Meanwhile, I haven't let the out-of-work situation hold me back from programming. If anything, I'm more prolific on my own projects than I was able to be before, what with the 8-hr a day grind. Most recently, I'm working on a new EQ2-related project. The project itself is, well, top-secret at the moment - but I can discuss one of its major components: a script lexer and parser.
Compiler design and implementation is definitely one of my favorite topics in computing. I may be one of the few people in the world who enjoys hand-writing parsers. I can easily say that the grammar I wrote for this particular lexer/parser is the most complex grammar I've written with the intention of actually parsing.
In the span of about 3 hours tonight, I've hand-written the lexer and recursive descent parser for this language, which builds the inputs into a state machine. I can't give away too many details, but suffice it to say that this system will automate some interesting tasks in EQ2 (much like other MacroCrafter software I've written) and will allow the user to change its behavior on the fly.
To be honest, I don't really expect the user to do much editing - although I intend for the scripts to be user-editable, I will likely be writing all the scripts myself and releasing them with the new software. What I really wanted out of this was an easy way for me to describe the logic that this software will execute.
Sorry I'm being vague. I haven't made any official posts regarding this stuff yet on the MC forums, and I don't want to jump the gun. I've made the mistake in the past regarding talking about projects and such on this and other venues, getting people's hopes up, and then either abandoning or shelving said project. People's feelings get hurt, I get complaints, etc. I shouldn't promise what I might not deliver - and this vagueness is part of that.
As for when I'll be announcing this -- well, it'll come once I flesh the concept out more, build more proof of concept bits, and start pinning stuff together. I think it'll be well-received - possibly more so than a hunter bot would...
Meanwhile, I haven't let the out-of-work situation hold me back from programming. If anything, I'm more prolific on my own projects than I was able to be before, what with the 8-hr a day grind. Most recently, I'm working on a new EQ2-related project. The project itself is, well, top-secret at the moment - but I can discuss one of its major components: a script lexer and parser.
Compiler design and implementation is definitely one of my favorite topics in computing. I may be one of the few people in the world who enjoys hand-writing parsers. I can easily say that the grammar I wrote for this particular lexer/parser is the most complex grammar I've written with the intention of actually parsing.
In the span of about 3 hours tonight, I've hand-written the lexer and recursive descent parser for this language, which builds the inputs into a state machine. I can't give away too many details, but suffice it to say that this system will automate some interesting tasks in EQ2 (much like other MacroCrafter software I've written) and will allow the user to change its behavior on the fly.
To be honest, I don't really expect the user to do much editing - although I intend for the scripts to be user-editable, I will likely be writing all the scripts myself and releasing them with the new software. What I really wanted out of this was an easy way for me to describe the logic that this software will execute.
Sorry I'm being vague. I haven't made any official posts regarding this stuff yet on the MC forums, and I don't want to jump the gun. I've made the mistake in the past regarding talking about projects and such on this and other venues, getting people's hopes up, and then either abandoning or shelving said project. People's feelings get hurt, I get complaints, etc. I shouldn't promise what I might not deliver - and this vagueness is part of that.
As for when I'll be announcing this -- well, it'll come once I flesh the concept out more, build more proof of concept bits, and start pinning stuff together. I think it'll be well-received - possibly more so than a hunter bot would...
Subscribe to:
Posts (Atom)