I am a technical game designer with experience delivering published games.
Equinoxe, 2024
Anima, 2024
A team of scripters taken from the level design students, some with prior programming experience, used the skills we learned in the preceding months to write most of the gameplay code in C#. Some wrote scripts full time like me, others part-time as they also designed a level. Technical artists and animation students made it all look pretty. The covid-19 pandemic broke out while we were in pre-production and with the heroic effort of our teaching staff we adapted to a fully remote work environment with only a week of production time lost to setting things up.
public bool IsInZone(Vector3 destination)
{
if (nbZones == 0)
return true;
inZone = false;
for (int i = 0; i < nbZones; i++)
{
if (destination == myPatrolColliders[i].ClosestPoint(destination))
{
inZone = true;
break;
}
}
return inZone;
}
int cpt = 0;
increaseRange = !runAway;
while (!IsInZone(destination))
{
cpt++;
searchingAngle += searchAngle * leftRight;
direction = Quaternion.AngleAxis(searchingAngle, Vector3.up) * direction;
destination = tr.position + direction * patrolingRange;
if (!runAway && searchingAngle % 360 == 0)
{
if (increaseRange)
patrolingRange *= 1.25f;
else
patrolingRange *= 0.75f;
}
else if (runAway && (searchingAngle >= 45 || searchingAngle <= -45))
{
leftRight *= -1;
if (increaseRange)
patrolingRange *= 1.25f;
else
patrolingRange *= 0.75f;
}
if (patrolingRange > 40f)//40 was the draw range at the time.
{
patrolingRange = patrolRange;
increaseRange = false;
}
if (patrolingRange < 1f)
{
destination = tr.position;
break;
}
if (cpt > 9999)//duct tape to ward off infinite loops
{
if (IsInZone(destination))
break;
else
{
destination = startPosition;
break;
}
}
return destination;
}

Protocole Hedera, 2023