Jump to content

  • Log In with Google      Sign In   
  • Create Account

- - - - -

Rogue Gear and Simple Narration

Posted by , 04 March 2014 · 514 views

Code code code. At this pace I probably couldv'e made it as a 7DRL, definitley simple but complete. Just loving how smoothly things are still going. Though I'm noticing some code bloat creeping into the project. Dungeon class alone is ~700 lines of code, with a handfull of other breaking 500. Most my projects tend to be rather simple, with source files barely reaching 200 lines of code. Alot of it so far is copy+paste code that I want to simplyfy using a factory/flyweight design istead of the big if/else list I got right now.

Ran into a simple bug recently. Out of range access into one of my containers. Pretty darn sure it's the LOS calculation accessing tile indexs that don't exist. The super-cover portion of the algorythm doesn't use the tile getters, it directly accesses the container. It's random and I'm suprised it hasn't come up before the last posting. Should be an easy fix though.

Blah blah blah, long story short I'm taking a break on the next coding session to do a little refactoring and clean up. Error checking and standards, going to be the focus of the clean up. A fair bit of commenting needs to be added aswell. I've been neglecting it in favour of cranking out code as fast as possible.

Progress so far:

Got the basic messege console up and running. Definitly fills out the screen better now. Things were looking rather bare bones before. I was tempted to add support for multi-colored strings of text. Gotta squash those thoughts of unnessecary features though. Glad I did, managed to get some basic weapons and armors into the game instead. along with the basic equip slots for the avatar (creatures). Though being able to equip the gear insist implemented, it's still progress.

I got a couple rules about the items in place now too. I want to aim for a minimal/simplistic design. So I'm making sure there's only one item per tile and an avatar can only have ten items in their inventory. The weapon and armor slots don't count towards that total. They will if you're trying to unequip while inventory is full. I'll probably just force the item to drop to the ground if that's the case.

There's also a simple help feature to explain what actions are possible so far. Not all my play testers caught on how to play all bits of the game without me telling them.

Goals after the refactor/clean up:

Gonna flesh out the structure for multi step actions. Implement dropping items and equipping/unequipping gear. Then work on the item system itself a little. Clean it up and make it easier to create items using the factory/flyweigt design mentioned before. If it goes quick I might get to working on an AI-less creature system. To start populating the dungeon with monsters. The ai is gonna be a big project so that's definitly out of the question for now.

January 2017 »

1516171819 20 21

Recent Comments