Update #69 - Message UI & New Textures

Hello! I hope you’ve been doing well. Even though I took a couple of days off around Thanksgiving, I got a lot done in the past couple of days. First, here are the minor changes:

  • Merchantry: Added "IsEnabled" to shapes. Disabled shapes don’t intersect.

  • Merchantry: Added string Group to shapes. Any two shapes of the same group can intersect.

  • Merchantry: Crafting the same recipe multiple times without removing the output items will now add to the stack. If different output item or max stack, it gets spit out into the game world.

  • Merchantry: Clicking an item on the player will add it to his storage, showing up in the inventory UI.

  • Merchantry: WorldItem is now compliant with LeftClick() standards.

  • Merchantry: The selected object's LeftClick(), RightClick(), and ItemClick() methods are now ignored when the mouse is inside a UI.

  • Merchantry: Crafting an item takes time, and can be queued by clicking the craft button multiple times.

  • Merchantry: Added right click events to world UI elements.

  • Merchantry: Now you can decrease the crafting queue count by right-clicking the craft button.

  • Merchantry: Context UI supports infinite options.

  • Merchantry: Storage objects can be emptied via Context UI.

  • Merchantry: UI click detection functions, and the inventory tabs and BaseUI titlebar have click detection.

  • Merchantry: The game stops when the window is inactive.

  • Merchantry: Added a currency item.

  • Aeta UI: Added key and mouse control delaying to Controls.cs.

  • Aeta UI: Removed the control delaying from UserInterface.cs.

  • Aeta UI: InterfaceManager.cs now passes its Controls instance to added UIs.

  • Merchantry: Added LayerObject, allowing layers to have WorldObject functionality.


Message UI

The Message UI is a multi-purpose screen for displaying character dialogue, random events, or system messages. You can see the first of these in the video above.

Each message packet can contain a custom icon, title, subtitle, description, and unlimited button options.


New Textures

update69Scene.png

The picture above contains most of the art assets completed this week. I’m very happy with how they all look!

Tiles:

  • Wooden fences (16 tiles)

  • House (42 tiles)

  • Stone paths (22 tiles)

Objects:

  • Flowers (3 textures)

  • Mailbox

  • Signs (3 textures)

Items:

  • Token (currency)

  • Coal

Also, here’s a video of a bouncing house. It uses a tile layer and is attached to a LayerObject. This gives it similar functionality as a regular world object. Once I make some changes to collision physics, the house can be allowed to be pushed by other game objects.


Current Goals: A few more object and tile textures, character code, pathfinding, crafting recipes.
Future Goals: Pause UI (simple overlay), escape key UI.

If you have any support, ideas, constructive criticism, or just want to tell me how much you dislike my creations, you can:

  1. Send me an email.

  2. Tweet to @Soestae.

  3. Gab to @Soestae.

  4. Toot to @Soestae.

  5. Comment below.

Do you want to support my projects? Here's what you can do:

  1. Become a Patron here!

  2. Tell your friends and family about my projects!

  3. Retweetrepost, retoot, and share!

Thank you for reading!
Soestae, Emberium

Update #68 - Storage UI, Spatial Grid & ObjectShape

Hey, how have you been this week? I’ve been working hard on Merchantry. I’m amazed at the quick progress I’m making, and even more incredible that I’m not spending much time solving bugs, errors, or re-writing code.

Anyway, here are the minor changes:

  • Aeta UI: Added a minumum move distance variable to the Camera class. Moves if the distance from TargetPosition to Position exceeds the value.

  • Merchantry: The camera now can focus on WorldObjects, adding a stronger gamefeel and flexibility.

  • Merchantry: Added proper object selection. If the mouse is hovering over two objects, the one with higher depth is selected.

  • Merchantry: Added storage grid using the world-based UI framework.

  • Merchantry: Improved how world UI item slots handle drag-to-UI transitions. More shortcuts such as LMB+CTRL allow more control.

  • Merchantry: Added text above StorageObjects, telling the player how many items are in the storage.

  • Merchantry: Added trajectory and "per second" calculations to ObjectPhysics.

  • Merchantry: Objects now have mass. Low-mass objects are easily pushed around by high-mass objects.

  • Merchantry: Removed temporary code in the Inventory, and hooked up the controlled object's storage.


