Saturday, September 03, 2011

Chests and Inventory

I've been working on an inventory system in the game.  I've played with a couple different techniques and I think the best way to approach interacting with the inventory is by using a mouse.

I tried several keyboard combinations but when I did that, it hindered ship mobility.  If there's an enemy coming towards the player they should be able to quickly break free of the chest and defend themselves without having to press any extra keys.  I think the generic approach of using a mouse to click and drag things between inventory <-> chest is probably best for now.  Of course that'll have to be reconsidered for the 360 controls, but I have plenty of time before I have to make that decision.

So some screenshots.  The first set will be the chests.  Notice that when the player is in range, the chests simply sit in place.  They do not require any power and are activated much like RFID chips in that when the player nears, they turn on.  They draw their power from the player primarily.

I have 2 chests next to eachother because I was testing the approach sequence.
 The player is lined up with the chest, so the landing lights glow.

Player has landed and the chest is activated.

Now the player presses the tab key to open up their inventory and the inventory inside the chest.

The numbers below the icons will be quantity when I'm done.  Right now, they're the inventory position.
You'll also notice the building structure on the right.  I like the way Minecraft handles building objects and I'll be doing that in this game.  The next screenshot will be what the inventory looks like when the player is not docked to a chest.

I need to update the graphic so it shows the slots like the chest inventory screen does.

So that's what I've been working on the past couple of days.  I'll be spending the weekend and labor day with my wife, so I won't get much (if any) programming in.  She had to move to Texas a couple of weeks ago to take a job as an Art Teacher there because there is no work for her here.  When she visits, the computer takes last place on my priority list :]

So until next week ~

Thursday, September 01, 2011

Another Screenshot + Updates

Notice the little patches of dirt on the bottom.
I've added a little help screen (F1) to the game.  It's a very basic one with a listing of controls so my testers have some kind of reference.

I added a new structure type called TerraFormers.  You can see it at the bottom there.  They'll be very important later on in the game :)

When you deleted a block before, it just removed it from the world and doesn't draw it anymore.  I thought this looked kinda empty, so when you delete a block now I'm drawing a block 'behind' it.  The world looks a little more full like this since it's not just empty space.

I added the beginnings of an inventory system.  Eventually, all the blocks you eat will be put into your inventory so you can build these structures.

Lastly, I made some minor bug fixes.  I'm very close to an alpha build.  I want to finish inventory up, add some basic AI to the game so there's something to interact with, add some weapons and make more block types before I fully release it.  I won't be doing any developing at all this weekend but I'll continue to dev all this week and resume next Tuesday.

Tuesday, August 30, 2011

You can now create blocks.

The player can now create blocks in the game.  The top left corner also has new additions to the UI.

Notice the Drill, Defend and Develop.  Toggling through these will give the player different drill bits.  Drill = destroy blocks.  Defend = weapons (to be developed).  Develop lets the player build things.

The screenshot I posted there shows all of the features so far.  Fuel depot, light depots, repair station, lighting, creating blocks, deleting blocks, hovering and the homing beacon.  I'm really excited about my progress so far.

Sunday, August 28, 2011

Homing Beacons

Homing beacons have been added.  The video above will show how they work.

Updated Lighting + Fixes

Light from a post now gradually fades.
So I spent the evening fixing some bugs and adjusting the gameplay.  As you can see from the screenshot, light from posts now extends a lot further out and gradually fades out instead of the black/white we had before.  As I was playing and testing bug fixes, I also realized that it's a pain having to constantly find a fuel depot.  I increased the range of the depots by about 3x and I found it to make the game a lot more fun to play.

The bug that I think I've fixed is the one where the map flickers.  I thought this was due to a rounding error but I actually fixed it by simplifying my code.  Beforehand, I had two variables in my world.  There was a Vector3 called mapPosition and a Vector2 called drawOffset.  mapPosition was a Vector3 because I thought I could have multiple layers of map and store them on the Z axis.  drawOffset was pretty much a Vector2 copy of mapPosition that was used for drawing objects.  As time went on, I found myself rarely using mapPosition and I wondered if I could just pull it out.  After backing up all my code (to make it easier to revert incase I didn't like it), I started the process of removal.

After getting all the references out, I played around for a little bit and made sure I didn't introduce any bugs.  Much to my satisfaction, I realized that I hadn't seen the map flicker bug at all since removing the Vector3.  I've been testing for a couple of hours ever since and haven't noticed it at all.

I also added some basic AI.  I'm not sure how I feel about it though.  I want the player to feel very alone in this game.  You are inside this machine and have been left on this roid to survive/make your way back home (haven't completely figured out the story yet).  Either way, I want to find a balance where you can feel that there's a threat through some kind of enemy but also feel very alone in this asteroid belt.

I'm going to keep working on gameplay elements this week.  I'm also hoping to finalize a story before the end of the week.