Thursday, July 22, 2010

Did some more work on workshops:

workshops now appropriately take the correct amount of starting materials to make the desired product

next up is implementing action points to be used up to make things, deciding how to implement menus for workshops, and making workshops able to take different inputs to make different items

Sunday, July 18, 2010

worked on adding workshops; the actual objects are now implemented into the map.
creatures can now be commanded to walk to the workshops.

learned how to use mercurial! Hopefully now if I make a catastrophic mistake, I'll be able to recall it.
Feature added:
Creatures can now be ordered to pick up a specific type of item

Thursday, July 15, 2010

Been having some trouble trying to implement workshops and haven't had that much time to work on this.

Workshops hopefully will be done by the end of this week.

Congrats to Aryoc for getting GC 0.1 out!

Saturday, July 10, 2010

features added last night:

multiple items can be on a single tile
walls drop rocks on destruction
creatures drop their inventories as well as their corpses

pathfinding thought about and resolved; all that's needed now is to actually implement it

need to work on faction orders
need to work on workshops

Friday, July 9, 2010

Video!



Short clip of what I have right now. I set the game loop sleep to 1 second per turn so you can actually see what's going on; the only issue is that it makes the cursor movement sluggish when the game's not paused. The elf inside the room opened the door (/) at turn one which is a shame, because you could have seen it turn from closed (+) to opened. The door has a faction assigned (which is silly in hindsight) so that only creatures on faction 2 can open it, but I guess it's just as easy to make it only so that creatures with the hands tag or whatever can open it. Elves (E) are currently the fastest things with movement and attack speed 1. I gave the troll a weapon (spawned a 2 right under him and he picked it up).

Also, a sample of a creature right now from the save:

2:E:7,11:5:1:1:1:2

I use : to demarcate separate info.

2: List number, not important really
E: appearance, elf.
7,11: where it is right now.
5: HP
1: attack speed
1: movement speed
1: damage
2: faction #, doesn't attack any other creatures on faction 2

Also, at around 1k lines of code in c#.

Thursday, July 8, 2010

FL