Storage UI

Making use of the same UI framework for crafting, I’ve added in another UI: Storage! You can see most of its functionality in the video above.

potStorage.png

Width and height variables are passed to the Storage UI through thr constructor, so it can be easily fit to any other object. In this case, a pot and a barrel.


Spatial Grid

spatial.png

This is a non-recursive spatial grid designed to optimize how objects interact with other objects. Let’s look at this in the context of collision detection. Without, each object would check with collision with all other objects in the map. With, they only need to check in their sector plus neighbours.

The sectors use a lazy approach, only being created when an object steps into where a new sector should be. If the sector no longer contains objects, it is added to a recycled list after a small duration. If another object steps into it, the sector is recycled back instead of being created again.

When an object moves into a new sector, it removes itself from the previous sector’s list of objects and adds itself to the new one.


ObjectShape

With this, any object can have a shape used for collision detection. I’ve created the Shape class which has the basic functionality (Offset, Contains, Intersects, etc.), and two classes which derive from it (Box and Circle).

The only parameters I need to focus on is the Shape’s offset (automatically relative to the Object’s offset), and it’s size. Circle is radius, box is width/height. If I want an object to take on a complex form, simply add more shapes.


Final Words

Current Goals: Object textures, tile textures, character code, pathfinding, crafting recipes, dialogue UI.
Future Goals: Pause UI (simple overlay), escape key UI, message UI, professions.

If you have any support, ideas, constructive criticism, or just want to tell me how much you dislike my creations, you can:

  1. Send me an email.

  2. Tweet to @Soestae.

  3. Gab to @Soestae.

  4. Toot to @Soestae.

  5. Comment below.

Do you want to support my projects? Here's what you can do:

  1. Become a Patron here!

  2. Tell your friends and family about my projects!

  3. Retweetrepost, retoot, and share!

Thank you for reading!
Soestae, Emberium

Update #67 - Crafting, Chatting & AI

Hey, how’ve you been? As I surge ahead with Merchantry, it’s getting so much better.

  • Merchantry: Fixed the ObjectAnimation states' Initialize action not being called.

  • Merchantry: Changed WorldObject's UseObject() method to LeftClick() and RightClick().

  • Merchantry: Added a basic character class, which all characters (PCs and NPCs) will derive from.

  • Merchantry: AI now makes use of priority checking (as a float). The highest priority goal is the current goal.


Crafting

I’ve got the foundation for crafting in place! It’s very functional, just need to do a little bit of polishing. While I hoped to use Aeta UI for this interface, I ended up coding some new classes just for game world UIs (Element, ButtonElement, ImageElement, ItemSlot). All world UIs derive from UIObject, which then derives from WorldObject. Let me walk you through how crafting in Merchantry works.

craftingZoomedOut.png

Pictured above is the crafting table, as viewed from the perspective of the player (ignore the doggos). Clicking on the crafting table will zoom up really close, allowing you to use it properly.

craftingZoomedInA.png

The UI is intentionally positioned on the right-side of the screen to make room for the inventory, which opens up on the left. Currently, the crafting table has similarities to how Minecraft handles it. Drag your items onto the grid, and if the item placement matches a recipe, the red “X” changes to a hammer. Clicking the button will create the item(s), placing it into the output slots below.

craftingZoomedInB.png

Now you can grab the items and put it into your inventory. Nice job! One important distinction is that the UIObject contains its data, so walking away (exiting) from the UI won’t force the items out like in Minecraft. I’ve placed items in it, exited out, and starting pushing the table around. I really enjoy how connected this UI feels to its world.

Even though its used for crafting, I can easily create different UIs. An anvil for reinforcing/repairing tools and armor, a furnace for smelting ores and baking food, etc. All I need is the object’s texture, position the elements, and set up recipes to match the slots.


Chatting

aarf.png

Nothing too fancy or much to say about it, but it gets the job done. Each object has it’s own ObjectChat class. This is where all of the important chat data comes from. While you can send a string directly, the best way is to add a a string with a key. The key is called, and a random message is sent. Fairly helpful!


