Sunday, February 25, 2024

More User Interface Design Work

February, 2024 is almost in the history books, and with it comes many new pieces to my game's User Interface.  I know these features are considered standard for any game, yet I am excited still to make progress on them and share some screenshots of the work I have completed thus far.  Without further delay, let me introduce you to the following new windows and features.

Mini-Map

Mini-Map

The mini-map allows the player to get a bird's-eye view of the surrounding area.  It has four levels of zoom (zoomed all the way out shown).  In addition to being centered on the player, it also provides a visual indication of where the player has traveled.  The map defaults to shades of brown which identify unexplored types of tiles such as mountains, forests, plains, rivers, etc..  As the player moves around, the path the player takes becomes colored with colors more indicative of the landscape, as seen above where my character traversed a green, grassy plain in springtime.  A developer feature of the map, which I actually think makes sense to leave in the game, is the seed value of the randomly-generated map shown below the map.  This could be useful for players who wish to re-play a favorite map seed.

Pocket Watch

Pocket Watch

For those players who can afford it, the purchase of a pocket watch at St. Louis or one of the annual  Rendevous will provide this new window which may be positioned on the screen to keep track of time while surviving in the Rocky Mountains.  The second hand is shown here, which I added for testing.  But in the game, the second hand will not appear.  This is because time will be accelerated quite a bit from real time, making the second hand not practical.  In the  absence of a watch, the player will only have the position of the sun to judge the hour of the day or the moon and stars for nighttime.  I think the watch will be a coveted item for any would-be mountaineer.

Hand Craft 

Hand Craft
Crafting system design is really tough!  Screens must be intuitive, easy to use, and provide enjoyment and practicality.  I have attempted (once again) to come up with a concept for hand crafting, which is the crafting a player can do anytime and anywhere without crafting stations and such.  I hope this design lends to a more interesting experience than what I had in Godot 3.  Starting at the top, the orange arrows button will be used to reset the recipe and slots.  The textbox allows the player to free-type the name of a known recipe to quickly set the materials, tools, and results slots with the required item templates.  In lieu of remembering the name of a recipe, the magnifying glass will open a popup showing a list of recipes the player has acquired.  The third button will toggle a repeat action allowing the player to automate the crafting of a recipe by only clicking the hands button once, repeating the process until all loaded materials have been spent.  The lower left bag icon, when clicked, will create an inventory container on the ground at the players feet, where items can be deposited for convenience.  The time spent and skill gains (if any) will be shown in the bottom right.

Journal


The journal was by far the most interesting and exciting window to work on.  Upon opening, it animates an opening of a book, revealing the ten sections accessed via the bookmarks at the top.  Each section is also further separated into five alphabetical sub-sections.  Each section-sub-section is fed from an independent JSON data file.  Clicking the arrows at the bottom left and right will cycle paging for the selected section and sub-section according to the JSON file's dictionary records.  The animations were so very easy to do in Godot 4!  The bookmarks tween up and down as the mouse runs over them.  I think the most challenging part of this feature was inserting images into the RichTextLabel control.  Since I know I will be spending many hundreds of hours filling this journal with valuable content about the game, I created a set of codes I can embed into the JSON data files to target the desired .PNG files that I want to show, making the creation of pages as easy as typing out the content.  I am sure I will do some sort of video about this exciting feature of the game at some point in the future.  Keep an eye on this blog or my YouTube channel for more information about it.

Well, as you can see, 2024 is already shaping up to be an epic year for this little survival game of mine.  I am happy you were interested enough to find this blog and please let me know if you have any suggestions or feedback.

Until next time, I'm

Bound2bCoding

Sunday, February 4, 2024

Weekend Project: Water Zones

I had quite a busy weekend.  First, I  created a rudimentary world map window.  For larger maps, the scroll bars allow scrolling around to see the entire map.  I still have a lot to do to it, but it is a start.

Water Zones.  A YouTube video showing how to do this is now up on my channel, here.

Next, well, I did not expect to tackle this feature so soon.  But inspiration struck and here I am with a first-pass at a water zone system.  The world builder has been updated to separate all water tiles into zones.  A zone is defined as a group of touching water tiles.  Depending upon the total count of the zone, the water tiles range from a natural spring to a river.  The following features are in place:

  • 100% procedurally generated water zones.
  • 7 water zone types, from smallest to largest: well, natural spring, watering hole, pond, lake, creek, river.
  • 5 water depths.
  • Ponds, Lakes, Creeks, and Rivers are randomly named using historical and fictional names.
  • Mousing over a zone will identify it and provide some basic details (see photos).
  • New water tiles (the best ever!) with 8 water styles from calm to raging.
  • Depracated the water shader approach (from my previous post) and decided to create tilemap animated water tiles.  This was my first look at the tilemap animated tiles in Godot 4.  I love it!!!
  • Animations include 21-tile flowing animations from an amazing free resource:
  • JSON definitions for 80 named water zones with many more to come.




The North Platte River!

There were two very challenging parts to this feature.  First, I had to write some translation logic for the Perlin noise water tiles in order to ensure that shoreline tiles were shallow and tiles out in the middle would be deepest.  Next, I had to write the zone detection and selection feature.  After a dozen failed approaches, I finally figured out how to group adjacent tiles into their own zones.  It takes exponentially longer to run the calculations for larger maps, but it is working well.  I will keep on optimizing.  What do you think?

Oh, and I also managed to add a new tree to the game.  Cottonwood, a very common tree in 1820 Wyoming, and even today!  You can see them in the second screenshot above.

Until next time!

I'm Bound2bCoding