Closed h0lybyte closed 8 months 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.
I will create a /NPC/ folder and split the scripts in there, following a basic naming convention like:
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.
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.
Next NPC Update:
Decide to migrate all of the NPC/Player functionality to the Entity.cs
and then call it from there.
caching the Main camera into the Entity class as well ~
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.
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,
};
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.
The JWT structure for the login/register/player is currently set like this:
sub
(Subject): The subject of the token, typically the user identifier.iat
(Issued At): The timestamp when the token was issued.exp
(Expiration Time): The timestamp when the token will expire.aud
(Audience): Specifies the intended recipients of the token.iss
- (Issuer): Identifies the issuer of the token.jti
- (JWT ID): A unique identifier for the token, used to prevent token replay attacks.nbf
- (Not Before): Defines a time before which the JWT must not be accepted for processing.scp
- (Scope): Defines the permissions granted to the user.Small note for my reference
Future references for the vector images.
Vector3 for the Player -> new Vector3(0, 2f, 0),
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;
}
}
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)
};
});
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.
Started to split up the Events from the Entity, to make it easier to organize and integrate the codebase.
This ticket can be closed out as well
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
Video
Repo
Additional information Add any other context or examples of this concept here.
I will provide any additional information here.