emirthab / fairy-tale

Fairy Tale is a godot demo game project where a main character with basic player movements and 3 different combat mechanics fights against mushroom-type test enemies in an open world surrounded by mountains and trees.
MIT License
8 stars 2 forks source link
game-development godot-engine rpg

Fairy Tale Fairy Tale

Introduction:

Features:

:large_blue_circle: Enemies:

:large_blue_circle: Player Movement:

:large_blue_circle: Autofocus On The Enemy:

:large_blue_circle: Attack Power System:

:large_blue_circle: Billboard Health Bar For Enemies:

:large_blue_circle: Lod System:

:large_blue_circle: Blur And Dark Screen When Character Dies:

#on "assests/script/death.gd" :
func death_envs(delta):
    if env.dof_blur_far_amount < death_env_blur_amount:
        env.dof_blur_far_amount += delta * 0.01
    if env.adjustment_saturation > death_env_saturation:
        env.adjustment_saturation -= delta * 0.6
    if env.adjustment_brightness > death_env_brightness:
        env.adjustment_brightness -=  delta * 0.1

:large_blue_circle: Attack Sounds And Game Music

:large_blue_circle: Smooth Camera Mechanics (interpolated):

#on "assests/script/player_movement.gd" :
    if event is InputEventMouseMotion && Input.get_mouse_mode() != 0 and $ui.game:
        var resultant = sqrt((event.relative.x * event.relative.x )+ (event.relative.y * event.relative.y ))
        var rot = Vector3(-event.relative.y,-event.relative.x,0).normalized()
        puppet_pivot.rotate_object_local(rot , resultant * mouse_sensivity)
        puppet_pivot.rotation.z = clamp(puppet_pivot.rotation.z,deg2rad(-0),deg2rad(0))
        puppet_pivot.rotation.x = clamp(puppet_pivot.rotation.x,deg2rad(-30),deg2rad(30))

func _physics_process(delta):
    if $ui.game:
        #pivot.rotation.z = lerp_angle(pivot.rotation.z, puppet_pivot.rotation.z ,delta * 10)
        pivot.rotation.x = lerp_angle(pivot.rotation.x, puppet_pivot.rotation.x ,delta * 10)
        pivot.rotation.y = lerp_angle(pivot.rotation.y, puppet_pivot.rotation.y ,delta * 10)
        #pivot.rotation = pivot.rotation.linear_interpolate(puppet_pivot.rotation,delta * 10)
        pivot.global_transform.origin = pivot.global_transform.origin.linear_interpolate(character.get_node("RemotePivot").global_transform.origin,delta *2)

:large_blue_circle: Combat Mechanics like Dark Souls

And more in Fairy Tale...

Thanks!:

https://github.com/Zylann/godot_scatter_plugin
https://github.com/Zylann/godot_heightmap_plugin
https://github.com/Arnklit/Waterways