Skip to content

Commit

Permalink
Add no signal 2024-10-31 notes
Browse files Browse the repository at this point in the history
  • Loading branch information
exodrifter committed Oct 31, 2024
1 parent fb1ad56 commit 0f671cd
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 15 deletions.
63 changes: 63 additions & 0 deletions content/entries/20241031171520.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
created: 2024-10-31T17:15:20Z
---

_no signal_ stream 135:
- Copied TODOs from [20241030235124](20241030235124.md)

Improved clues:
- [ ] Is there a clue telling you where bobby's room is in spirit's room?
- [ ] add clue saying where the work area is
- [ ] Maybe I should add a clue to the environment about the comms card also working for the storage room?
- [ ] Add a way for the player to know what the cards look like before they go looking for one? https://steamcommunity.com/app/2840590/discussions/0/4703538708011162084/#c4703539342753139244
- [ ] Add elevator icon to reactor scene? People tend to think that the elevator card is for the EVA room
- [ ] Add clue to office about which lab the lockbox is in

Bobby's Quest:
- [ ] Implement 3d printer computer UI
- [ ] Missing probe model with separate hull geo?
- [ ] 1G door closing sound and sparks sfx needs more work, also we need a particle effect to emphasize the fuse breaking

Naoko's Quest:
- [x] Add lockbox
- [x] Add lockbox key
- [x] Add popup for opening lockbox
- [ ] Add FTL prototype in lockbox
- [ ] Add lockbox key to item map

Sounds:
- [ ] Add 3D printer head pickup sound
- [ ] Fuse pickup sound is missing
- [ ] meeting room, study, etc has no ambiance
- [ ] Add door close sound
- [ ] Bedroom fixture needs sounds
- [ ] Add 3D printer head and printer spool to item map

