KBVE / kbve

KBVE Monorepo
https://kbve.com/
12 stars 12 forks source link

[App] : [Saber] : Entity Namespace #212

Closed h0lybyte closed 8 months ago

h0lybyte commented 1 year ago

Core Concept/Theory A clear and concise description of what the concept is. Ex. It would be cool if [...]

This ticket is for theory crafting the way we want to render NPCs in our game, I was thinking that we do something similar to the way Paper Mario does it. We would be basically rendering 2D Sprites in a 3D environment.

I will close this issue ticket out once we have a couple examples rendered in a scene or two.


Alternative Ideas Is there any other way this concept could be used?

We could generate additional abstract 2D Sprites based upon the ones that we supply it.


Alternative Examples/Sources Are there any other references that you can provide?

Example 1

Example 2

Additional information Add any other context or examples of this concept here.

I will provide any additional information here.

h0lybyte commented 1 year ago

Added Cinemachine to the Unity's Packaging. I believe we should use it for the camera perspective, for the time being, we can always swap it out for another camera system as we build it out.

h0lybyte commented 1 year ago

I will create a /NPC/ folder and split the scripts in there, following a basic naming convention like:

h0lybyte commented 1 year ago

Cleaning up the ghost NPC and migrating the abilities into an abstracted class!

I might get a bit creative and add a couple of side easter eggs while I am building it out.

h0lybyte commented 1 year ago

The "AI" / Combat scripting for the NPC might have to be customized at the Prefab level with overrides. I will update this ticket if I change anything outside just generic range attack, melee and spell.

h0lybyte commented 1 year ago

Next NPC Update:

h0lybyte commented 1 year ago

Decide to migrate all of the NPC/Player functionality to the Entity.cs and then call it from there.

h0lybyte commented 1 year ago

caching the Main camera into the Entity class as well ~

h0lybyte commented 1 year ago

Going to add a debug option inside the Entity.cs , which we can turn on / off, to avoid the Debug Error spam for general objects that get added onto the map.

h0lybyte commented 11 months ago

Migrating some of the backend for the player saving out into different routes.

Removed a decent amount of Rust code from the main.rs and moved it over to the playerdb.

Calling the Models


use kbve::models::{ User, Profile };

use kbve::schema::users::dsl::{ users, username as users_username, id as user_uuid };
use kbve::schema::profile::dsl::{
    profile as profiles,
    uuid as profiles_uuid,  
    };
h0lybyte commented 11 months ago

The current issue right now is the CORS layer and having it accept data from itch.io, specifically the kbve.itch.io.

So that they can log in via the browser.

h0lybyte commented 11 months ago

The JWT structure for the login/register/player is currently set like this:

Small note for my reference

h0lybyte commented 11 months ago

Future references for the vector images.

Vector3 for the Player -> new Vector3(0, 2f, 0),

h0lybyte commented 11 months ago

Removed the Raycasting because it was giving me issues.


    // Dynamic Forward Vector
     Vector3 customForward = new Vector3(transform.forward.x, 0, transform.forward.z).normalized;
     Vector3 reverseForward = -customForward;

     Vector3 rayOrigin = transform.position + new Vector3(0, 0.1f, 0); // Slight upward offset
     Ray ray = new Ray(rayOrigin, reverseForward);
     Debug.DrawLine(rayOrigin, rayOrigin + reverseForward * NaturalInstinct, Color.red, 1.0f);

     if (Physics.SphereCast(ray, radius, out RaycastHit hit, NaturalInstinct, PlayerLayer))
     {
       if (hit.collider.gameObject == Target)
       {
         Debug.Log("[Radar] -> Target Found");
         return true;
       }
     }
h0lybyte commented 11 months ago

Adding the currency for the player.

Currently looking at designing the tables for it.


 export const igbc = mysqlTable('igbc', {
    id: serial('id').primaryKey().notNull(),
    uuid: bigint('uuid', { mode:'number', unsigned: true}).notNull(),
    created_at: timestamp('created_at', { mode: 'string' })
        .notNull()
        .defaultNow(),

 }, (table) => {
    return {
        uuid_idx: uniqueIndex("uuid_idx").on(table.uuid)
    };
 });
h0lybyte commented 11 months ago

There is a data race issue that I noticed and the library that I am looking into is called Rayon, https://docs.rs/rayon/latest/rayon/

Maybe it might be able to help? I am not too sure.

h0lybyte commented 9 months ago

Started to split up the Events from the Entity, to make it easier to organize and integrate the codebase.

h0lybyte commented 9 months ago
h0lybyte commented 8 months ago

This ticket can be closed out as well