AI

In Merchantry, AI is goal-oriented, making use of a float for priority. The highest priority goal is focused on first.

In this example, the dog has two goals: Follow, and Rejoice. Follow’s priority is calculated by the distance from the player, and Rejoice’s priority is at a fixed value. If the player moves too far from the doggo, he’ll move towards the player. When he reaches the player, he celebrates by jumping and barking.

I may need to make some tweaks in the future, but it works well.


Final Words

Current Goals: Polish existing features, various world textures, object selection code, character code, pathfinding code.
Future Goals: Pause UI (simple overlay), escape key UI, message UI, dialogue UI, professions.

If you have any support, ideas, constructive criticism, or just want to tell me how much you dislike my creations, you can:

  1. Send me an email.

  2. Tweet to @Soestae.

  3. Gab to @Soestae.

  4. Toot to @Soestae.

  5. Comment below.

Do you want to support my projects? Here's what you can do:

  1. Become a Patron here!

  2. Tell your friends and family about my projects!

  3. Retweetrepost, retoot, and share!

Thank you for reading!
Soestae, Emberium

Update #66 - Context UI, Item Transferring, Tile Layers & More

Hey, how are you? I’m going to be with family on Friday, so this week’s update comes early. As you’ll see, I’ve got quite a bit of small, but important topics. Here are the minor changes:

  • Aeta UI: Renamed "IsMouseHover" to "IsContainsVector", adding a Vector2 as a parameter. More freedom!

  • Aeta UI: Added two useful methods to UserInterface. ContainsElement(Vector) checks for any elements containing the vector, whereas ContainsBackground(Vector) checks if any clickboxes contain the vector but no elements contain it.

  • Aeta UI: Renamed ActionQueue to TimeQueue, and cleaned up the code in that class.

  • Aeta UI: TimeQueue is now public. If you have a sub-class that needs to make use of the instance, it now can!

  • Aeta UI: Removed all methods relating to TimeQueue from UserInterface.cs. It makes more sense to call the class directly (Queue).

  • Aeta UI: Some variables in Camera now have default values.

  • Aeta UI: Added Max*Speed variables to Camera, where * is Move, Scale, or Rotation.

  • Koah Particles: Completely changing everything about how this is structured, replacing "Emitters" in favor of a ParticleManager.

  • Aeta UI: Completely removed the "Clickbox" class used by the UserInterface class to check for mouse clicks, replacing it with good ol' rectangles. Same functionality.

  • Aeta UI: Added OnResize event to the UserInterface class.

  • Website: The Community page now has a working link for the Discord invitation.


Art Assets

DqNwBnxWsAEV0ym[1].jpg

I’ve done a bit of work on textures. Mostly fodder, but it looks great. The blue pots were inspired by the ones found in Wind Waker, with the green being “earth-like” copies. The grass is nice, too!


Context UI

Pictured above, the context menu is opened by right-clicking an element (such as an item). In this case, it lists up to three item-specifc buttons, plus an option to get rid of the entire stack.

Similar to the Tooltip UI, I’ll set up a variety of different layouts for various situations.


Item Transferring

Shown above is the fluid transition of an item from the inventory being dragged into the game world. The improved particle engine and basic object physics are very noticeable, too!


Tile Layers

Tile layers are a simple solution to displaying the game world, primarily images that have little interaction and movement.

Each layer uses it’s own matrix for positioning, as well as it’s own rotation and scale which go into the matrix. This allows all tiles in a layer to move in unison. This functionality is pointless for backgrounds (like a grassy field), but great for things like large gates and towers that need to move.

Also, I’m using sheets for textures instead of individual images like I did in Pilgrimage of Embers. It’s much easier to manage a small collection of logically-named texture sheets (biome*Grass, town*Structures, etc.) instead of a few hundred images for a map region (grassCornerTL, grassEdgeLeft, etc.).


Final Words

Current Goals: Crafting UI, more world textures and code, character art style.
Future Goals: Pause UI (simple overlay), Escape key UI, Message UI. Simple character textures (pre-alpha).

