Thursday, March 14
This week Matt and I started to really hunker down into the code of our game. He has been working on getting a menu system to work in the Light Weight Java Game Library (LWJGL). This is the same engine that Minecraft runs on, so we are certain that this choice in engine is going to make our lives a lot easier. I have been working on the base classes for almost everything in our game. We have two base classes called Entity and Item. Entity is extended by Player (the main player), NPC (game npcs) and Monster (game monsters). Item is extended by two different types, Equippables and Pickups. I chose to write the code this way, as Equippable items have certain features that regular Pickups do. Also, Equippables are not stackable, which is one of the main differences between the items in our game. There is also an EntityManager and an EntityGenerator that will handle all of the entities within the game and handle dynamic spawning of entities. The IventoryManager handles the player's inventory, as well as the monster's inventory if we decide to make the monsters drop items when they are killed. It is a Singleton design, which allows each object to have only 1 instance of the manager inside it at any given time. We have not decided on the style of our artwork and graphics yet, but we are getting to the point where we need to. We will need to know if we are going to use things like sprite sheets or not, and what the resolution of the artwork is going to be. I like 8-bit, but for this game it may be too low-res.
Right now the biggest problem I am having with the code is inside the InventoryManager. In this class, there will be a function to remove an item from the inventory. The problem lies in distinguishing between the two different types of items, as the Pickups type has the ability to be stackable, and we do not want the entire stack (if there is one) to be deleted when the player uses an item from the stack. Matt and I are going to brainstorm on this tomorrow when we meet for our weekly work session.
No comments:
Post a Comment