signal-k / unity-demo Goto Github PK
View Code? Open in Web Editor NEWShowing off the cool stuff in the game Star Sailors
License: MIT License
Showing off the cool stuff in the game Star Sailors
License: MIT License
As per the new function in TreeSpawner.cs
:
void SpawnTree(Vector3 position, GameObject[] availablePrefabs) {
Vector3 truePos = new Vector3(position.x + (Random.value * MaxTreeOffset), position.y, position.z + (Random.value * MaxTreeOffset)); // Actual position of each prefab that will be spawned in
GameObject treeObj = Instantiate(availablePrefabs[Random.Range(0, availablePrefabs.Length)], truePos, Quaternion.identity);
}
}
Trees (which is the current demo option) should be spawning when running the GameManager - but they're not
This is what should be happening:
At first I was thinking that there was more wrong with the current iteration but then I realised the seed and wave maps are just different, so the terrain is obviously going to be composed of different biomes. We just need to figure out why these prefabs aren't spawning on top - and then we need to figure out how to interact with the prefabs (as when the game ends, the prefabs disappear and will then be regenerated in a different PCG iteration).
This is what we've currently got:
On the left we've got a height map with "island" configuration, on the right we've got a general biome setup.
Also in the above image, we see the ground material in the bottom right of the inspector which can be used in a similar role to this:
-L
Setting up a simple scene for the demo to get it to work on conjunction with the movement/pcg/demo content for Star Sailors
WebLogin.cs script:
using System;
using System.Runtime.InteropServices;
using UnityEngine;
using UnityEngine.SceneManagement;
#if UNITY_WEBGL
public class WebLogin : MonoBehaviour
{
[DllImport("__Internal")]
private static extern void Web3Connect();
[DllImport("__Internal")]
private static extern string ConnectAccount();
[DllImport("__Internal")]
private static extern void SetConnectAccount(string value);
private int expirationTime;
private string account;
public void OnLogin()
{
Web3Connect();
OnConnected();
}
async private void OnConnected()
{
account = ConnectAccount();
while (account == "") {
await new WaitForSeconds(1f);
account = ConnectAccount();
};
// save account for next scene
PlayerPrefs.SetString("Account", account);
// reset login message
SetConnectAccount("");
// load next scene
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
}
public void OnSkip()
{
// burner account for skipped sign in screen
PlayerPrefs.SetString("Account", "");
// move to next scene
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
}
}
#endif
Repository link: http://github.com/Nathan5563/Trailer-Scenes-Demo
Signal-K/Unity-Demo
(on Github)Similar to #4 but instead based around player experience and assets...I do want to try something like this for a blockchain wallet (which we'll look into as part of this issue)
As we'll be creating & using a wide range of assets and packages for the construction of our game, I'm wanting to package these up into a set of packages that we can publish. Citizen Science, NLP/ml components, procedural generation (lidar), etc -> these are all components of "Star Sailors" that we'll be using across Unity, Phaser/.js, and in our hardware projects. I'll create a Notion document & link it here to keep track of all our prefabs and components so we can package them up in a way that makes it easy for other developers to use.
Usecases:
Questing, Animations & NPCs (meeting for 14/11/2021): https://skinetics.notion.site/Animations-NPC-scaffolding-52285b1cc64245a1adee6f73cc05a2eb
Continuing on from character rigging from #3
Fixed the issue with the main menu buttons not mapping to the correct scenes!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.