Hi! this is Langxuan He! And you can call me Harry.I'll be gradeted from CMUETC on May 2024 and I'm look for Game Designer/Level Designer Job.I have 3-year experience in Game Design and Level Design. I have background in ComputerScience, so I'm also good at scripting
Introduction: It is a 3-month coop project between ETC and Game For Change 2023. Create a transformational XR experience for the Games for Change festival held in New York City.
I am a gameplay programmer and a level designer in this project
Finish Date: May 2023
Video Demo
Game Overview
It’s a flying simulation experience. Player will act as a songbird who is on a migration path starting from south to north. Because of the light pollution, player need to avoid those harmful light to not get disoriented in the game
Keywords: Flying Simulation, Story Telling
Automatic flying system using Bezier Curve
Basic Approach
This project requires player to have a certain moving path throughout the experience, to simulate the reality bird migration path, I think using Bezier Curve to simulate the path is a good choice. I use the fomular of 5-point bezier curve to create the curve, because more control points can make curve more variant.
void AComputerBezier::Tick(float DeltaTime){ Super::Tick(DeltaTime);
if(controlPts.IsEmpty())return;
int ptStartIdx = ptSet_idx * 4;
int numOfControlPts = GetNumOfControlPtsRemain(ptStartIdx);
//get num of control points in front
//there are enough number of control points and it is valid to insert new control point, so insert new set of control point
if(numOfControlPts >= 5){ computeSet.Empty();
for(int j = ptStartIdx; j < ptStartIdx + 5;j++){ computeSet.Add(controlPts[j]->GetActorLocation());
}}elseif(numOfControlPts < 5){// it means there is not enough control point in front, so just stop
if(!for_test){ reach_end_set = true;
}else{ ptSet_idx = 0;
}}if(!reach_end_set){// if current is not the end set keep calculate Bezier Curve point
ComputeBezierCurvePoint();
}if(t >= 1){ t = 0;
ptSet_idx += 1;
can_insert_new_pts = true;
}}
Resolve the sharp turnning point between two curve
During the development , we found the if the gradient of the end of first curve and start of second curve is different, it will cause the “sharp turnning point”(shown as below), which will let player feel a sudden pause / turn at these edge points .To solve the sharp turning point issue, I try with a method to smooth it.
My approach is create a smoothing curve which will sampling five new control points from for example curve C1 and curve C2. They are p2’ , p3 , p4 , p5 and p6’. The new points can create a “smoothing curve” (The purple curve).
Then a blending attribute alpha is introduced to do the smoothing using follwing fomula :
, Then we can smoothly blend two single Bezier Curves.