Archive for February, 2012

Easier-to-read text

February 29, 2012

I got some help from freenode’s ##XNA on a thing I should probably have already been able to do without asking:

It’s a hackish way to do it but I’ve acheived the goal I wanted to acheive. Pressing the T key will toggle whether the text is behind or in front, as before, but now whatever’s behind is greyed out a bit. I’ll probably do something as retardedly simple as this for the 3D version when I get back to it, too.

(edit: one more shot for the road. shows off the item swapping with the menu that takes up most of the screen:

yeah, that was a good idea.)

Inventory Swapping working

February 29, 2012

Super screenshot deluxe:

There’s still lots of adjusting to do and rebuilding of sections, but I have a very basic item swapping interface partially working now. The way I have it set up is that you can use it in realtime, or pause the game to do what you wanted. Here I moved a few items to the a chest, and I’m about to move the forge.

  • The > < indicates the item you have for use – so you can defend yourself in realtime as you go through your box.
  • The [ ] marks where you are in inventory, and the * * shows what you want to swap with.

I have it set for you to quickly exit out of any inventory you entered by hitting the right shoulder button again while still selecting the object with your cursor.

You can inspect or swap with inventories of any Creature right now – including the Monsters. I’ll remove this later, but then add it back in as a steal ability for theives. There will be a time limit for viewing/swapping that will be rolled based on your stats and the monster’s stats. Some monsters won’t let you even peek, though. ┐(  ̄ー ̄)┌

Not complete is the item dropping and stack splitting. I’m tired, so I might not get to it tonight.

After I finish this, I’m going to move right into the item creation interface.

Moving in the right direction

February 29, 2012

Two screenshots this post, here’s the first:

Points of note:

  • Gamepad input tips in upper right
  • Certain things can be “used”; in the above screenshot the NPC is shown to be useable
  • Monsters can no longer pick up collectables, they’re shown pushing the ones above
  • Once an inventory is full, no new items can be added, and you will push items around like the monsters do

Second screenshot:

Notes of point:

  • 3 new useable blocks: Workbench, Chest, and Forge
  • Inventory “empty” slots

I want to recode a bunch of the code to make use of a new Item::OnUse() function. I’ll also be adding some Creature::OnUse() and Chest::OnUse() overrides, and then I’ll build the item swapping interface. Then I’ll add the Forge::OnUse() and Player::OnUse() and build the item crafting interface.

Added a little content

February 28, 2012

It ain’t much, but it points at one of the things I’m working on next.

I added Tree ‘blocks’ and Wood items. Chopping down trees with a pickaxe is a little odd, but I’ll leave that for now.

Also, I made the stone walls look more.. wall-like. They stand out from the natural rock better now. I’ve been trying not to get too fancy with the graphics, but I think it’s a good change.

I’m gonna try to get that creature info stuff outta there tomorrow.

Checking font size

February 28, 2012

I noticed that the text output is a little hard to read in the pics in the posts up until now. Sure, you can click on the pics to see them at actual size, but that’s inconvenient, isn’t it?

I increased the font size from 10 to 14 and took a screenshot:

How’s that for ya? I also added an in-game toggle to put the text behind the objects, in the case that the screenshot should be focused on those instead.

Fixing Bugs

February 28, 2012

Screenshot!

As you can see, I increased the base size of the entities. The collectables were too hard to see, and the new size of everything is acceptable.

I fixed quite a few bugs today. Among them was the Door Bug (seen above). With this bug, I originally had it so that when you opened a door, the ClosedDoor object would create an OpenDoor object and kill itself, and the reverse for closing an OpenDoor object. (I know it was a terribad idea, shut up.) When an entity dies, by default it drops all of its inventory. All blocks contain one item of themselves, so that when you break them down, you can pick them up again.

When you opened a door, it would drop a door collectable. Alot of the time, the collectable would be inside the door, so the door would stay open, but if you had two doors next to each other, one might drop a door collectable into the other, which would then drop a door item of its own… and if those two pushed each other out of one of the open doors, the door would close and create another door item.

I froze the game one time, screwing around with the bug – it had created a big pile of like 10+ door drops and got stuck in some infinite loop somehow. It was sooo crazy. Notice that one of the monsters chasing me in the screenshot above has picked up 16 doors. Yeeeeaahhh.

I cleared some other crappy bugs not worth mentioning, as well. One bug I haven’t bothered with yet is shown below:

I placed the Town Crystal, upgraded an NPC, and was going to pick it back up… but when I broke down the Crystal, the NPC was touching it and picked it up on me! While I’m not pleased that they can, I’ll leave that alone for now.

Let me direct your attention to my inventory: Notice how there are 3 stacks of stone wall items? In code I’m actually giving the player 200 of them in one shot. The code will only add it in stack-max format. I’m happy at how well it works, even if it’s a simple thing. Sometimes it’s the little things that count.

I also realised recently that I needed a file with the current bugs written in it, and I need to write the bugs in there as soon as I find them, or 1) I won’t remember the bug later, and 2) I won’t be able to find the bugs I need to fix as easily. It seemed like a good idea, and it turns out it’s helping me quite a bit.

