One thing that really irks me about JADE these days is that it has not been developed test driven. When I started writing JADE TDD still was a silver line on the horizont and testing consisted of the classical “run - check - fix” cycle of development. Nowadays we can do much better. But…
…if there is one thing that JADE is not well suited to it is test driven development. Already now there are so many features and functions used at every single step and the amount of data retrieved from a single being is so huge that I wonder if it is possible to refactor all the code to use higher level abstractions for what actually is happening and then implement test cases.
Currently I can only imagine using the Spring framework to d that but refactoring would be a very painful process. Is JADE doomed from the beginning? I hope not and I guess I will start some experimentation to introduce dependency injection abstractions and a lot more strategy interfaces for new features being implemented but I see a big need to progress to a TDD approach with JADE… considering the many bugs in ADOM that are very hard to debug.
An automated player also might be a nice feature in order to find bugs just by having them run around in auto mode… like the Angband bots I seem to remember.
Oh well… dark thoughts this morning because the “perfection itch” needs to be scratched
Let me know… what are your experiences with developing roguelike games test driven and how many TDD based roguelike games are out there these days?
4 responses so far ↓
1 Vladimir Panteleev // Nov 16, 2009 at 9:43 am
Hmm… time to port AdomBot to Java?
2 pvl // Nov 16, 2009 at 10:01 am
TDD might be nice, but you can’t change the fact that existing code was written without this approach. So, yeah, you could start from scratch, or refactor lots of code to adhere to TDD, but I personally would go for the next best thing : Add unit-tests wherever the effort isn’t prohibitive, and leave it at that. Sure, a little inversion of control can help here and there, but don’t get too much distracted of your real goal : Building a next-gen Roguelike. Just MHO.
3 yxhuvud // Nov 16, 2009 at 3:07 pm
Babysteps. Add tests where you are poking around at the moment without any big refactorings just to add tests.
4 Al-Khwarizmi // Nov 16, 2009 at 3:38 pm
I don’t know if this exists in other languages, but in Spanish we say “the better is the enemy of the good”. Technologies and methodologies are getting better all the time but I’m sure if you thought JADE was doable when you started it, it will still be doable by following the path you chose back then. Also, while TDD is certainly useful and productive, it’s not a silver bullet IMO, it has its limitations and not every system can benefit from TDD. I do use TDD for some “classic” development but I don’t know if I would apply it to a roguelike.
The idea of an automated player seems very nice. You could give him an “intrinsic amulet of life saving” and make him traverse the dungeons finding the stairs with A*, attacking enemies with the code that you probably already have for monster AI, and equipping/drinking/eating everything. At least it would be great to spot crash bugs. For more “logical” bugs, I’m sure the community will give you a hand with lots of alpha/beta testing
You must log in to post a comment.