RustRoguelike icon indicating copy to clipboard operation
RustRoguelike copied to clipboard

Unity Roadmap

Open MicroChasm opened this issue 4 years ago • 3 comments

A full Unity version of the game would include:

Spawn and remove tiles surfaces, walls, and intertile walls. Attack and movement overlays Use-mode overlays

Full sets of 3D models and animations Toon shader using Shader Graph UI in Unity

MicroChasm avatar Nov 15 '21 04:11 MicroChasm

We need to determine the current state of the Unity3D/Rust integration part of the Unity project. Some questions are: Command processing is asynchronous. Many messages are not handled. The Rust code is being updated to accommodate frontends.

nsmryan avatar Nov 15 '21 05:11 nsmryan

The rust code has been updated to emit all information needed by Unity. The Rust SDL2 display is now driven by these messages, with a handful of configuration items from config.yaml which would have to be redone in unity either way (colors, toggling debug stuff, toggling overlays).

The rust code also emits a description of the map as we discussed.

I have started to updated Unity to match the new messages. So far the map is spawned from the given description, and the player and other entities are spawned and can move around.

Messages that we will likely have to implement at some point:

  • Sound (starting position) and SoundHitTile (tiles effected by a sound)
  • SoundTrapTriggered, BlinkTrapTriggered, FreezeTrapTriggered
  • Blink and perhaps FailedBlink
  • GateTriggered
  • Froze
  • PickedUp (picked up an item)
  • ItemThrow and perhaps ItemLanded
  • Attack and perhaps messages for which type of attack like Blunt, Pierce, Slash
  • Killed and Remove
  • Pushed
  • Interact and ArmDisarmTrap
  • Actions like JumpWall or Dodged
  • Yell
  • Perhaps TriedRunWithHeavyEquipment when you run with a shield or hammer
  • HammerRaised, HammerSwing, HammerHitEntity, HammerHitWall
  • NotEnoughEnergy
  • EatHerb
  • Skills like Ping, Sprint, GrassWall, GrassThrow, GrassShoes, GrassCover, GrassBlade, Illuminate, FarSight, Reform, StoneSkin, Swap, PassWall, PassThrough, WhirlWind, Swift, perhaps Forget
  • CursorState to control whether the cursor is visible, and place it in a given position. CursorMove to indicate that the player moved the cursor's position.

Other messages which involve displaying information to the player:

  • TileFov indicating a position and whether it is visible, at the edge of the visible range, or not visible.
  • EntityInFov indicating whether an entity is visible
  • UsePos, UseDir, UseDirClear, UseHitPos, UseHitPosClear, UseOption all indicate aspects of use-mode such as which positions can be selected and which positions will be attacked as a result of a selection.
  • EntityAtCursor indicating that an entity is under the cursor for information overlays
  • EntityMovement, EntityAttack indicating where an entity can move or attack on their next turn.
  • EntityFov indicating the visible tiles for a particular entity
  • Stance indicating the stance of a entity
  • GainEnergy, UsedEnergy indicating energy levels
  • GameState for whether the game is Playing, Win, Lose, Inventory, SkillMenu, ClassMenu, ConfirmQuit, Use, or Exit
  • InventoryItem indicates item information from the player's inventory
  • AddSkill and AddClass add skills and classes to the player
  • GatePos indicates the tile controls by a gate trigger. This is used to overlay information when the cursor is over a gate trigger.
  • PlayerGhost gives the tile that the player ghost occupies for movement, use-mode, and currently in cursor mode.
  • Overlay indicates whether to show information overlays.
  • NextMoveAction indicates what the next movement will do (run, sneak, walk).
  • Possibly UseAction which indicates whether the use-mode will interact with a tile, or use an item. If the player will use an item it tells you whether the item is a primary weapon, consumable, or a misc item like a stone or herb.

nsmryan avatar Dec 28 '21 16:12 nsmryan

Some other notes: We talked about using materials for fov, and possibly creating materials at runtime to darken colors. The objects then need their material set based on FoV. We talked about throwing stones, and how they need to end up in the center of a tile. One solution is gamey and just puts a stone in the right place without it really getting there.

nsmryan avatar Dec 30 '21 05:12 nsmryan