Item System

Item and Inventory System Continued

Tree chopping partially done. Still need animations.

Over the last two weeks I continued working on an Inventory System and an Item system. The major change was I switched my inventory to store data using an array instead of a list. Because inventories are a set size and I think it will be more efficient to handle it this way. I need to next think about how to handle item stacking. Because currently I can pick up 20 items until the inventory is full. But if I pick up 20 pieces of wood, they should not fill every slot in the inventory. They should stack in some way.

Wood Log Sprite:

After changing the inventory system slightly, I created a sprite for a wood log. I then implemented the code to chop down trees. However, I have not added the animations for the player or the tree falling at this point. I have been working on the player attack animations as well and I think for the time being I will have the attack animation be the same as the chopping animation. There definitely is a lot more polish needed, but I think the work so far is a good start.

Attack Animations:

While working on the attack animations I realized that my sprites for running and idling were not anchoring the player sprite at the same location. So, I had to go through and modify the player sprites anchor locations. Now that they are all relatively at the same location I can try and work out how I am going to handle the attacks. The issue is I have 32 x 32 pixel sprites currently. Some of the attack animations will need to be larger to accommodate the weapons. Unless I separate the weapon from the player. I am not sure that I want to do that. For now, I think I am just going to use larger sprites and anchor them at the center point, so the player does not jump around between animations.

Progress:

I feel like I have made little progress over the last two weeks and I am hoping as the semester progresses, I find more time to work on my project. My work and class are keeping me busy but I will do my best to find time to work on this project. Until next time.

Full Change List:

Re-Coded: the inventory system to store items using arrays instead of a list.
Created: wood log asset to drop when a tree is cutdown.
Coded: Player chopping down trees (without animation) into the game.
Modified: anchor points on all player sprites to the center.

Item and Inventory System Continued Read More »

Item and Inventory System Started

Item Pickup System
Gif showing the items being auto picked up when walking over them

I realize that it has been two weeks since posting the last update.  But college has started the fall semester and my work schedule has increased.  Besides my full-time job at the college I also am teaching a class this fall.  So, I must spend a little more time working on my class, leaving less time for me to work on my game.  But I will still be working on the game it will just be at a slower pace.

Item and Inventory System:

Over the last two weeks I started working on an Inventory System and an Item system.  The inventory is working in code.  I can put items into the inventory and remove them.  However, I have not worked on a graphic interface yet for this.  I also added the item system so items can be placed in the game world and can be picked up by the player. The items can also be rendered into the game world.  But for now, that most items I do not have icons for I just rendered in a black square.  Once I get more sprites, I will add them. 

Campfire Animation and Sprites:

After working on the item and inventory systems I decided to test it by creating a campfire sprite.  From there I realized I would need a way to animate it, so I worked on the art for each frame of the animation.  I am satisfied with the way it turned out so far but I think I will modify it a bit.  I also may investigate adding particle effects to make it look like smoke is coming off.  But overall, I think it looks good so far. 

Campfire
Gif showing the animated campfire

Attack Animations:

I also started thinking about how to handle the attack animations of the main character.  But so far, I am not sure how I want this to work.  I did start making animations for it, but I am no where near done with that work.

While I was working out the player attack animations, I decided I would first create idle animations for each direction that the player can stand.  I was able to finish them, but I want to do more work with them, so the clothes and hair are more responsive to the player movement.  But it was a good start. 

One last project I worked on was creating long grass sprites for adding grass that the player can walk through.  I only created the sprites at this point, and I have not implemented it into the game at this point. 

It has been a slow two weeks and I am hoping as the semester progresses, I find more time to work on my project.  Currently, I am doing a lot of art for the game and it is taking a lot of hours just to get the sprites done.  I believe once I get the attack sprites created then I will still need to implement them into the game.  I am probably going to be posting every two weeks for a while.  But, depending on how much I can get done I may post more often.                

Full Change List:

Coded: the start of an inventory system for the player and other mobs.

Coded: the start of the item system (player can pick up items and store them in inventory)

Created: a campfire sprite and animations for use as a placeable item.

Created: Sprites for the player idle animation frames

Added: Player idle animations to the game.

Created: Sprites for long grass

Item and Inventory System Started Read More »