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

Jesse/feature/view distance #80

Open
wants to merge 107 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
d838c7d
Change brushes to store HSV colors such that the color picker can
scallyw4g Sep 10, 2024
56095e2
Move `sturct world` to world.h
scallyw4g Sep 10, 2024
ed353e8
DEBUG COMMIT FOR REMEDY REPRO
scallyw4g Sep 11, 2024
feda8bb
Octree nominally initializing and queueing chunks for update
scallyw4g Sep 11, 2024
09180d1
Octree generation & traversal nominally working
scallyw4g Sep 11, 2024
0284020
LODs drawing!
scallyw4g Sep 11, 2024
aa63941
Fix a shader bug when scaling geometry (normals were scaled too!)
scallyw4g Sep 11, 2024
527734c
blank_project rendering perlin2d terrain with seams
scallyw4g Sep 12, 2024
4c07995
Start wading into terrain_gen
scallyw4g Sep 12, 2024
de4fad1
Fixed SinCos terrain
scallyw4g Sep 12, 2024
3dd97cc
Defer free chunks
scallyw4g Sep 12, 2024
c085f8c
Tweaks for getting FBM2D more working
scallyw4g Sep 12, 2024
5457123
Update stdlib
scallyw4g Sep 12, 2024
9d66d17
Octree splitting w/ arbitrary distance condition working
scallyw4g Sep 14, 2024
2cbf92e
Cleanup split/collapse logic
scallyw4g Sep 14, 2024
dbc8276
Nominal priority queue enabled
scallyw4g Sep 14, 2024
18fa50c
Update some generated files
scallyw4g Sep 14, 2024
f3c05cb
Prefer nodes within frustum
scallyw4g Sep 14, 2024
2326580
Pull terrain_iteration_pattern out into poof func and do FBM2D in ter…
scallyw4g Sep 15, 2024
48df0bd
Move Terrain_FBM2D to use Perlin8x
scallyw4g Sep 15, 2024
d8baf09
Fix terrain being stretched due to modifying xCoord every octave
scallyw4g Sep 15, 2024
5fc0070
Update stdlib
scallyw4g Sep 15, 2024
1718c4a
Position to SIMD PerlinNoise_8x
scallyw4g Sep 16, 2024
c685b8d
Interm SIMD Perlin_8x
scallyw4g Sep 16, 2024
d5c76ae
Finish SIMD optimizing Perlin8x .. for now
scallyw4g Sep 17, 2024
d999d45
Fix a bug in the scalar version of Terrain_FBM2D
scallyw4g Sep 17, 2024
fe88e63
Minor profiling / histogram tweaks
scallyw4g Sep 18, 2024
83692a2
Move Voxel_Filled bit into it's own discrete array
scallyw4g Sep 18, 2024
8a6b271
Move some terrain generators into terrain.cpp from world_chunk.cpp
scallyw4g Sep 18, 2024
3ac604b
Small cleanup, update stdlib/debug
scallyw4g Sep 18, 2024
231afdf
Begin doing smarter scheduling & rendering
scallyw4g Sep 18, 2024
e0c0106
Drawing most-complete LoD of octree
scallyw4g Sep 19, 2024
8447498
Better performance analysis, improve AVX by a bit
scallyw4g Sep 19, 2024
384842e
Update stdlib
scallyw4g Sep 19, 2024
bca8e79
More SIMD hacking
scallyw4g Sep 20, 2024
1fb9680
Beat FastNoise2!
scallyw4g Sep 20, 2024
65f196a
9cycles/cell
scallyw4g Sep 20, 2024
22a0eda
8.85 cycles/cell
scallyw4g Sep 21, 2024
673114e
Add perlin performance test harness
scallyw4g Sep 21, 2024
4a375a6
6.6 cycles/cell!
scallyw4g Sep 21, 2024
3b26958
7.3 cycles/cell
scallyw4g Sep 22, 2024
b1d6003
6.3 cyc/cell
scallyw4g Sep 22, 2024
d73872b
Soft-remove SrcToDest
scallyw4g Sep 22, 2024
c658fb7
Update to clang 19; fix a bunch of uninitialized members
scallyw4g Sep 24, 2024
8891951
WIP optimize noise generation by sparsely computing it
scallyw4g Sep 25, 2024
24b768a
WIP hacking
scallyw4g Sep 25, 2024
5c56b7d
Binary meshing nominally working
scallyw4g Sep 26, 2024
155b97a
Fix right-left faces being swapped
scallyw4g Sep 27, 2024
ccf6f9d
Cleaning up a little bit
scallyw4g Sep 29, 2024
6cf8c8f
Fix y & z seams
scallyw4g Sep 30, 2024
7b3af39
Initial implementation of borders compiling but totally broken
scallyw4g Oct 1, 2024
dafbbb9
Fix a couple fucky register-ordering mis-named variables
scallyw4g Oct 2, 2024
8528d79
Binary meshing working with result of 64^3 voxels
scallyw4g Oct 2, 2024
aaa3e9b
Fucking fuck
scallyw4g Oct 5, 2024
65bc80c
Fix maximal edge
scallyw4g Oct 5, 2024
1e1eaa0
Update stdlib
scallyw4g Oct 5, 2024
a11c8cd
Fix floating point issue when computing perlin noise
scallyw4g Oct 6, 2024
2d55b11
Confirm FP errors fixed by testing with a massive global offset
scallyw4g Oct 6, 2024
231d494
Fix a bug w/ more than 1 octave
scallyw4g Oct 6, 2024
cd9a2a7
Implement Agner Fogs fast unsigned integer AVX divide
scallyw4g Oct 7, 2024
cfece08
Add ComputePerlinParameters_scalar
scallyw4g Oct 7, 2024
77c0d71
16m cycles to do a full chunk 7 octaves
scallyw4g Oct 8, 2024
54f5ee9
12m cycles
scallyw4g Oct 8, 2024
8302802
Cleanup dead comments
scallyw4g Oct 8, 2024
19a06f0
Setup to pull ComputePerlinParameters out of the hot loop
scallyw4g Oct 8, 2024
8ed60af
Finish pulling perlin_parameters pre-calculations out of hot loop
scallyw4g Oct 8, 2024
748dc7a
Fix octaves
scallyw4g Oct 8, 2024
77207d9
Fix octaves indexing for-realz
scallyw4g Oct 8, 2024
a0c1ec9
Fix bug in EventsCurrentlyInQueue
scallyw4g Oct 8, 2024
abba602
Update deps
scallyw4g Oct 8, 2024
a56e1c3
Fix GetRenderP going through global space (derp)
scallyw4g Oct 8, 2024
bfb0d72
Add GLOBAL_RENDER_SCALE_FACTOR
scallyw4g Oct 8, 2024
91e178e
Tune camera & rendering params a bit
scallyw4g Oct 8, 2024
303bc77
Find & fix a memory leak (not freeing most octree nodes)
scallyw4g Oct 9, 2024
4ebf04b
Change world_chunk member of octree_node to a pointer
scallyw4g Oct 9, 2024
46a02f3
Fix a couple bugs, draw normals
scallyw4g Oct 11, 2024
61bd67a
AVX voxel normal calculations; get rid of VOXEL_DEBUG_COLOR
scallyw4g Oct 12, 2024
3f70233
Fix some banding artifacts
scallyw4g Oct 12, 2024
c957e74
Add new generated wide vector operations
scallyw4g Oct 12, 2024
3f53afc
Update stdlib
scallyw4g Oct 12, 2024
fe42b0b
Add some new .vox assets
scallyw4g Oct 12, 2024
74f7045
SIMD normal computation working
scallyw4g Oct 12, 2024
a18f3a0
Twiddle storage instructions
scallyw4g Oct 12, 2024
8cc6866
Finish optimizing the normal calculations.. for now ..
scallyw4g Oct 12, 2024
4d1b429
Compute full mask and set instead of setting each bit
scallyw4g Oct 13, 2024
18b9a73
WIP Upsampling noise values
scallyw4g Oct 13, 2024
370da1d
Upsampling 2x working with blending
scallyw4g Oct 14, 2024
c1df864
Add gradient noise shader
scallyw4g Oct 17, 2024
d7af027
Random FAFing
scallyw4g Oct 17, 2024
76ce9f0
Move LibIsNew into stdlib and rename to FileIsNew
scallyw4g Oct 17, 2024
ed64aca
Add shader_block_array
scallyw4g Oct 17, 2024
a126cff
Pull code out into FinalizeOccupancyMasksFromNoiseValues
scallyw4g Oct 18, 2024
a5044a4
COMPILER BUG && start GPU noise
scallyw4g Oct 20, 2024
7324d8f
Pull chunk mesh gen code out of render thread
scallyw4g Oct 21, 2024
5f98ae7
Correctly generating perlin noise on GPU
scallyw4g Oct 21, 2024
2c1883f
Update stdlib
scallyw4g Oct 21, 2024
726874d
Correctly generating 3D perlin on GPU
scallyw4g Oct 21, 2024
4497026
Shader noise pretty much all working; still off-by-one holes on edges…
scallyw4g Oct 22, 2024
47bbb37
Setup to side-by-side compare cpu and gpu noise implementations
scallyw4g Oct 22, 2024
8280d1a
WIP
scallyw4g Oct 22, 2024
e3b79f1
Fix holes in both CPU and GPU noise gen
scallyw4g Oct 23, 2024
3f358ee
WIP returning color values from shader
scallyw4g Oct 23, 2024
794396e
Generating color from shader
scallyw4g Oct 23, 2024
e961268
Minor cleanup
scallyw4g Oct 23, 2024
0f36f2c
Cleanup in terrain/default.fragmentshader
scallyw4g Oct 23, 2024
9627c7d
Turn off DrawMinorGrid by default
scallyw4g Oct 23, 2024
bcd455d
Center camera on visible region at startup
scallyw4g Oct 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion examples/blank_project/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ BONSAI_API_MAIN_THREAD_INIT_CALLBACK()
world_position WorldCenter = {};
canonical_position CameraTargetP = {};

