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.

1 comment:

  1. Hey, Generic Container (as in the developer of Goblin Camp) here. Noticed this from the SA thread. You seem to be making good progress!

    Anyhow, what I wanted to comment on was your sort-of-negativity towards Goblin Camp, due to the similarity of these projects I guess? You shouldn't worry about that, I mean, if you're enjoying coding your project then go for it. There'll always be similar projects done by other people, and "competition" (if you can call it that, these are free games after all) is always good. Anyway if you go through my source code once I open it and take ideas from that, I'll just see it as a compliment (as long as you don't claim them as your own, of course! ;) ).

    I want to encourage people to code, not discourage them.

    And hey, if this doesn't pan out but you get some good coding practice anyway, you can come and contribute to Goblin Camp :D

    ReplyDelete