Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Joshulties

7
Posts
33
Followers
45
Following
A member registered Jul 21, 2019 · View creator page →

Creator of

Recent community posts

Hello and thank you, Scel! So Oneirality is developed in Godot 3, but the bouncing bullet shells can work in Godot 4. 

Essentially, each bullet casing is a KinematicBody2D (CharacterBody2D for G4) so that it makes use of that node's physics collisions. The casings run a function in the _physics_process that will move the casing downward if its global_position.y value is not less than bound, otherwise it will multiply its velocity by -0.75 so that it bounces up and multiplies velocity.x by 0.5 so it slows down horizontally. It also runs a check to see if its velocity is below a certain threshold to tell it to set_physics_process to false. There are other functions used, but for the main bouncing, this is it. I'll paste some of the code below:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export (float) var bound = 0.0
export (int) var bound_rand = 4
export (int) var motion_rand = 150
export (float) var bound_stop = 0.75

var motion: Vector2 = Vector2(0, -200)  # When instanced, the casing will move upward already. For G4, you can put this in the _ready function.

func _instantiate():
    if not bound_rand == 0:
        bound += (randi() % bound_rand + (bound_rand / 2))
    motion.x += (randi() % motion_rand - (motion_rand / 2))
    motion.y += (randi() % (motion_rand / 2))

func apply_bound(_delta):
    # Should Fall
    if global_position.y < bound:
        motion = motion.move_toward(Vector2(motion.x, motion.y + 10.0), 10.0)
    # Should bounce
    else:
        motion.y = -0.75 * motion.y
        global_position.y -= 0.1
        motion.x = 0.5 * motion.x
        emit_signal("bound_contact")
    
    # Stop physics to prevent performance issues
    if motion.length() < bound_stop:
        set_physics_process(false)
        _bounce_stop()  # This just rounds the casings global_position to be pixel perfect
        emit_signal("bounce_stop")
    
    motion = move_and_slide(motion)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hope this helps!

Hello DOSMan Games. I don't have a business email for any inquiries at the moment, and my current focus is development along with other personal responsibilities. Any business-related aspects I plan to focus on later.

Thank you for your interest!

Glad to see you enjoy it!

I'll be sure to implement a UI element that shows if the lamp is on or not.

Hey, I'm so sorry to hear that. The second level is where the player is first able to receive the revolver; it is on the table. From that level onwards, other weapons can be found.


Thank you for your feedback. I'll be sure to make it so enemies drop their guns instead of ammo in the future.

I was there lmao

Thank you! About the wall textures, there was, but with the way the tilemap and player vision cone was set up, it was creating shadows over the buildings where the player's vision collided with a wall. It was one of those things that I was unable to find a solution for in time.

Thanks for playing it! I've now uploaded a v1.0.1 that places the player at the entrance of the shop after death.