Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preparing Alpha Branch #3359

Merged
merged 11 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion apps/kbve.com/src/content/journal/11-24.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,31 @@ import { Adsense, Tasks } from '@kbve/astropad';
**Scenes**

Looks like when I updated the TopDownEngine, it replaced the scene order, so we will have to go back around and update it.
I believe that in the next round, we should start looking into removing some of the older assets that are getting imported.
I believe that in the next round, we should start looking into removing some of the older assets that are getting imported.

- 03:05PM

**VContainer**

Trying to get a better understanding of how we would build that global map and there are a couple things that I will need to understand.
In order to make the multiplayer easier, we will need to find a way to let the rust code that the live server sends back actually execute certain functions within the unity client.
The idea here would be to allow the unity runtime to run some of the game logic based upon what the live server says, this way we can sync the data across a session?
That means the rust server would be handling a decent amount of the actual game and the unity client / runtime would be designed to just handle the rendering and client-side logic?
Damn this would change the way that we handle this game, hmm, there would be a decent amount of thinking that we would have to do.

- 03:19PM

**Addressables**

Okay the best way we can work on this project but without having to keep going back to the editor might be by placing all the prefabs as addressable objects?
Then inside of the code, we can just call them dynamically and use them for the different parts of the scene?
This would further move unity into a `shell` position and we can basically write our own logic around the shell?
Explaining this would be tough, so maybe the best way to approach this would be by creating our own version around it.

- 11:50PM

**LifetimeScope**

The last part of learning will be focused upon the lifetime scopes.
I am starting to get a better picture of how all of this would connect and I believe that I can make it work a bit better.
Granted that making the optimizations before finishing up the game is always risky, but I think it will actually make it easier to maintain the whole game.
22 changes: 22 additions & 0 deletions apps/kbve.com/src/content/journal/11-25.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: 'November: 25th'
category: Daily
date: 2024-11-25 12:00:00
client: Self
unsplash: 1541320779116-ec4a3d4692bc
img: https://images.unsplash.com/photo-1541320779116-ec4a3d4692bc?crop=entropy&cs=srgb&fm=jpg&ixid=MnwzNjM5Nzd8MHwxfHJhbmRvbXx8fHx8fHx8fDE2ODE3NDg2ODY&ixlib=rb-4.0.3&q=85
description: November 25th.
tags:
- daily
---

import { Adsense, Tasks } from '@kbve/astropad';

## 2024

- 12:29AM

**VContainers**

Going to continue learning more about the containers and maybe get the first batch finished.
If we can get the exisiting MM components to load under the VContainer, then it will make extending and gameplay so much easier.
24 changes: 24 additions & 0 deletions apps/rust_rareicon_gameserver/build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RareIcon</title>
<style>
html, body {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}
iframe {
border: none;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<iframe src="https://1308198462155653180.discordsays.com/.proxy/nested" scrolling="no"></iframe>
</body>
</html>
4 changes: 2 additions & 2 deletions packages/kilonet/kilonet/KiloGlobalCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static KiloGlobalCore Instance
}
}

public GameManager Manager { get; private set; }
public KBVEGameManager Manager { get; private set; }

private void Awake()
{
Expand All @@ -47,7 +47,7 @@ private void InitializeKiloGlobalCore()

if (Manager == null)
{
Manager = GameManager.Instance;
Manager = KBVEGameManager.Instance;
// No need to call InitializeKiloManager as GameManager handles its own initialization in Awake
}
}
Expand Down
3 changes: 2 additions & 1 deletion packages/mmextensions/Kbve.MMExtensions.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"Unity.Collections",
"MoreMountains.Tools",
"MoreMountains.TopDownEngine",
"VContainer"
"VContainer",
"KBVE.Kilonet"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
45 changes: 45 additions & 0 deletions packages/mmextensions/mmextensions/Shaco/GameLifetimeScope.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using UnityEngine;
using VContainer;
using VContainer.Unity;
using KBVE.Kilonet;

namespace KBVE.MMExtensions.Shaco
{
public class GameLifetimeScope : LifetimeScope
{
[SerializeField]
private GameObject localPlayerPrefab;

[SerializeField]
private GameObject remotePlayerPrefab;

protected override void Configure(IContainerBuilder builder)
{
// Register GameManager

builder
.RegisterComponentInHierarchy<GameManager>()
.OnInitialized(
(resolver, gameManager) =>
{
gameManager.TargetFrameRate = 300;
gameManager.MaximumLives = 0;
gameManager.CurrentLives = 0;
gameManager.GameOverScene = "Title";
gameManager.PauseGameWhenInventoryOpens = false;
}
);




// builder.Register<NetworkManager>(Lifetime.Singleton);
// builder.Register<PlayerManager>(Lifetime.Singleton);

// builder.Register<LevelManager>(Lifetime.Singleton).WithParameter(localPlayerPrefab);
// builder.Register<MultiplayerManager>(Lifetime.Singleton).WithParameter(remotePlayerPrefab);

// builder.Register<PlayerPool>(Lifetime.Singleton).WithParameter(remotePlayerPrefab);
}
}
}
11 changes: 11 additions & 0 deletions packages/mmextensions/mmextensions/Shaco/GameLifetimeScope.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading