This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@<counter> 1 [set] | |
^{loop-begin}^ | |
"" [print] | |
@<counter> [get] (generate-batman-repeated) [call] | |
@<counter> @<counter> [get] 1 [+] [set] | |
^(loop-begin)^ @<counter> [get] 4 [<=] [call-if] | |
[exit] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// INSTRUCTIONS FOR COMPILING AND USING CLIGL WITH THIS PROJECT | |
// | |
// 1. Download the CLIGL project from the repository here: https://github.com/Ethan-Bierlein/CLIGL | |
// 2. Open up the CLIGL project solution in Visual Studio. | |
// 3. Set the build mode to 'Release'. | |
// 4. Naviate to the 'Build' dropdown and hit 'Build Solution'. | |
// 5. Minimize Visual Studio and navigate to the 'Release' folder in your file explorer of choice. | |
// 6. Verify that a CLIGL.dll file has been produced. | |
// 7. Create a new Visual Studio project of the type 'Console Application' in the language 'C#'. | |
// 8. Copy-paste this code into the main file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26.344 | |
18.554 | |
18.066 | |
15.067 | |
15.739 | |
15.534 | |
14.240 | |
14.896 | |
17.658 | |
15.059 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
namespace SkyVoxels.Engine.Utilities | |
{ | |
/// <summary> | |
/// This class serves as an advanced "wrapper" of sorts to the default Unity | |
/// Mesh class to generate visual or physics meshes dynamically. This class | |
/// is specially tailored for this project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Generate the chunk mesh. | |
/// </summary> | |
public void GenerateMesh() | |
{ | |
Stopwatch stopwatch = new Stopwatch(); | |
stopwatch.Start(); | |
DynamicMesh chunkDynamicMesh = new DynamicMesh(65535); | |
for(int x = 0; x < CHUNK_WIDTH; x++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
glActiveShaderProgram | |
glActiveTexture | |
glAttachShader | |
glBeginConditionalRender | |
glBeginQuery | |
glBeginQueryIndexed | |
glBeginTransformFeedback | |
glBindAttribLocation | |
glBindBuffer | |
glBindBufferBase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Generate lighting for an individual voxel. | |
/// </summary> | |
/// <param name="x">The x coordinate of the voxel.</param> | |
/// <param name="y">The y coordinate of the voxel.</param> | |
/// <param name="z">The y coordinate of the voxel.</param> | |
public void GenerateIndividualVoxelLighting(int x, int y, int z) | |
{ | |
Voxel currentVoxel = this.FetchVoxel(x, y, z); | |
Voxel currentVoxelUp = this.FetchVoxel(x, y + 1, z); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Generate the appropriate lighting for each voxel based on the voxel | |
/// data itself as a whole. | |
/// </summary> | |
public void GenerateVoxelLighting() | |
{ | |
// Fill the top layer of voxels with full lighting values to | |
// simulate sunlight hitting the top of the voxel data. | |
for(int x = 0; x < this.Width; x++) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Generate the appropriate lighting for each voxel based on the voxel | |
/// data itself as a whole. | |
/// </summary> | |
public void GenerateVoxelLighting() | |
{ | |
// Fill the top layer of voxels with full lighting values to | |
// simulate sunlight hitting the top of the voxel data. | |
for(int x = 0; x < this.Width; x++) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
namespace HackTheAdmin | |
{ | |
/// <summary> | |
/// Utilities that HackTheAdmin needs. | |
/// </summary> | |
class Util |