OpenArthurianX6, Line of Sight

Crossposted from OpenArthurian devlog.

Was considering what would be the best way to do this. LOS in Ultima 6 is weird since it seems to be location-based (once you open a door you can see the room inside), but you can see through walls (some times?).

I thought just replicating it for the sake of it didn’t make sense and would bring more complexity for map handling and editing. So instead I went for a full system with opaque tiles, so you just have to define the tile as opaque and the engine takes care of the rest.

The current implementation is a pretty simple raycasting, and a mask drawn over the map. It works almost great except the tweening of the mask moving is not in sync with the camera tweening, which causes some small artifacts in the mask border.

fov1fov2fov3

Expedition: July 7, 2019 Update

It’s been about three weeks since the last update so let’s go!

Don’t forget to check out the forums and discuss there, as well as follow the blog!

Cartography – Automap

We had made progress on this some months ago, but with all the changes in the design and now that we have procedural terrain, we practically had to remake it from scratch.

Discovering

We are now generating the base map from the generated (or loaded) terrain, taking into account the heightmap to draw the shoreline as well as icons for the mountains and forests, and then displaying it as the player explores, including the position of the player and adding the discoveries he has made (see below).

Automap

I must say that it looks pretty cool.

Discoveries and Findings

This facet of the game is meant to provide the players with a motivation to explore the map. As you walk around you will find things such as animal or plant species, ruins or new cultures. When you find a new one you will have a chance to name it and will earn “stars” based on its rarity. You can always check your discoveries in your journal.

Discovery Journal

This facet is still very early in progress, it will be heavily based on procedural generation for the description and (2D) appearance of the findings you are making.

Procedural Generation

We invested a serious amount of dev on terrain generation, we are now generating islands using midpoint displacement fractal with preseeded key points and a lot of tweaking to make them look nice, be more controllable, and play well with the base procedural generation we had in place which was 100% Perlin noise.

Islands

We are also affecting the base heightmap so that plains look plainer and mountains look more dramatic, by scaling specific portions of the heightmap.

Dramatic Mountains

Combat

Combat now takes place on a separate “scene”, so when for any reason the player engages in combat (right now there are just random ambushes) he transitions to a separate area with a higher level of detail

Combat

Exploration

Small tweaks on how things are portrayed in the overworld, to give a better sense of scale now that the combat has been moved to a separate scene.

Also, further additions to mouse movement so you can now move in the ocean and enter towns.

Title Screen

Working in the flows for both the Campaign mode and the New Expedition mode, you can now select the campaign (but there’s a single one, the Pacanchique one), or select the “civ” you are going to use for the procedural mode.

 

Expedition: June 17 update

Procedural Generation

expJun17

  • Make individual features of towns “land” into irregular terrain when placing them.
  • Allow setting the tiling sizes of the terrain layer’s textures.
  • Paint terrain with rock texture based on its slopeness.
  • Place towns in grass band.
  • Prevent trees from being placed in steep slopes.
  • Select between premade or procedural terrain based on the selected game mode.
  • Paint “dirt” below trees and towns placed in the map with a semitransparent texture mask.

Combat

expJun17-3

  • Release camera lock on the main unit when entering combat mode.
  • Add visible arrows as projectiles for archers.
  • Transition to Game Over scene when the main unit dies

Exploration

expJun17-2

  • Mouse movement in Exploration mode

OpenArthurianX6 – Saving and Loading Games

Mirrored from OpenArthurianX6 devlog

:: Finally managed to make saving and loading work, which involved doing a big refactor on the data that was being kept on each entity. I’m using my own circular-functions library and even had to push a small bugfix after about 4 years. See it working in the video below.

This will require some more testing, some bugs likely managed to slip in since it’s a big change.

Also, since the last update, the changes done by Jucarave for door handling were merged in, as well as the popups with item descriptions.

Next up to finish milestone is:

  • Line of Sight, still thinking of how to do it, considering the following options:
    • True LOS using raycasting or shadowcasting like a traditional roguelike, might be a bit heavy in the processing and might look a bit weird with the scrolling, but would be more accurate and apply to a lot of different situations without special casing. Just need to define whether a particular cell type is opaque or not.
    • Ultima 7-like, using different “zones of sight”, so if you are inside a building you can only see inside the building (but you can also see other nearby building through the walls!), and if you are outside the buildings you can only see the wilderness (but you can see through buildings!).
    • Ultima 6-like, with more elaborate areas of sight, so once you open a door you “unveil” the room, but then would have to keep track of these areas, and model them as part of the maps. Also you can see other unveiled rooms thru the walls.
  • Reading Books, which should be simple enough.

 

Expedition: June 8 Update

Procedural Terrain

procgen

  • Created heightmap using Perlin noise, and apply to Unity Terrain object
  • Add the first layer of textures to the terrain based on height boundaries (ocean floor, grassland, and mountain).
  • Make the boundaries between terrain types fuzzier by fading, dithering and adding noise to the height thresholds.
  • Add forests by seeding with trees on the grassland band, and then growing them.
  • Add support to load towns into the terrain

Music / SFX

  • Added battle overlay so when you go to Combat mode it transitions smoothly into a more active track.
  • Added ambiance background noise for land exploration.

Graphics

  • Better textures for the Muisca towns, more responsive to changes on lighting

Fatigue System

  • Changed sleeping hours prompt to use a slider
  • Check time for the “sunny” modifier (only add during the day)
  • Add notifications when finished resting.
  • Added a “resting” label to the HUD shown while the expedition is resting.

Camera

  • Use scrollwheel or +- to change the zoom level
  • Remove automatic battle zoom