Giter Site home page Giter Site logo

hifoz / tgag Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 1.0 477.51 MB

Bachelor Thesis :: "The Grass is Always Greener: A Procedurally Generated Game"

License: Other

C# 92.11% ShaderLab 5.58% HLSL 2.31%
procedural-generation unity game-development bachelor-project game

tgag's People

Contributors

hifoz avatar muff1nz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

muff1nz

tgag's Issues

Previously saved settings not loaded, unless you enter settings menu.

My game runs with 3 threads, unless i open the settings menu before playing (Opening the menu is enough, don't have to apply or change any settings).

The cause is the fact that SettingsUI.Start() wont be called until you open the menu, and that's the function that loads settings.

Maybe having the settings menu default to enabled, and having start end with this.setActive(false) would work?

Hole in water body bottom

Sometimes the bottom of water bodies have holes in them.
image

This became visible after adding corruption to water.

Vector3.negativeInfinity != Vector3(-Infinity, -Infinity, -Infinity)

Issue:

After messing a little with world gen parameters, I came across a bug where the rng in LSystemTreeGenerator.GenerateLSystemTree() would throw because the position sent in was to small for a function called inside.

Solution:

After some debugging I found that somehow, the position passed to GenerateLSystemTree() was (-Infinity, -Infinity, -Infinity), which shouldn't be possible because we already checked for the vector being negative infinity in CVDT.handleChunkOrder(). It appears that

Vector3.negativeInfinity == new Vector3(-Infinity, -Infinity, -Infinity) 

is False. The solution I found was to not check with Vector3.negativeInfinity, but to check each of the components of the vector with float.IsInfinity(value) instead, which does work.

Spine Leveling issue

Spine leveling can break when under an overhanging structure, because the downards raycasts hit the "wrong ground" This issue was mentioned before, in #84 review (in discord).

I know how to fix it, not doing an offset for the raycasts (raycasting down at the ground from high up), but raycasting from inside a solid and at empty space instead (for when the raycast origin is inside a solid, we can raycast up at empty space, if raycast origin is in empty space we raycast down at solids as usual).

WorldOffset causes pendingChunk leaking.

Noticed that pendingChunks was > waiting chunks even after standing still for some while, they should equal each other when the world generation has caught up. This only happend after a world shift. I have set worldshift distance to 10 000 in the mean time which disables the world shifting.

Benchmark scene broken

Most of the code in SyntheticBenchmarkManager is commented out. When I un-comment it all trees spawn at 0,0

Some animals can be stuck in a wind zone

Think its related to the fact that chunk mesh colliders are no longer enabled/disabled, before we used to enable/disable the colliders when doing a world shift, to update them.

Underside of blocks with snow have side texture

image
Noticed while testing that the undersides of the blocks with snow on them had the side-modifier applied to them. I assume this is also the same with the grass, but haven't ffound any floating grass blocks yet

GreedyMeshGen artifacts

We can gather data about the issue here.

I tried changing a lot of camera settings, basically everything in the camera component, nothing had an impact (Except lowering the far clipping plane).

I tried making the issue worse, by making dv and du normal Vector3, and subtracting -0.001f from height and width, picture of result (adding small numbers to height and width reduces artifacting):
greedymeshgenissue
Might not be clear from the picture, but if you try your self and see ingame, its clear that the artifacting only happens between borders of faces.

Turning off fade to skybox in the camera fog script eliminates all artifacting from ingame view.
greedymeshgenissue_fadetoskybox_false

Image of an idea regarding bordering (very professional):
image

I wonder if the fact that the faces can now border "Nothing" as shown in "Leaky border", where the vertex of one face has no equivalent vertex in the next face can be the cause for the artifacts. So when the shader does its interpolation as its moving from the vertex to the fragment shader, the interpolated values at the border for the two faces might become slightly different, because they are calculated from a different set of vertexes. If this theory is correct, a solution could be to do border winding, where you identify the borders of the face in the plane, and wind triangles from the border to the center, then all faces would have equivalent vertexes with their neighbors.

image

Comet fish

We've had this issue for a while, but sometimes you'll see a fish npc shooting off like a comet in one direction. Might be related to world shift(not sure).

Freelock black screen

If you spam the various keys WASD while using freelock(alt) the screen can turn black and the animal will spasm.

AirAnimal acceleration bug

Sometimes when you play as an air animal you'll have an acceleration that is too high.

Think this happens if you become an AirAnimalNPC that is "ascending"

Tree Spawning issues

Currently the tree spawning logic only checks the if the block at the tree trunk is unobstructed, and thats the only criteria.

  • Trees spawn in water
  • Trees can spawn in obstructions

inWaterInt going to high

While adding an ocean-biome I noticed that I was suddenly swimming in the sky. Looking at the debug data, my inWaterInt was way to high. After restarting to try replicating I noticed the npcs could get an inWaterInt that was way to high, I myself probably got it from taking over an npc.

npcs can get a inwaterint that is way to high

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.