Search Unity

Games Hoax News

Discussion in 'Projects In Progress' started by Kreshi, Dec 12, 2022.

  1. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    446
    Hello everyone,

    I would like to announce the development of Hoax News!
    Hoax News is a 2.5D + 3D Action Game about Conspiracy Theories.

    hoaxnewsimage2.png
    hoaxnewsimage1.png

    Download the playable teaser T0.1: https://drive.google.com/file/d/1hOMkksUscHr_eGR4gL-GKdBUCHiBECuC/view?usp=sharing

    Or play the demo directly in WebGL: https://hoax-news-game.web.app/

    Key Points:
    • Rendering Pipeline: URP
    • Unity Version: 2021 (will be moved to 2022 during development)
    • Estimated Release Date: Q2 2023
    • Target Playtime: ~2h
    • Target Framerate: > 60 FPS on avarage gaming PCs
    • Final Game Release: Steam

    Character Controller Features:
    • 2.5D + 3D Support
    • Run (WASD)
    • Walk (CTRL)
    • Jump / Double Jump (Space)
    • Dodge (Shift)
    • Melee Attack (Left Mouse Button)
    • Throw Axe Attack (Right Mouse Button)
    • Shoot Gun(s) (Middle Mouse Button)
    • Vault
    • Ledge Climbing
    • Moving Platform Support
    • Slide Down Steep Slopes Support
    • Foot IK (iStep)
    • Aim IK
    • Freeze IK
    • Lipsync

    In case this raised your interest, consider following my YouTube channel for future devlogs + more :).
    https://www.youtube.com/@hoax-games

    Best regards,
    Kreshi
     
    Last edited: Dec 27, 2022
    adamgolden likes this.
  2. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    446
    Devlog #1 has been released :).

    Check it out:


    hoaxnewsimage5.png
    hoaxnewsimage4.png
    hoaxnewsimage3.png
     
    SK_Design likes this.
  3. SK_Design

    SK_Design

    Joined:
    May 19, 2022
    Posts:
    6
    Looks cool!
     
    Kreshi likes this.
  4. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    446
    Devlog #2 which is a short one has been released today and comes with a free script!



    Progress includes:
    - Controller functionality added
    - Improved aiming with the axe
    - Improved hit detection by switching from trigger-based collisions to raytraced collision

    Free Script:

    Code (CSharp):
    1. using System;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. namespace HoaxGames
    6. {
    7.     public class RaytraceCollision : MonoBehaviour
    8.     {
    9.         [SerializeField] protected LayerMask m_raycastLayerMask;
    10.         [SerializeField] protected QueryTriggerInteraction m_raycastQueryTriggerInteraction = QueryTriggerInteraction.Ignore;
    11.         [SerializeField] protected int m_maxTraceCount = 5;
    12.         [SerializeField] protected float m_minRayDistance = 0.05f;
    13.         [SerializeField] protected bool m_useSphereCast = false;
    14.         [SerializeField] protected float m_spereCastRadius = 0.2f;
    15.         [SerializeField] protected bool m_debugDrawTrace = false;
    16.  
    17.         // subscribe to onHit with += your function to receive the corresponding hits detected by this class
    18.         public Action<HashSet<RaycastHit>> onHit;
    19.  
    20.         public class Trace
    21.         {
    22.             public Trace(Transform _transform)
    23.             {
    24.                 transform = _transform;
    25.             }
    26.  
    27.             public Transform transform;
    28.             public Queue<Vector3> tracePoints = new Queue<Vector3>();
    29.         }
    30.  
    31.         protected List<Trace> m_traces = new List<Trace>();
    32.         protected HashSet<RaycastHit> m_hits = new HashSet<RaycastHit>();
    33.         protected HashSet<Transform> m_hitTransforms = new HashSet<Transform>();
    34.  
    35.         private void Awake()
    36.         {
    37.             for (int i = 0; i < transform.childCount; i++)
    38.             {
    39.                 m_traces.Add(new Trace(transform.GetChild(i)));
    40.             }
    41.         }
    42.  
    43.         private void OnEnable()
    44.         {
    45.             m_hits.Clear();
    46.             m_hitTransforms.Clear();
    47.  
    48.             foreach (Trace trace in m_traces)
    49.             {
    50.                 while(trace.tracePoints.Count > 0)
    51.                 {
    52.                     trace.tracePoints.Dequeue();
    53.                 }
    54.             }
    55.         }
    56.  
    57.         // Start is called before the first frame update
    58.         void Start()
    59.         {
    60. #if !UNITY_EDITOR
    61.             m_debugDrawTrace = false;
    62. #endif
    63.         }
    64.  
    65.         // Update is called once per frame
    66.         void Update()
    67.         {
    68.             if (onHit != null || m_debugDrawTrace)
    69.             {
    70.                 if(m_hits.Count > 0)
    71.                 {
    72.                     m_hits.Clear();
    73.                     m_hitTransforms.Clear();
    74.                 }
    75.  
    76.                 foreach (Trace trace in m_traces)
    77.                 {
    78.                     trace.tracePoints.Enqueue(trace.transform.position);
    79.                     if (trace.tracePoints.Count > m_maxTraceCount) trace.tracePoints.Dequeue();
    80.  
    81.                     computeHitsFromTrace(trace);
    82.                 }
    83.  
    84.                 if (onHit != null) onHit(m_hits);
    85.             }
    86.         }
    87.  
    88.         void computeHitsFromTrace(Trace trace)
    89.         {
    90.             Vector3 startPos = Vector3.zero;
    91.             bool isInitialized = false;
    92.             foreach (Vector3 currPos in trace.tracePoints)
    93.             {
    94.                 if (isInitialized == false)
    95.                 {
    96.                     startPos = currPos;
    97.                     isInitialized = true;
    98.                     continue;
    99.                 }
    100.  
    101.                 Vector3 distVec = currPos - startPos;
    102.                 if (distVec.magnitude < m_minRayDistance) continue;
    103.  
    104. #if UNITY_EDITOR
    105.                 if (m_debugDrawTrace) Debug.DrawLine(startPos, currPos, Color.yellow);
    106. #endif
    107.  
    108.                 RaycastHit[] hits;
    109.                 if (m_useSphereCast == false)
    110.                 {
    111.                     Ray ray = new Ray(startPos, distVec.normalized);
    112.                     hits = Physics.RaycastAll(ray, distVec.magnitude, m_raycastLayerMask, m_raycastQueryTriggerInteraction);
    113.                 }
    114.                 else
    115.                 {
    116.                     Ray ray = new Ray(startPos - distVec.normalized * m_spereCastRadius, distVec.normalized);
    117.                     hits = Physics.SphereCastAll(ray, m_spereCastRadius, distVec.magnitude, m_raycastLayerMask, m_raycastQueryTriggerInteraction);
    118.                 }
    119.  
    120.                 foreach (RaycastHit hit in hits)
    121.                 {
    122.                     if (hit.transform == null) continue;
    123.                     if (m_hitTransforms.Contains(hit.transform) == false)
    124.                     {
    125.                         m_hits.Add(hit);
    126.                         m_hitTransforms.Add(hit.transform);
    127.                     }
    128.                 }
    129.  
    130.                 startPos = currPos;
    131.             }
    132.         }
    133.     }
    134. }
    135.