TODO:
- [x] Clicking _most_ items causes the game to crash. seems to happen for items that belong to collections?
- [x] add metal wire to storage room
- [x] Hide a fuse in the elevator room against the sides of the wall? Maybe under something?
- [x] rename hallway
- [ ] add door state to save
- [x] Add scrollbar for inventory view
- [ ] Add keyboard controls for chat log
- [x] Mouse wrap not working in maximized window for some reason [20241031203718](20241031203718.md)
- [x] Safe keypad is still interactable after safe is open
- [ ] Sometimes the anchor point is wrong when you select an item, not sure how to reproduce.
- [ ] [#15](https://gitea.arcturuscollective.com/exodrifter/lost-contact/issues/15) Add OCR for handwritten notes
- [ ] [#16](https://gitea.arcturuscollective.com/exodrifter/lost-contact/issues/16) Item highlight assist mode
- [ ] [#34](https://gitea.arcturuscollective.com/exodrifter/lost-contact/issues/34) Add input remapping support
- [ ] [#43](https://gitea.arcturuscollective.com/exodrifter/lost-contact/issues/43) Add option to toggle look and orbit controls
- [ ] [#44](https://gitea.arcturuscollective.com/exodrifter/lost-contact/issues/44) Controller support
- [ ] I could break the cassette tapes sometimes, which means you need to manually re-wind the tape back into the cassette.
- [ ] Change sensitivity settings to use text input instead of sliders, or increase granularity to something impossibly annoying (might need to add something to increase how fast the slider moves if you hold down one direction), or show both a slider and a text box, or add a stateful toggle between text input and slider value
- [ ] Add way to reset setting to defaults
- [ ] People tend to double click on things, which cancels the camera movement. Maybe I can detect double clicks and handle them?
- [ ] Add version check to main menu
- [ ] Add save game selection to main menu
- [ ] Frame rate limit option
- [ ] Add z and c to rotate clockwise or counter-clockwise?

unsure if I want to do:
- [ ] Maybe we should color coordinate drives and computers? I didn't like it when I did this before, but maybe I could approach the problem in a different way... Also, the colors would mostly be useful for people who don't read but I'm designing a game that depends a lot on reading.
- [ ] Add audio when hovering over door or keypad https://steamcommunity.com/app/2840590/discussions/0/6857382246109938235/
64 changes: 64 additions & 0 deletions content/entries/20241031203718.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
created: 2024-10-31T20:37:18Z
---

Found out that my original mouse wrapping code was not working:

```gdscript
func _unhandled_input(event: InputEvent) -> void:
if event is InputEventMouseMotion:
handle_input_mouse_motion(event as InputEventMouseMotion)
func handle_input_mouse_motion(event: InputEventMouseMotion) -> void:
var window := get_window()
var xform := get_viewport().get_final_transform()
var new_position := get_viewport().get_mouse_position() * xform + event.relative
const margin := 10
var warp := false
if new_position.x < margin:
warp = true
new_position.x += window.size.x - margin
if new_position.x > window.size.x - margin:
warp = true
new_position.x -= window.size.x - margin
if new_position.y < margin:
warp = true
new_position.y += window.size.y - margin
if new_position.y > window.size.y - margin:
warp = true
new_position.y -= window.size.y - margin
if warp:
Input.warp_mouse(new_position)
just_warped = true
```

However, if your `Viewport` is letterboxed this would stop working because the coordinate spaces were not the same. Trying to fix the existing code wasn't particularly desirable, as the coordinate spaces were relative to the `Viewport` and I wanted to work in the space of the window. I was able to do this by using the `DisplayServer` directly:

```gdscript
func handle_input_mouse_motion(event: InputEventMouseMotion) -> void:
var window := Rect2i(
DisplayServer.window_get_position(),
DisplayServer.window_get_size()
)
var new_position := DisplayServer.mouse_get_position()
const margin := 10
var warp := false
if new_position.x < window.position.x + margin:
warp = true
new_position.x += window.size.x - (margin * 2)
elif new_position.x > window.end.x - margin:
warp = true
new_position.x -= window.size.x - (margin * 2)
elif new_position.y < window.position.y + margin:
warp = true
new_position.y += window.size.y - (margin * 2)
elif new_position.y > window.end.y - margin:
warp = true
new_position.y -= window.size.y - (margin * 2)
if warp:
DisplayServer.warp_mouse(new_position - window.position)
just_warped = true
```
31 changes: 17 additions & 14 deletions content/notes/godot-input-wrap-cursor.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Wrap mouse cursor in Godot
created: 2024-10-29T00:17:46Z
modified: 2024-10-31T21:17:50Z
aliases:
- Wrap mouse cursor in Godot
tags:
Expand All @@ -13,36 +14,38 @@ Sometimes you might want to wrap the mouse cursor within the bounds of the windo

To do this, we need to detect if the mouse is close to the window edge by some arbitrary margin. We have to use a margin because if the window is maximized when the mouse hits the edge of the screen, the operating system will not report mouse movement that would move the mouse past the bounds of the window since that would also move the cursor off-screen. [^1]

When the mouse is within the bounds, we can warp the mouse. However, the mouse position in Godot is in the viewport's coordinate system, so we have to transform it back to window pixel coordinates in order for the warp to work correctly: [^1]
Here's how you would use `DisplayServer` to warp the mouse within the bounds of the window: [^2]

```gdscript
func _unhandled_input(event: InputEvent) -> void:
if event is InputEventMouseMotion:
handle_input_mouse_motion(event as InputEventMouseMotion)
func handle_input_mouse_motion(event: InputEventMouseMotion) -> void:
var window := get_window()
var xform := get_viewport().get_final_transform()
var new_position := get_viewport().get_mouse_position() * xform + event.relative
var window := Rect2i(
DisplayServer.window_get_position(),
DisplayServer.window_get_size()
)
var new_position := DisplayServer.mouse_get_position()
const margin := 10
var warp := false
if new_position.x < margin:
if new_position.x < window.position.x + margin:
warp = true
new_position.x += window.size.x - margin
if new_position.x > window.size.x - margin:
new_position.x += window.size.x - (margin * 2)
elif new_position.x > window.end.x - margin:
warp = true
new_position.x -= window.size.x - margin
if new_position.y < margin:
new_position.x -= window.size.x - (margin * 2)
elif new_position.y < window.position.y + margin:
warp = true
new_position.y += window.size.y - margin
if new_position.y > window.size.y - margin:
new_position.y += window.size.y - (margin * 2)
elif new_position.y > window.end.y - margin:
warp = true
new_position.y -= window.size.y - margin
new_position.y -= window.size.y - (margin * 2)
if warp:
Input.warp_mouse(new_position)
DisplayServer.warp_mouse(new_position - window.position)
just_warped = true
```

[^1]: [20241029240745](../entries/20241029240745.md)
[^2]: [20241031203718](../entries/20241031203718.md)
3 changes: 2 additions & 1 deletion content/notes/no-signal.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: no signal logs
created: 2023-05-27T10:23:24Z
modified: 2024-10-27T02:44:59Z
modified: 2024-10-31T21:18:12Z
aliases:
- no signal logs
- lost contact logs
Expand All @@ -20,6 +20,7 @@ If you've been asked to playtest the game, please see the [playtesting steps](no

| date | version | notes |
|------|---------|-------|
| <span class="timestamp">2024-10-31</span> || [171520 (stream 135)](../entries/20241031171520.md)
| <span class="timestamp">2024-10-30</span> || [235124](../entries/20241030235124.md) |
| <span class="timestamp">2024-10-29</span> || [190901 (stream 134)](../entries/20241029190901.md) |
| <span class="timestamp">2024-10-28</span> || [180109 (stream 133)](../entries/20241028180109.md) |
Expand Down

0 comments on commit 0f671cd

Please sign in to comment.