StandardCamera(Graphics->Camera, 10000.0f, 1000.0f);
StandardCamera(Graphics->Camera, 30000.0f, 1000.0f);

AllocateWorld(World, WorldCenter, WORLD_CHUNK_DIM, g_VisibleRegion);

Expand Down
8 changes: 7 additions & 1 deletion examples/blank_project/game_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ global_variable chunk_dimension
WORLD_CHUNK_DIM = Chunk_Dimension(32, 32, 8);
#else
global_variable chunk_dimension
g_VisibleRegion = Chunk_Dimension(8, 8, 4);
/* g_VisibleRegion = Chunk_Dimension(8, 8, 8); */
/* g_VisibleRegion = Chunk_Dimension(16, 16, 16); */
/* g_VisibleRegion = Chunk_Dimension(32, 32, 32); */
/* g_VisibleRegion = Chunk_Dimension(64, 64, 64); */
/* g_VisibleRegion = Chunk_Dimension(128, 128, 128); */
g_VisibleRegion = Chunk_Dimension(256, 256, 256); // 1.63km
/* g_VisibleRegion = Chunk_Dimension(1024, 1024, 1024); */

global_variable chunk_dimension
WORLD_CHUNK_DIM = Chunk_Dimension(64, 64, 64);
Expand Down
157 changes: 111 additions & 46 deletions examples/terrain_gen/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,38 @@
#include "game_constants.h"
#include "game_types.h"

