Skip to content

Commit

Permalink
Merge pull request #3380 from KBVE/beta
Browse files Browse the repository at this point in the history
Preparing Release Branch
  • Loading branch information
h0lybyte authored Nov 26, 2024
2 parents bdd7121 + 18e3c34 commit 78774fc
Show file tree
Hide file tree
Showing 18 changed files with 335 additions and 19 deletions.
37 changes: 36 additions & 1 deletion apps/kbve.com/src/content/journal/11-24.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,39 @@ import { Adsense, Tasks } from '@kbve/astropad';
**BlueSky**

What is this social media hype about?
I am thinking that is a decentralized social media site but what is it really about?
I am thinking that is a decentralized social media site but what is it really about?


- 02:50PM

**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.

- 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.
37 changes: 37 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,37 @@
---
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.

- 12:32PM

**Helm**

Time to work out the helm chart!
We want this helm chart deployment to be easy but also useful, I believe the websockets will be a breeze but the UDP might be an issue.
Thanks to Fudster, we were able to move past my insecurities and resolve the issue.
He is a great leader and knows how to get things done.

- 04:30PM

**Unity**

Updating the unity game and fixing the missing scenes from the game, almost as if ... uhh... I forgot to include the actual game.
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 migrations/kube/charts/rareicon/fleet.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defaultNamespace: rareicon
helm:
chart: ./shipyard
chart: ./gameserver
releaseName: rareicon-release
valuesFiles:
- shipyard/values.yaml
- gameserver/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: rareicon-gameserver
namespace: rareicon
labels:
app: rareicon
spec:
replicas: {{ .Values.gameserver.replicaCount }}
selector:
matchLabels:
app: rareicon
tier: gameserver
template:
metadata:
labels:
app: rareicon
tier: gameserver
spec:
containers:
- name: gameserver
image: "{{ .Values.gameserver.image.repository }}:{{ .Values.gameserver.image.tag }}"
ports:
{{- range .Values.gameserver.service.ports }}
- name: {{ .name }}
containerPort: {{ .targetPort }}
protocol: {{ .protocol }}
{{- end }}
resources:
{{- toYaml .Values.gameserver.resources | nindent 12 }}

---

# Service (TCP and UDP)
apiVersion: v1
kind: Service
metadata:
name: rareicon-service
namespace: rareicon
labels:
app: rareicon
spec:
selector:
app: rareicon
ports:
{{- range .Values.gameserver.service.ports }}
- name: {{ .name }}
protocol: {{ .protocol }}
port: {{ .port }}
targetPort: {{ .targetPort }}
{{- end }}
type: ClusterIP

---

# WebSocket Ingress - TODO: Values
{{- if .Values.gameserver.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: rareicon-ingress
namespace: rareicon
annotations:
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
spec:
rules:
- host: {{ .Values.gameserver.ingress.host }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: rareicon-service
port:
number: 3000
- path: /ws/
pathType: Prefix
backend:
service:
name: rareicon-service
port:
number: 3000
{{- end }}

---

# UDP LoadBalancer Service
{{- if .Values.gameserver.service.udp.enabled }}
apiVersion: v1
kind: Service
metadata:
name: rareicon-udp-service
namespace: rareicon
labels:
app: rareicon
spec:
selector:
app: rareicon
ports:
{{- range $index, $port := .Values.gameserver.service.ports }}
{{- if eq $port.protocol "UDP" }}
- name: {{ $port.name }}
protocol: {{ $port.protocol }}
port: {{ $port.port }}
targetPort: {{ $port.targetPort }}
{{- end }}
{{- end }}
type: LoadBalancer
{{- end }}
31 changes: 31 additions & 0 deletions migrations/kube/charts/rareicon/gameserver/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
gameserver:
nameOverride: rareicon
name: rareicon-app
replicaCount: 1
image:
repository: kbve/rareicongs
tag: 1.03.0
service:
name: gameserver
ports:
- name: tcp
protocol: TCP
port: 3000
targetPort: 3000
- name: udp
protocol: UDP
port: 8081
targetPort: 8081
webscoket:
enabled: true
udp:
enabled: true
ingress:
enabled: true
host: discord.rareicon.com
paths:
- path: /
backend: html
- path: /ws/
backend: websocket
resources: {}
10 changes: 0 additions & 10 deletions migrations/kube/charts/rareicon/shipyard/values.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion packages/kilonet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ Started the IFrame Interactions but need to fix the cross origin issue.
Added the `com.unity.transport` to the packages.
Preparing the Discord build - ETA 12 hours.
Adding new tilemap generator script and fixed some asmdefs.
Triggering another build once more.
Triggering another build once more, oh boi, another docker build.
We got the helm chart working and now are preparing for a basic multiplayer game.

- [KBVE](https://kbve.com/)
- [RareIcon](https://rareicon.com/)
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
namespace KBVE.Kilonet
{

public class GameManager : MonoBehaviour
public class KBVEGameManager : MonoBehaviour
{
public static GameManager Instance { get; private set; }
public static KBVEGameManager Instance { get; private set; }

private StateMachine stateMachine;

Expand Down
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
35 changes: 35 additions & 0 deletions packages/mmextensions/mmextensions/Shaco/GameLifetimeScope.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using UnityEngine;
using VContainer;
using VContainer.Unity;
using MoreMountains.Tools;
using MoreMountains.TopDownEngine;
using KBVE.Kilonet;

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

[SerializeField]
private GameObject remotePlayerPrefab;

[SerializeField]
private GameObject gameManagerPrefab;

protected override void Configure(IContainerBuilder builder)
{
builder.UseComponents(components =>
{
var gameManager = Object.Instantiate(gameManagerPrefab).GetComponent<GameManager>();
DontDestroyOnLoad(gameManager.gameObject);
components.AddInstance(gameManager);

});

// Register the EntryPoint for GameManager initialization
builder.RegisterEntryPoint<GameManagerEntryPoint>();
}
}
}
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

0 comments on commit 78774fc

Please sign in to comment.