Nophys - an Experimental Project

Of course, I would too.

Persona 5 though would put this secondary to the story and action bits. I immediately thought of a small game where the player has to conduct the pedestrian traffic somehow. Perhaps they control the crosswalks or barrier controls. When two intersect they could fall over and get injured. Perhaps a busy hospital ward or a college campus, or a shopping centre. A sort of “Crowd Control” game. You often get them for cars and intersections with traffic lights. Something like that.

Anyway, good luck with it. I hope it keeps going well for you.

1 Like

Oh, you mean using the crowd for core gameplay. What I’m experimenting with the crowds is not that flexible and you can’t even interact with it :sweat_smile:

Definitely a fun game ideas. Made me thinking on how to make that kind of gameplay.

and thank you!

1 Like

Update 008 - Faded


I Should post this earlier since it just short/minor update to the crowd visual/shader. Also added back third person controller to see how well walking through the crowds.


The each crowd instance has a shader that take a player position and check for distance, then fade if it too close.


The crowds also will fade if it too close to the camera so it does not clip


The crowds move/follow its own path which has start and end point. With that both position, using the same concept as before, the crowd will fade when distance is below certain value resulting smooth fade in at start point and fade out at end point.

Visual

I Know I said that, but am still experimenting with the visual style and it might change a lot. It also need to be consistent with other assets and all. I’ll stumble a lot in this department. I mean every part of game development :gdsweat:

2 Likes

Update 009 - Minimap


Minimap is where you can see the overview of the map that populate icons for object/place of interest. This not a disscussion whether minimap is good/bad :gdsweat:, but an update on its implementation which cover basic visual and functionality.

In godot, I think the common way is to use Subviewport with orthogonal camera viewed from above. This make sense and give a good visual too but for now, basic implementation is preferred which using CanvasItem and draw polygon on it using (vertices and indices) data from NavigationMesh that I already have for each map. Currently it have 2 modes which are minimap at bottom corner and maximized at center with a bit of transparency.

The green arrow indicate the player position and its mesh rotation while the map itself rotates based on the camera view, so upward/top direction is where you always looking at. But it can be distracting or odd, so I implement the static version.


The yellow triangle indicate the cone view of the camera instead. It does not reflect exactly the frustrum of the camera, only to show the direction which the camera facing. Then I tried to shove some breadcrumb/trail feature aswell.


The yellow dot is drawn at player position, then the next dot drawn after a certain distance compared to the previous one. When a fifth dot is drawn the last dot will start to fade out using Tween.

Transition & Map Change

“Map” in this project is a space/scene where you can traverse around without any transition. Thus, changing map require transtion as I need to clear all the meshes and render a new one. It can be as simple as fade to black/white/any_color screen.


This one is a shader that was applied to a CanvasItem and played using Tween with tween_method() or tween_property(). The load time is fast since there’s not much resources need to be loaded currently so I did not yet learn to use thread.

Lets be reminded that the project is an experiment of making 3d game without using dedicated physics engine. So instead of Area3d for detecting whether player is in_range/inside_area to interact (in this case, to change map), I check the player postion distance using Geometry2D.is_point_in_circle. To avoid the check for every frame this if statement can be used to only run for n interval of frame:

func _physics_process(delta: float) -> void:
    if Engine.get_physics_frames() % n == 0:
        return Geometry2D.is_point_in_circle(...)

Geometry2D has other method to check with triangle or polygon which give you many other option on how to implement it. AABB also can be used for fast overlap tests with methods intersects*().

Here’s all for the updates in one video :gdsweat:

Update 010 - Year One


It have been a year since the first post in this thread :gdparty: Progress is slow, but I’m glad that it’s not being abandoned by yours truly.

Animation (on Slope/Stairs)


Added two temp animation (ascend & descend) for slope/stairs. I checked the player position of y-value, compared it to previous frame, then changed the animation (with blend value) according to the return value.

Joypad

Messing around with joypad in Godot at some point and decide to test it now before it become to much pains to be implemented at later stage of development. Its not a complete implementation, but only basics just enough to make it usable.

The joypad being detected by Godot just fine. Then, the code for player and camera movement need to be adapted for joypad input. Inside _unhandled_input function, analog stick input can be measured through InputEventJoypadMotion event while button pressed can be detected through InputEventJoypadMotion.

Axis value was introduced when using analog stick which provide a value from zero/deadzone to one. For now, any value under 1.0 was clamped to 0.5 which paired with walk animation and lower speed value while at 1.0, the player will change to run animation and have higher movement speed.

That was configued only on flat plane, so movement on slope/stairs stays the same regardless the axis value from the analog stick.

For a keyboard & mouse, the input value can only be zero or one, so the animation will blend to run animation straight from idle animation since there’s also no acceleration/deceleration being implemented at current state.

func _unhandled_input(event: InputEvent) -> void:
    if event is InputEventKey or event is InputEventJoypadButton:    
        # ... logic etc.

Not sure how most dev will handled it, but this will check both input at any input event.


Very hacky for now, but I did also implement showing input hint corresponding to latest input device. Show ‘E’ if detect keyboard & mouse input while show ‘A’ instead if joypad input is detected.

Camera


Some code refactoring (previous method seems to not behave like intended) and implement some features:

  • Reset the camera view to where the player mesh is facing.
  • Reset the camera and rotate its view backward.
  • Change the camera pivot point, either left or right.


Hope for another year of developement :godot:

2 Likes

Ideally, the steps should align with the stair treads. How is that done here? Do you have to adjust the treads to fit the existing step? And if the character’s size (and consequently the size of their feet) changes, what happens?

1 Like

That would be ideal, but what I’m doing is just a simple animation change when there’s slope/stair, faking it to look like the character is stepping on the treads, so I’m not expecting the steps to align with it. I will do some adjustmest to make it close enough and having a standard stair size which can be use as a reference when making animations for it.

I think using IK would be the way to go if the ideal is desired.

I think what would change is the character animations to compensate their size e.g. child which have small feet and short leg need to raise their leg more compared to an adult. I assume you asking this since you want to have a character creation which can range from child to adult.

1 Like