포트폴리오/팀 프로젝트

[팀 프로젝트] Ancient City : Pottery

이름?없음 2024. 4. 29. 17:35
728x90

 

반응형

Hitpoints & History 2024 Game Jam 3등

 

깃허브 : https://github.com/dkdkdsa/Ancient-City-Pottery

 

GitHub - dkdkdsa/Ancient-City-Pottery

Contribute to dkdkdsa/Ancient-City-Pottery development by creating an account on GitHub.

github.com

itch.io(게임) : https://aaing.itch.io/ancient-city-pottery

 

Ancient City : Pottery by aaing, imNSwer, leewnstj, JangWheesung

-WASD to move- No big deal! Roll the jar to the destination! Keep going, Don't drop it. It's hard? Well, you lack patience! Hitpoints & History 2024 Ancient City : Pottery is a game developed by four Korean students in 48 hours. In the case of English, th

aaing.itch.io

itch.io(대회) : https://itch.io/jam/hitpointscon

 

Hitpoints & History 2024 Game Jam: Create An Ancient World Game!

A game jam from 2024-02-03 to 2024-02-11 hosted by hitpointsandhistory & Marrensmusings. Welcome to the Hitpoints & History Game Jam! Hitpoints & History is a virtual archaeogaming conference held March 9-10. The Hitpoints & History game j...

itch.io

 

1. 개요

설명 : Hitpoints & History 2024 Game Jam에 참여한 프로젝트입니다. 4명의 팀원이 2일간 개발하였고 대회에서 3등이라는 성적을 얻을 수 있었습니다.

 

기획의도 : 고대 도시란 주제에서 항아리가 굴러가면 재미있겠다 라고 생각하여 개발하게되었다.

 

개발 전 구상 : 고대 도시에서 장애물을 피하여 움직이는 항아리

고대 도시를 잘 표현한 맵

 

2. 구현

플레이어

Rigidbody를 사용하여 플레이어의 움직임과 떨어지면 부숴지는것을 구현하였다

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController : MonoBehaviour
{

    [SerializeField] private float moveSpeed;
    [SerializeField] private AudioSource source;

    private Rigidbody rigid;
    private ContactSencer sencer;
    private bool isPlaying;

    private void Awake()
    {
        
        rigid = GetComponent<Rigidbody>();
        sencer = GetComponentInChildren<ContactSencer>();

    }

    private void FixedUpdate()
    {

        Move();

    }

    private void Update()
    {

        ControlSound();

    }

    private void ControlSound()
    {

        var inputDir = new Vector3(Input.GetAxisRaw("Vertical"), 0, -Input.GetAxis("Horizontal")).normalized;

        if (!isPlaying && inputDir != Vector3.zero && sencer.IsContacted)
        {

            source.Play();
            source.loop = true;
            isPlaying = true;

        }
        else if (isPlaying && (inputDir == Vector3.zero || !sencer.IsContacted))
        {

            source.loop = false;
            isPlaying = false;

        }


    }

    private void Move()
    {

        var rot = Camera.main.transform.rotation;
        rot.x = 0;

        var inputDir = new Vector3(Input.GetAxisRaw("Vertical"), 0, -Input.GetAxis("Horizontal")).normalized;
        var curDir = rot * inputDir;

        if (!sencer.IsContacted && inputDir != Vector3.zero)
        {

            rigid.AddForce(new Vector3(curDir.x / 2, 0, curDir.z / 2), ForceMode.Acceleration);
            return;

        }

        if (inputDir == Vector3.zero) return;


        rigid.AddTorque(curDir * moveSpeed, ForceMode.Acceleration);

    }

}

 

최적화

MeshBacker와 Lightmapping을 이용하여 그래픽 최적화 작업을 진행하였다

 

3. 프로젝트로 느낀점

2일간 개발한 프로젝트이다 보니 코드를 많이 작성하지 못한것이 아쉬웠다

728x90