If you've happened upon this post and you don't know what DF is, click the link and get playing. Lots of people really like the game and I think tigsource was the first crowd to start playing with it (at least that's where I first saw it). I think the best way to put it to a casual crowd is that it's the Sims in a Lord of the Rings (fantasy) setting, and you can build things and watch things fight. The graphics are traditionally ASCII (or single character, so an 'E' is supposed to be an elephant).

Anyways, DF and Toady, the creator, are really cool and people like to play DF, except it's got some issues. The big ones (perceived or real (I really don't want to get into an argument on this)) are:
  • the graphics turn people off. I have a friend who's looked into fantasy and Warhammer and whatever but he refuses to touch DF because of the roguelike graphics. Even tilesets can't take care of this initial impression that reddit and the general populace has created.
  • new players feel overwhelmed. Captainduck of SA makes good tutorial videos, but a lot of people who play games don't like sitting through 50 minutes of video to do things. They just want to...uh, do things.
  • Part of this is the interface. Menus aren't consistent, and remembering all the hotkeys to do various things take time.
  • Different features are in different stages of development. Until recently the military and combat were broken (I'm actually not sure if Toady has released the fixed version yet but whatever). The new hospital feature was broken (I know this was fixed last version).
  • It gets unplayable when you have over 70-100 dwarves. It literally takes a second to have a single creature move one space, something which is unbearable when you have dwarves zipping off for trees at 100 distance over 10 seconds in the beginning.
  • Updates of actually playable versions are sporadic.
  • Stuff gets boring unless you're an inventive person. (see: Spore).
The beef I've personally had with DF is that I feel combat is dull. Very very dull. Goblins or whatever come to attack you and you can either powerlevel your military so it's cake, add traps so it's cakes, or watch disinterestedly as your dwarves fight it out with the monsters and look at all the cool combat reports (which are cool, but after a few iterations get tedious). Also, why are the goblins attacking? From a story standpoint, I guess dwarves and goblins are NATURAL ENEMIES, but I think it's good when people know motives and it's not assumed.

Given that I'm not a super patient person and that I feel like I can do some things for myself, I've set out to make my own fortress-like (FL). The idea I've had in my head for what FL ultimately (or a good checkpoint) should be able to do:

The dwarves have constructed their fortress. After long periods of refinement, they've managed to recreate Draupnir, which will make them rich beyond their wildest dreams. Unfortunately, such a cool ring drives the dwarves in the fortress crazy with avarice, and news of their wondrous creation attracts trouble. Goblins (and any other sentient creature, no racial profiling here) organize and set up sieges. They build catapults, battering rams, and other things to destroy the walls so they can penetrate the fortress and steal the ring.
I've written way too much, so you can read into the above ramblings and description as much or as little as you want. Also, if anyone can suggest an easy way to record a short video, I can show you guys what I have right now.

Clarifications

Features Added (uh, I should change this to things done because these aren't really features):
  • fixed infobox display issues (for instance, if the X,Y tracker showed 5,10 and then 5,9, it'd show 5,90 because it doesn't write over the 0)
  • separated drawing from game loop and added delay for game loop (so game loop can be slept so it doesn't run through 500 turns in 2 seconds)
  • cleaned up code a little for personal ease
  • doors - as walls right now, thinking about how to implement as items
Thought about how to implement multiple items one tile and faction orders (easy), menus (still not completely clear), and real pathing (reverse distance gradients?).

It seems like my last post interested some people at SA and even GC. My post (edited for those who don't read the SA DF thread) is below:
With regards to ikanreed's comment [the quote in the last post about managing a project well], I just wanted to show that I understood what he meant last night by actually experiencing it to some small degree. As a novice programmer, I had (still have) no to little understanding of how to manage a project correctly/efficiently. If anything, I wanted to show my appreciation of his comment so I can be encouraged to do things well.

To genericcontainer (or Aryoc here [on SA]), thanks for your words of encouragement. The gist of my "negativity" (uh maybe my ambivalence might be a better way to put it), is that I really hope the final things I want to do don't "get scooped" by you and the other people that will inevitably work on GC when it comes out. I do realize that my ideas (will post in a few minutes) aren't anything really special, but I guess everyone who works on making something feels this way. My project is half for my own learning and half for making my own version of a fortresslike; the learning part is great, but the making my own part is...worried? Anyways, I definitely look forward to playing GC and what comes out of it.

To everyone else, I'm not frustrated or angry or whatever. I just wanted to share some of my thoughts, and I'm still working on my thing at more-or-less the same rate I was before. I'm a non-cs student doing student things, so yea, progress isn't going to be as good as with toady working fulltime on DF and Aryoc (who I definitely know has more background than me) working on GC. My original post was just to encourage others to work on their own fortress-like. I definitely feel like Aryoc with GC, Vox with this Arena idea [check it out in the DF thread!], (and even Toady with his suspiciously (I kid, I kid) focused updates and new cool ideas) are definitely showing that the DF is getting some fresh air/being revitalized or something.
Anyways, so I can get this out as kind of a declaration of intent, my next post is going to be what I envision my fortress-like (I'm going to wait until I get it playable to get my name out, so let's call it FL for now) to be capable of.

Wednesday, July 7, 2010

Ugh

features added:

  • game runs continuously - no longer keypress after keypress required
  • added pause and unpause functions
  • creatures can equip any equipment picked up
  • user can now direct specific creatures to attack specific other creatures*

*The last one is pretty important: it paves the way for adding jobs, user interface, etc.

Tomorrow I'll try to implement faction orders (dwarves, go kill this specific creature) and general faction orders (dwarves, kill everyone of this race), and see if I can get multiple items on one tile.

It's not completely clear how I want to implement menus for user interface yet, so progress will be slow the next few days. The good news is that once all of this is ground through, everything should be set and a playable version should be out. Also, someone on SA made this comment:
I think their beliefs are well founded because once a project's code gets outside the scope such that it fits into your head all at the same time, the complexity of maintaining/adding to it skyrockets. If you're writing in C with no source control, automated testing, and rumored questionable coding practices, it makes maintenance a nightmare, not necessarily new development.
And the truth of this really hit me today. It took me a long, long time just to coordinate all the information needed to go into this. To give a taste:

Cursor class takes location information of where it is right now, asks if there's a creature there, and then shift behavior of that creature from the current aggro straight line AI to what I want it to do (more later). Input class has to handle what key is pressed, and if that key's already been pressed. If it's already been pressed, then it takes information for where the cursor is at the new point, and gives that information to the creature AI. The creature AI then processes if there's a creature to kill at that point, if it's on a different faction, and then goes to kill that thing.

Finally, for those of you who are actually reading this, I'm a little ambivalent about goblin camp. It's obviously going to be a lot better than what I'm putting out, and I'm excited to see how it's going to turn out in the next few months after it open sources. However, any limited progress I have with my own little creation is either going to be overshadowed or feel like it's copied? I dunno - the negativity I have toward GC isn't really well-defined yet. I've also held off on reading any implementations of time systems, combat, etc. on roguebasin/roguetemple just because I know that I'll spend hours digging through code and being wowed rather than actually working. I will look back once I have enough cemented though. Anyways, that's that.

Tuesday, July 6, 2010

features added:

  • things have colors!
  • creatures have inventory
  • creatures pick up things (currently anything under them)
  • implemented factions - creatures on the same faction don't fight one another
features added last night:
  • attacking and movement are now separated
  • pathfinding optimized - creatures will now go for the nearest target instead of the one to the most top left
  • time added
  • creatures now have attack and movement speeds, as well as damage amounts
  • on death, creatures drop corpses
I got a little distracting by testing the creature movement/attacking things very very thoroughly.

Here's a screenshot of a troll slaughtering elves and dwarves:

Monday, July 5, 2010

easy

  • Added save/load function of maps via text files

Oh, and I'm following this for development guidelines.

Sunday, July 4, 2010

Post 1!

So for the past week I've been working on a roguelike and it feels like to time to get some things written down. Things I have done (roughly in order of completion time):
  • made a map that refreshes when things change
  • made walls with hp that can't be passed
  • made items with hp
  • made creatures with hp with movement ai (currently attack the nearest other creature searching from the top left) that can't be be passed
  • made a cursor that displays its position, what's under it, and the HP of what's under it
Things I would like to do in the future:
  • create the concept of time - movement and attacks should all take certain amounts of time
  • separate attacks and movement
  • create atk damage
  • create atk damage types
  • create inventories/allow creatures/walls/items to hold items
  • have things drop things on certain conditions (death, injury)
  • jobs: allow user to dictate orders directly to certain creatures
  • jobs: allow user to dictate orders indirectly to certain creatures
  • improved pathfinding/movement ai (hard stuff: walk around walls, medium stuff: go for the nearest thing, easy stuff: run when you're at low hp)
  • allow creatures to have more complex behavior (ex. go toward the item of highest value and kill anything that attacks you)
  • workshops/functions - if this creature goes here with this job and has these things in its inventory, do this process for this amount of time and produce this item(s)/do this function
  • smellmap/soundmap - more later