I have enough of the irritating bugs out of the way now that I can move onto the thing I want to do next: parties!

Collectables now In and Collectable

February 27, 2012

I’m tired so I’ll try to not go on too much in this post.

The little circles are the collectables. They’re just a small version of the thing that they represent. The copper sword is a yellow circle with a sword symbol in it. The copper sword collectable is a small yellow circle with a sword symbol in it.

I broke some of the rocks with my pickaxe and picked up the collectables they turned into. You can see that I’ve got some different kinds of ores, and some stone. I have an extra heal spell because when the NPCs die, they drop their inventory. I picked up a heal spell by mistake.

You’ll notice that some items are stackable and some are not. The heal spell did not stack with the other when I picked it up, but the ores did. Right now all stackable items have a maximum stack size of 99, but it’s easy to change the max for any new items I might add.

You might not have noticed that the creature I’m viewing, a monster, has picked up a stone and a dead NPC’s sword and spell. Just as the player and NPCs can pick up collectables, so too can monsters. I don’t plan on letting all monsters pick stuff up, but it shows that I can easily make thief foes that grab stuff on the ground and run away with them.

There are various glitches I have to work out before I move on to the next step… but I need sleep now.

More and more Prototype progress

February 26, 2012

Additions/changes:

  • Randomly placed natural stone and ore blocks
  • Letters and graphics in object circles to help identify them
  • Item list for every entity

Next is item collectables. I wanna mine those ores!

More Prototype Progress

February 26, 2012

I’ve been working pretty much nonstop since that last post, with various successes and failures. Let’s start off with a screen, shall we?

A Healer heals a Warrior, while a Wanderer waits for an upgrade.

Noteable changes and additions:

  • Basic Item system
  • Basic Gambit system
  • New npc class: Healer
  • New item: Heal spell
  • New item: Pickaxe (used to remove blocks)

NPCs

When NPCs enter the world, they start as wanderers. They follow you to the town. Once near enough to the town crystal, you can assign them a useful class – Warrior or Healer. The Warrior gets a melee weapon and extra HP, while the Healer gets a heal spell. The gambits on the NPCs define how they act.

You can use the upgrade items on any NPC, and have any number of either class.

Gambits

Each NPC class has a default gambit setup that makes the class useful. The Warrior will “attack” “foe: nearest”, and if there are no foes in its range of sight, it “wander”s. The Healer will “heal” “ally: lowest hp” first, and if the target or action fail for some reason, it will “heal” “ally: hp < 100%”. If there’s nothing to heal, it wanders.

I tried to make each gambit target and action “smart”: There are certain conditions where it doesn’t make sense for a gambit to fire. For example, if some gambit’s action is “heal”, and its target is found to have all of its HP already, then the gambit fails and the game moves to the next gambit. It’s pointless to heal something that’s already full, right?

Both monsters and NPCs have gambit sets. This makes it easier to build new creatures, and check to see what might be failing in AI code. When I have a decent number of gambits to use, I’ll set it up so you can change the gambits around on NPCs in-game.

Items

So far only the player has an inventory, but it’s pretty straightforward for me to add inventories to the NPCs and monsters. I’ll be doing this in the very near future. I’ll also be adding an inventory trading mechanism so it’ll be easy to give NPCs items and let you choose what they have equipped. I’ll probably set it up so they automatically equip any stronger items you give them.

While I’ve made all the above progress, I was kind of stupid yesterday. I spent most of the day trying to figure out how to set up scripting. There isn’t enough here to bother with that! I don’t know what I was thinking, I had it on my mind and then I tried my hand at it. I was even ready to try building a roguelike that would do everything out of scripts! Then I came to my senses. I may still go to a scripting language eventually, but I want to develop my game as quickly as I can.

I have so many things I want to do, I don’t even know what to do next. I’m doing my best to stay focused on Keeping It Simple and driving my efforts to get One Of Everything in. The next goal right now should be to assign NPCs to/from the player’s party. After a bit of a break, I’ll try to start on that.

One of the guys that’s building Dwarf Fortress said that it’s not easy to balance the time put in to design and implementation. I’m starting to understand what he meant.

Ano Sekai Prototype

February 24, 2012

I decided to get back to the basics.

I realised that I’m focusing on unimportant things right now – I don’t even know if I have a game worth building or not! So, I started a new project, a prototype, that will have all of the features I intended to put into the game. It will have the ‘feel’ that I want the end game to have.

Let me explain what things represent:

Blue ● – Player
Blue ○ – Targetting Cursor
Yellow ● – Weapon

Red ● – Monster
Green ● – NPC

White ● – Town Crystal
Grey ● – Stone Wall
Brown ○ – Open Door (Brown ● is Closed)

So far I have all the functionality of where I was before, but I now have working doors, a useable weapon, and upgradeable NPCs. That was all done from scratch last night.

I’m doing something (I think is) called Rapid Prototyping. This means you ignore anything that isn’t important to the core of the game and build as simply as possible. I’m representing everything with circles for as long as I can do so, so I don’t have to think about the graphics. I also went to 2D because there are less things to think about.

Before I threw this post together, I was designing the item system and the gambit system. I expect I’ll have results soon.