link_internal u32
Terrain_Debug( world_chunk *Chunk,
v3i NoiseBasis,
void *NoiseParams,
void *UserData )
{
UNPACK_NOISE_PARAMS(NoiseParams);

u32 Result = 0;

auto AbsX = Abs(Chunk->WorldP.x);
auto AbsY = Abs(Chunk->WorldP.y);

for ( s32 z = 0; z < Dim.z; ++ z)
{
for ( s32 y = 0; y < Dim.y; ++ y)
{
for ( s32 x = 0; x < Dim.x; ++ x)
{
if (x == 2 && y == 2 && z == 2)
{
s32 Index = GetIndex(Voxel_Position(x,y,z), Dim);
SetOccupancyBit(Chunk, Index, VoxelOccupancy_Filled);
Chunk->Voxels[Index].Color = RGBtoPackedHSV(RGBColor);
++Result;
}
}
}
}

return Result;;
}
link_internal u32
Terrain_Checkerboard( world_chunk *Chunk,
v3i NoiseBasis,
Expand Down Expand Up @@ -32,7 +64,8 @@ Terrain_Checkerboard( world_chunk *Chunk,
if (WorldZ < zMin)
{
s32 Index = GetIndex(Voxel_Position(x,y,z), Dim);
Chunk->Voxels[Index].Flags = Voxel_Filled;
/* Chunk->Voxels[Index].Flags = Voxel_Filled; */
SetOccupancyBit(Chunk, Index, VoxelOccupancy_Filled);
Chunk->Voxels[Index].Color = RGBtoPackedHSV(RGBColor);
++Result;
}
Expand Down Expand Up @@ -70,8 +103,9 @@ GrassyIslandTerrain( world_chunk *Chunk,
{
s64 WorldX = x - SrcToDest.x + (WorldChunkDim.x*Chunk->WorldP.x);
s32 VoxIndex = GetIndex(Voxel_Position(x,y,z), Dim);
Chunk->Voxels[VoxIndex].Flags = Voxel_Empty;
Assert( NotSet(&Chunk->Voxels[VoxIndex], Voxel_Filled) );
NotImplemented;
/* Chunk->Voxels[VoxIndex].Flags = Voxel_Empty; */
/* Assert( NotSet(&Chunk->Voxels[VoxIndex], Voxel_Filled) ); */

r32 NoiseValue = 0.f;
for (u32 OctaveIndex = 0; OctaveIndex < OctaveCount; ++OctaveIndex)
Expand Down Expand Up @@ -223,23 +257,14 @@ GrassyIslandTerrain( world_chunk *Chunk,
}
#endif

SetFlag(&Chunk->Voxels[VoxIndex], (voxel_flag)(Voxel_Filled*NoiseChoice));
/* SetFlag(&Chunk->Voxels[VoxIndex], (voxel_flag)(Voxel_Filled*NoiseChoice)); */
SetOccupancyBit(Chunk, VoxIndex, s32(NoiseChoice));
Chunk->Voxels[VoxIndex].Color = RGBtoPackedHSV(ThisColor)*u16(NoiseChoice);
Chunk->Voxels[VoxIndex].Transparency = ThisTransparency;
ChunkSum += NoiseChoice;



Assert( (Chunk->Voxels[VoxIndex].Flags&VoxelFaceMask) == 0);

if (NoiseChoice)
{
Assert( IsSet(&Chunk->Voxels[VoxIndex], Voxel_Filled) );
}
else
{
Assert( NotSet(&Chunk->Voxels[VoxIndex], Voxel_Filled) );
}
NotImplemented;
/* Assert( (Chunk->Voxels[VoxIndex].Flags&VoxelFaceMask) == 0); */
}
}
}
Expand Down Expand Up @@ -275,8 +300,8 @@ WarpedTerrain( world_chunk *Chunk,
{
s64 WorldX = x - SrcToDest.x + (WorldChunkDim.x*Chunk->WorldP.x);
s32 VoxIndex = GetIndex(Voxel_Position(x,y,z), Dim);
Chunk->Voxels[VoxIndex].Flags = Voxel_Empty;
Assert( NotSet(&Chunk->Voxels[VoxIndex], Voxel_Filled) );
NotImplemented;
/* Chunk->Voxels[VoxIndex].Flags = Voxel_Empty; */

r32 NoiseValue = 0.f;
for (u32 OctaveIndex = 0; OctaveIndex < OctaveCount; ++OctaveIndex)
Expand Down Expand Up @@ -323,20 +348,13 @@ WarpedTerrain( world_chunk *Chunk,
}
#endif

SetFlag(&Chunk->Voxels[VoxIndex], (voxel_flag)(Voxel_Filled*NoiseChoice));
/* SetFlag(&Chunk->Voxels[VoxIndex], (voxel_flag)(Voxel_Filled*NoiseChoice)); */
SetOccupancyBit(Chunk, VoxIndex, s32(NoiseChoice));
Chunk->Voxels[VoxIndex].Color = RGBtoPackedHSV(ThisColor)*u16(NoiseChoice);
ChunkSum += NoiseChoice;

Assert( (Chunk->Voxels[VoxIndex].Flags&VoxelFaceMask) == 0);

if (NoiseChoice)
{
Assert( IsSet(&Chunk->Voxels[VoxIndex], Voxel_Filled) );
}
else
{
Assert( NotSet(&Chunk->Voxels[VoxIndex], Voxel_Filled) );
}
NotImplemented;
/* Assert( (Chunk->Voxels[VoxIndex].Flags&VoxelFaceMask) == 0); */
}
}
}
Expand Down Expand Up @@ -370,7 +388,8 @@ BONSAI_API_WORKER_THREAD_CALLBACK()
{
// NOTE(Jesse): This is an optimization; the engine marks chunks that
// have moved outside of the visible region as garbage.
Chunk->Flags = Chunk_Uninitialized;
NotImplemented;
/* Chunk->Flags = Chunk_Uninitialized; */
}
else
{
Expand All @@ -381,6 +400,15 @@ BONSAI_API_WORKER_THREAD_CALLBACK()
/* Info("%S", ToString(GenType)); */
switch (GenType)
{
case TerrainGenType_Debug:
{
// Flat Params
v3 Period = {};
s32 Amplititude = {};
s32 StartingZDepth = {};
v3 Color = RGB_GRASS_GREEN;
InitializeChunkWithNoise( Terrain_Debug, Thread, Chunk, Chunk->Dim, 0, Period, Amplititude, StartingZDepth, Color, Ignored, ChunkInitFlag_Noop, 0);
} break;
case TerrainGenType_Flat:
{
// Flat Params
Expand All @@ -394,11 +422,11 @@ BONSAI_API_WORKER_THREAD_CALLBACK()
case TerrainGenType_SinCos:
{
// Bumpy Sin(x)+Cos(y) noise. Useful for visualizing the polylines/splines mapping noise values to their final values.
v3 Period = V3(100);
s32 Amplititude = 250;
v3 Period = V3(20);
s32 Amplititude = 70;
/* s32 Period = 100; */
/* s32 Amplititude = 2500; */
s32 StartingZDepth = -1;
s32 StartingZDepth = 15;
chunk_init_flags InitFlags = ChunkInitFlag_Noop;
v3 Color = RGB_GRASS_GREEN;
InitializeChunkWithNoise( Terrain_SinCos, Thread, Chunk, Chunk->Dim, 0, Period, Amplititude, StartingZDepth, Color, Ignored, InitFlags, 0);
Expand Down Expand Up @@ -451,11 +479,40 @@ BONSAI_API_WORKER_THREAD_CALLBACK()

case TerrainGenType_FBM2D:
{
// FBM params
v3 Period = V3(300);
s32 Amplititude = 220;
s32 StartingZDepth = -200;
u32 Octaves = 4;
/* // FBM params */

// 5km features
/* v3 Period = V3(500'000); */
/* s32 Amplititude = 80'000; */
/* s32 StartingZDepth = 20000; */
/* u32 Octaves = 9; */

// 2km features
/* v3 Period = V3(200'000); */
/* // 600m high */
/* s32 Amplititude = 60'000; */
/* s32 StartingZDepth = 60000; */
/* u32 Octaves = 7; */

/* v3 Period = V3(5000); */
/* s32 Amplititude = 1500; */
/* s32 StartingZDepth = 1600; */
/* u32 Octaves = 9; */

v3 Period = V3(2500);
s32 Amplititude = 1500;
s32 StartingZDepth = 1600;
u32 Octaves = 9;
/* u32 Octaves = 4; */
/* u32 Octaves = 1; */

/* v3 Period = V3(50); */
/* s32 Amplititude = 60; */
/* s32 StartingZDepth = 6000; */
/* u32 Octaves = 1; */
/* u32 Octaves = 4; */


/* chunk_init_flags InitFlags = ChunkInitFlag_ComputeStandingSpots; */
chunk_init_flags InitFlags = ChunkInitFlag_Noop;
v3 Color = RGB_GRASS_GREEN;
Expand Down Expand Up @@ -558,7 +615,7 @@ BONSAI_API_WORKER_THREAD_CALLBACK()
/* chunk_init_flags InitFlags = ChunkInitFlag_GenMipMapLODs; */
chunk_init_flags InitFlags = ChunkInitFlag_Noop;
v3 Color = RGB_GRASS_GREEN;
InitializeChunkWithNoise( GrassyTerracedTerrain4, Thread, Chunk, Chunk->Dim, 0, Period, Amplititude, StartingZDepth, Color, MeshBit_Lod0, InitFlags, (void*)&OctaveBuf);
/* InitializeChunkWithNoise( GrassyTerracedTerrain4, Thread, Chunk, Chunk->Dim, 0, Period, Amplititude, StartingZDepth, Color, MeshBit_Lod0, InitFlags, (void*)&OctaveBuf); */
} break;


Expand All @@ -567,7 +624,7 @@ BONSAI_API_WORKER_THREAD_CALLBACK()
// Custom FBM noise example generating slightly-more-complex game-world-like terrain
v3 Period = V3(0); // Ignored
s32 Amplititude = 0; // Ignored
s32 StartingZDepth = -100;
s32 StartingZDepth = 100;
u32 OctaveCount = 1;

octave_buffer OctaveBuf = { OctaveCount, {} };
Expand Down Expand Up @@ -691,8 +748,6 @@ BONSAI_API_WORKER_THREAD_CALLBACK()

}

FinalizeChunkInitialization(Chunk);
UnSetFlag(&Chunk->Flags, Chunk_Queued);
} break;
}

Expand All @@ -705,18 +760,24 @@ BONSAI_API_MAIN_THREAD_INIT_CALLBACK()

Global_AssetPrefixPath = CSz("examples/terrain_gen/assets");

world_position WorldCenter = {};
/* world_position WorldCenter = V3i(s32_MAX-1000); */
world_position WorldCenter = V3i(100, 100, 0);
canonical_position CameraTargetP = {};

StandardCamera(Graphics->Camera, 10000.0f, 5000.0f);
f32 DistanceFromTarget = Length(g_VisibleRegion/2.f);
f32 FarClip = 150000.f;
StandardCamera(Graphics->Camera, FarClip, DistanceFromTarget);

AllocateWorld(World, WorldCenter, WORLD_CHUNK_DIM, g_VisibleRegion);

GameState = Allocate(game_state, Resources->GameMemory, 1);

/* GameState->TerrainGenType = TerrainGenType_GrassyTerracedTerrain; */

GameState->TerrainGenType = TerrainGenType_SinCos;
/* GameState->TerrainGenType = TerrainGenType_Debug; */
/* GameState->TerrainGenType = TerrainGenType_SinCos; */
/* GameState->TerrainGenType = TerrainGenType_TerracedTerrain; */
GameState->TerrainGenType = TerrainGenType_FBM2D;
/* GameState->TerrainGenType = TerrainGenType_GrassyTerracedTerrain4; */
/* GameState->TerrainGenType = TerrainGenType_Voronoi; */
/* World->Center = V3i(-22, 101, 1); */
Expand All @@ -727,9 +788,13 @@ BONSAI_API_MAIN_THREAD_INIT_CALLBACK()
/* CameraGhost->P.WorldP = V3i(-25, -75, 2); */
/* CameraGhost->P.WorldP = V3i(-5, -121, 2); */

CameraGhost->P.WorldP = V3i(330, -87, 2);
/* CameraGhost->P.WorldP = V3i(330, -87, 2); */
/* CameraGhost->P.WorldP = V3i(33, -87, 2); */
/* CameraGhost->P.WorldP = V3i(5, -73, 2); */
/* CameraGhost->P.WorldP = V3i(1000, 1000, 100); */
/* CameraGhost->P.WorldP = WorldCenter; */
/* CameraGhost->P.WorldP = WorldCenter + g_VisibleRegion/2; */
CameraGhost->P.WorldP = g_VisibleRegion/2;
CameraGhost->Behavior = entity_behavior_flags(CameraGhost->Behavior|EntityBehaviorFlags_DefatulCameraGhostBehavior|EntityBehaviorFlags_WorldCenter);

SpawnEntity(CameraGhost);
Expand Down
50 changes: 17 additions & 33 deletions examples/terrain_gen/game_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,23 @@ WORLD_CHUNK_DIM = Chunk_Dimension(32, 32, 8);
#else

global_variable chunk_dimension
/* g_VisibleRegion = Chunk_Dimension(120, 120, 6); */
/* g_VisibleRegion = Chunk_Dimension(64, 64, 16); */
/* g_VisibleRegion = Chunk_Dimension(80, 80, 8); */
/* g_VisibleRegion = Chunk_Dimension(64, 64, 8); */
/* g_VisibleRegion = Chunk_Dimension(64, 64, 6); */
/* g_VisibleRegion = Chunk_Dimension(32, 32, 16); */
/* g_VisibleRegion = Chunk_Dimension(32, 32, 10); */
/* g_VisibleRegion = Chunk_Dimension(32, 32, 8); */
/* g_VisibleRegion = Chunk_Dimension(32, 32, 6); */
/* g_VisibleRegion = Chunk_Dimension(32, 32, 4); */
/* g_VisibleRegion = Chunk_Dimension(24, 24, 4); */
/* g_VisibleRegion = Chunk_Dimension(24, 24, 6); */
g_VisibleRegion = Chunk_Dimension(24, 24, 8);
/* g_VisibleRegion = Chunk_Dimension(16, 16, 8); */
/* g_VisibleRegion = Chunk_Dimension(16, 16, 6); */
/* g_VisibleRegion = Chunk_Dimension(10, 10, 10); */
/* g_VisibleRegion = Chunk_Dimension(8, 8, 6); */


/* global_variable chunk_dimension */
/* WORLD_CHUNK_DIM = Chunk_Dimension(16, 16, 16); */

/* global_variable chunk_dimension */
/* WORLD_CHUNK_DIM = Chunk_Dimension(16, 16, 16); */

/* global_variable chunk_dimension */
/* WORLD_CHUNK_DIM = Chunk_Dimension(28, 28, 28); */

/* global_variable chunk_dimension */
/* WORLD_CHUNK_DIM = Chunk_Dimension(32, 32, 32); */

/* global_variable chunk_dimension */
/* WORLD_CHUNK_DIM = Chunk_Dimension(64, 64, 64); */
/* g_VisibleRegion = Chunk_Dimension(8192*32, 8192*32, 8192*32); // 1677km */
/* g_VisibleRegion = Chunk_Dimension(8192*8, 8192*8, 8192*8); // 416km */
/* g_VisibleRegion = Chunk_Dimension(8192*4, 8192*4, 8192*4); // 208km */
/* g_VisibleRegion = Chunk_Dimension(8192*2, 8192*2, 8192*2); // 104km */
/* g_VisibleRegion = Chunk_Dimension(8192, 8192, 8192); // 52km */
/* g_VisibleRegion = Chunk_Dimension(4096, 4096, 4096); // 26km */
/* g_VisibleRegion = Chunk_Dimension(2048, 2048, 2048); // 13.11 km */
/* g_VisibleRegion = Chunk_Dimension(512, 512, 512); // 3.28 km */
/* g_VisibleRegion = Chunk_Dimension(256, 256, 256); */
/* g_VisibleRegion = Chunk_Dimension(128, 128, 128); */
g_VisibleRegion = Chunk_Dimension(64, 64, 64);
/* g_VisibleRegion = Chunk_Dimension(32, 32, 32); */
/* g_VisibleRegion = Chunk_Dimension(16, 16, 16); */
/* g_VisibleRegion = Chunk_Dimension(8, 8, 8); */
/* g_VisibleRegion = Chunk_Dimension(4, 4, 4); */
/* g_VisibleRegion = Chunk_Dimension(2, 2, 2); */



global_variable chunk_dimension
Expand Down
2 changes: 2 additions & 0 deletions examples/terrain_gen/game_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ enum terrain_gen_type
TerrainGenType_GrassyIsland = (1 << 13),
TerrainGenType_Hoodoo = (1 << 14),
TerrainGenType_Warped = (1 << 15),

TerrainGenType_Debug = (1 << 16),
};

poof(radio_button_group_for_bitfield_enum(terrain_gen_type))
Expand Down
Binary file added examples/transparency/remedy_repro.rdbg
Binary file not shown.
2 changes: 1 addition & 1 deletion generated/anonymous_function_ui_render_command_RuTTrHiW.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// external/bonsai_stdlib/src/ui/ui.cpp:2311:0
// external/bonsai_stdlib/src/ui/ui.cpp:2317:0

case type_ui_render_command_window_start:
{
Expand Down
2 changes: 1 addition & 1 deletion generated/anonymous_input_5Nt8cwGP.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// external/bonsai_stdlib/src/platform/win32/win32_platform.cpp:411:0
// external/bonsai_stdlib/src/platform/win32/win32_platform.cpp:410:0

BindKeyupToInput(VK_RETURN, Enter);

Expand Down
2 changes: 1 addition & 1 deletion generated/anonymous_input_Lwen2qoF.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// external/bonsai_stdlib/src/ui/ui.cpp:3279:0
// external/bonsai_stdlib/src/ui/ui.cpp:3291:0

if (Input->Dot.Clicked)
{
Expand Down
Loading
Loading