If you have any support, ideas, constructive criticism, or just want to tell me how much you dislike my creations, you can:

  1. Send me an email.

  2. Tweet to @Soestae.

  3. Gab to @Soestae.

  4. Toot to @Soestae.

  5. Comment below.

Do you want to support my projects? Here's what you can do:

  1. Become a Patron here!

  2. Tell your friends and family about my projects!

  3. Retweetrepost, retoot, and share!

Thank you for reading!
Soestae, Emberium

Update #65 - Merchantry Inventory & Aeta Improvements

Hello, how are you? So, I’m doing something a little different… just this once. All changes related to Merchantry will be placed under the Merchantry section, and likewise for Aeta UI.


Merchantry Inventory

The inventory for Merchantry is in a very functional state, and I’m extraordinarily satisfied with how it’s structured. There are small changes I’ll make later, such as more information to the tooltip layout, various display icons for items, and finishing the tab icons. As stated in the intro, here are the minor changes to Merchantry:

  • Merchantry: Completely changed how the inventory data is handled. Much more reliable!

  • Merchantry: Renamed ItemObject's "Attributes" to "Enchants".

  • Merchantry: Added "Attributes" to ItemObject, meta data for characters and other situations.

  • Merchantry: Added an advanced tooltip UI. The inventory uses this very well!

  • Merchantry: Added EnchantAssets.cs and ItemAssets.cs. These contain items and enchantments for copying.

  • Merchantry: Fixed an issue with ItemObject's RandomID not using a properly seeded Random, thus ruining everything.

  • Merchantry: Fixed a mistake that caused the consumables and resources tabs to be interlinked.

  • Merchantry: Items can now be dragged out of the inventory.

  • Merchantry: Added icons to the tabs [2/5].

  • Merchantry: Fixed a lot of issues with the current font. Much nicer!


Aeta Improvements

aetaBanner.png

Since release, I’ve made a large number of improvements to the Aeta UI library. I was very happy with how useful this library was on release, and with more improvements and fixes I get happier. I won’t list all of the changes since version 1.0 here, but I will soon.

Anyway, here’s the reason why Aeta has it’s own section. When I’ve got a bit more of the library worked out, I’ll post Aeta 1.1 in the next week or two.

  • Aeta UI: The size of an interface can now be easily changed through SetSize() or setting Size directly.

  • Aeta UI: To keep elements from jittering, some vectors have been converted from floats to integers.

  • Aeta UI: Elements now use their UI's ActionQueue rather than creating their own. Less memory usage, and more reliable when modifying the element's dictionary.

  • Aeta UI: Improved the method for keeping user interfaces inside the screen.

  • Aeta UI: Renamed variables in Camera.cs: LookAt() to Focus(), ForceLookAt() to ForceFocus(), DelaySpeed to MoveSpeed, WorldToScreen() to ToScreen(), ScreenToWorld to ToWorld(), Zoom* to Scale*.

  • Aeta UI: Improved how the Camera's scale interpolation is handled. It now behaves very similar to movement.

  • Aeta UI: Added another dimension to the Camera's scale, allowing vertical and horizontal stretching. More freedom!

  • Aeta UI: Removed the parallax vector parameter in Camera's View() method.

  • Aeta UI: Improved the Camera's IsOnScreen() method.

  • Aeta UI: Fixed a critical error inside a method that checked if the mouse was inside any maximized UIs. Caused by an invalid conversion.


Final Words

Current Goals: Crafting UI, game world textures and code, character art style.
Future Goals: Pause UI (simple overlay), Escape key UI, Message UI. Simple character textures (pre-alpha).

If you have any support, ideas, constructive criticism, or just want to tell me how much you dislike my creations, you can:

  1. Send me an email.

  2. Tweet to @Soestae.

  3. Gab to @Soestae.

  4. Toot to @Soestae.

  5. Comment below.

Do you want to support my projects? Here's what you can do:

  1. Become a Patron here!

  2. Tell your friends and family about my projects!

  3. Retweetrepost, retoot, and share!

Thank you for reading!
Soestae, Emberium