itch.io is community of indie game creators and players

Devlogs

dev log 2

painting game
A browser game made in HTML5

some lads and i have agreed to do a [game jam](https://itch.io/jam/7dfps) where we each work on our own game. 

STUFF TO DO:

- make/hang paintings in intro scene `need nailgun`

- green button

- make 3 levels `made 15`

- tune painting validation system

---

particle for sticking? `maybe not`

---

make jump animation

---

BUGS

- paitnings get thrown through walls `mostly fixed`

- scale the stamps `done`

- mouse gets stuck on html (probably due to pausing) `somewhat fixed`

- mirror `fixed`

MAKE A FONT:

https://fontstruct.com/

---

TUNE PAINTING VALIDATION SYSTEM

---

better:

ABILITY TO SAVE

---

done

saves carryable paintings' position and rotation that fall off the wall in the room

ABILITY TO HANG PAINTINGS ON THE WALL

---

Make Nailgun

done

add wood floor

done `why?` sidequest (more ghetto)

`note` to remove gun from studio. i dont want it to be that ghetto

Mirror Status:

FIXED

i have to place it this far away from the wall otherwise the camera that is projecting the mirrors view onto the surface of the mirror will intercept sunlight from the other side of the wall. it causes the mirror to show 2 sunlights when it passes through the wall. 

give me godot mirror code for all

```

func _process(_delta):

if player_camera:

# Get the mirror's plane (assuming the mirror faces along its local Z-axis)

var mirror_normal = global_transform.basis.y.normalized()

var mirror_position = global_transform.origin

# Calculate the reflected camera position

var player_cam_pos = player_camera.global_transform.origin

var distance_to_mirror = mirror_normal.dot(player_cam_pos - mirror_position)

var reflected_pos = player_cam_pos - 2.0 * distance_to_mirror * mirror_normal

# Clamp the mirror camera to NEVER go behind the mirror surface

# This prevents the camera from clipping through walls behind the mirror

# which causes the sun (DirectionalLight) to render from the wrong side

var distance_behind_mirror = mirror_normal.dot(mirror_position - reflected_pos)

if distance_behind_mirror > 0:

# Keep camera exactly at the mirror surface, don't go behind at all

reflected_pos = mirror_position

# Set the mirror camera's position

mirror_camera.global_transform.origin = reflected_pos

# Calculate the reflected camera orientation using quaternion-based basis reflection

# This avoids gimbal lock by reflecting all three basis vectors across the mirror plane

var player_basis = player_camera.global_transform.basis

# Reflect ALL three basis vectors across the mirror plane

var reflected_basis = Basis(

player_basis.x.reflect(mirror_normal),   # Right vector

player_basis.y.reflect(mirror_normal),   # Up vector

-player_basis.z.reflect(mirror_normal)   # Forward vector (negated to face mirror)

)

# Normalize to prevent floating point drift

reflected_basis = reflected_basis.orthonormalized()

# Create the complete reflected transform (absolute rotation, no gimbal lock)

var reflected_transform = Transform3D(reflected_basis, reflected_pos)

mirror_camera.global_transform = reflected_transform

# Mirror camera properties for accurate reflection

mirror_camera.fov = player_camera.fov

```

that took a while to get right. and you might need to funk with it depending on how its rotated in your scene. 

the title screen is coming along. 

this sitting animation was done by hand in blender, using the video as a reference

oh yeah. i also spend a night and morning adding a gun so that i could hang with my friend making a cool shooter. 

this idea will evolve into the nailgun. 

scaling shapes is sick

Files

  • game18.zip 83 MB
    7 days ago
  • game19.zip 90 MB
    2 days ago
  • game20.zip 91 MB
    17 hours ago
Download painting game
Leave a comment