Wednesday, April 10, 2013

Pugnacious Wizards Retrospective

Pugnacious Wizards!

Another year, another 7DRL. This year I tired to focus on more interesting traps and more interesting magic. When I could, I tried to include help for newbies and veteran players too. So what happened?

What went well?

Traps. There's basically four traps. Each is different. Some are obvious (the arrow towers and rotating towers) while some aren't obvious (floor traps and wall arrows). Each can be used to hurt others once you figure out how to avoid them. Even though the floor traps were the most boring, it's possible to figure out the pattern for the room and use it to your advantage. So traps become a benefit rather than a detriment. Pretty cool I guess. I had ideas of moving spike balls, retracting bridges, and other wackyness. The basic idea is discovering patterns in your surroundings and using it to your advantage by avoiding the dangerous spots and tricking your enemies into the most dangerous spots. The gameplay is pretty good (I think) and the code is not too bad for a quick-n-dirty 7DRL. One interesting thing is that the World class has a list of functions it calls every turn. Many of the traps were implemented by telling the world to call some function each turn. That means that the items, tiles, and world didn't have to be changed in order to implement traps. Totally OCP. Totally rad.

Interesting magic. This was the first time I really tried making a magic system. I hard coded a lot of things, then refactored to be more reusable. Even though I didn't get as many magic spells as I wanted, it worked. And there's a few emergent effects (freezing yourself when on fire, burning trees near enemies, etc). The code was just barely flexible enough for this 7DRL. I did manage to make use of the Composite Pattern.

Simple enemies, no stats, no items. The focus is on magic and traps. That means the game really only needs a few enemies. A melee type, a ranged type, and possibly a magic using type. The skeletons are just there to force you to move on. The interesting magic means there's less need for stats and equipment. Although I've got ideas about that too....

Help. I added an attract screen where the computer tries to run through the game. It's a good way to show the basics of what's going on. I also added a decent help screen, the ability to examine surroundings and current spells, as well as popups for the first time you see new things - although it must be dismissible for those who don't want to be bothered by it. I think that was a fantastic success. I also managed to make a game that required very few keys (WASD & 1-9) but also allowed different input styles (arrows,WASD,HJKLYUBN,1-9,mouse). None of those things make it a better roguelike, but it was important to me that it's easy to understand and play. That's also why I used ActionScript rather than Java like last year. The low barrier to entry is important.

What didn't go well?

Magic. I didn't get as many spells and effects as I was hoping for. I was planning on having 27 spells total, 18 in each dungeon, and you can only pick up 9. I didn't get that many spells though. 12 total I think. I was also missing many effects that I wanted: push, stone skin, anti-stone, control others, and more. This was mostly due to not really figuring out how effects and such would work together. What I ended up with wasn't flexible enough for all that I wanted - which was quite ambitious. But it wasn't very well refactored. I think it was quickly accumulated Technical Debt that slowed me down. Debt in the sense that I learned about making reusable magic code faster than I was refactoring the magic code.

AI. The AI for the intro screen hero and other wizards doesn't know how to best use every spell that's in the game. They can use most, but even then, it's not always the optimal move. That's ok, but some spells it flat out ignores. That's pretty lame. This was entirely due to how I implemented the magic. I should have thought this out better. Technical Debt strikes again.

What would I do differently next time?

Magic is tough. At least the style that I wanted. I really should have though about it more and have had a better idea of what was needed. I actually tried not to over think it. Maybe I under thought it.

Useless non-contet. Like many 7DRL challengers, I added a lot of useless content that wasn't related to may main focuses. There were probably two day's worth of work that were wasted on trying to make "interesting" rooms that weren't related to traps or magic. That was removed sense it only made the gameplay worse. It seems that I'm always reminding clients and coworkers to focus on what's important yet this time I made that same mistake. Sometimes human nature conspires against us.

Saturday, March 16, 2013

Pugnacious Wizards day 7

Success!

I didn't have time to do much the last couple days but overall, I'm pretty happy with what I made.

I wanted to focus on magic spells that had multiple effects and traps that are more interesting than the standard "randomly take a trivial amount of damage" that most roguelikes have. I think I did both. Maybe not as much as I had hoped for, but I did both. I also wanted to explain more of the game with an intro that auto-palys and help popups. I think that worked very well.

As far as programming goes, I was able to get animations working - which I've never done before. I also tried putting much of the ai into spells so that the hero and wizards know how to cast them. The magic system wasn't as clean as I wanted, but I tried a few new things with that too. One of the coolest things I did was to make it so the world has a list of functions that it calls each turn. Since anything that has a reference to the world can add to that list, new functionality can be added without changing any existing code. Totally OCP. Much of the traps and magic used this.

As always, any feedback is welcome.

github source

download swf

Update: I played it again after being away for a week and noticed that sometimes the FOV isn't calculated at the right time. I think I fixed it.

Thursday, March 14, 2013

Pugnacious Wizards day 5

Good progress today:

Fixed some minor animation and timing stuff as well as refactored magic and traps quite a bit. That meant I was able to improve magic and traps quite a bit.

As always, any feedback is welcome.

github source

Wednesday, March 13, 2013

Pugnacious Wizards day 4

Very little progress today:

I had a social obligation which took up most of my evening. I did have some time to refactor the magic stuff. I'm still not entirely happy with how it's set up but now I can start doing more interesting things. Like the a new spell that teleports you then burns your surroundings or spell that freezes everyone near you then blinks you away. I'd like to come up with several spells that have three or four effects each. That's my goal at least.

Also tweaked the creature ai, removed some bad room themes, and other minor things.

As always, any feedback is welcome.

github source

Tuesday, March 12, 2013

Pugnacious Wizards day 3

Some new content today but mostly polish:

I did add a few more room themes but most of my 5 or so hours was spent adding a help screen, an examine screen, and adding popups the first time you encounter major things like new rooms or enemies.

I won't have much time tomorrow but I'm going to focus on adding more interesting traps and puzzles over the next two days. That will leave Friday evening and Saturday to work on more interesting magic.

What do you think? Too confusing? Too simple? Too conventional? Let me know in the comments.

github source

Monday, March 11, 2013

Pugnacious Wizards day 2

Some good progress today:

I added bloodstains and variation among grass and trees. I also got the hero to use magic against wizards who defend the amulet pieces. Finally, I was able to add a few room themes. There are 8 total, but two are randomly chosen to not appear and one is chosen to appear more often than others. The current themes are:

  • An "A" room that spawns archers
  • A "G" room that spawns guards
  • A room covered in blood
  • A room littered with piles of bones
  • A room with some pillars or remains of walls
  • A room that occasionally shoots arrows from one of the walls
  • A room shoots arrows in 8 directions from towers every turn you are in the room
  • A nice outdoor area
I plan on continuing with the room themes and adding more trap effects and triggers as well as some simple puzzles.


I almost forget! You can get the code from https://github.com/trystan/PugnaciousWizards. It's not my best code, and I've had to some odd workarounds since I'm using a few bits of old code to do new things, but it works and some of it is ok.

Sunday, March 10, 2013

Pugnacious Wizards day 1

Here it is:

I made a ton of progress today. I've now got a basic dungeon crawl with a kick ass intro screen. I've got a few days to to make it interesting:

  • Room themes
  • Traps
  • Puzzles
  • Enemy wizards
  • A better magic system