Skip to content

Instantly share code, notes, and snippets.

View ttvd's full-sized avatar
:shipit:

Mykola Konyk ttvd

:shipit:
View GitHub Profile
@ttvd
ttvd / gist:fc174fca5961742a89fdc3abd56ecd50
Created September 24, 2022 15:54
Quick lua c++ bindings
extern "C" {
#include "lauxlib.h"
#include "lualib.h"
}
#include <stdio.h>
#include <windows.h>
#include <vector>
@ttvd
ttvd / gist:d6933e55bdc85faca356e36c098d15ee
Created September 22, 2022 16:49
FVector generated header stub.
//===========================================================================
// Generated code exported from _________HeaderProcessor.
// DO NOT modify this manually!
//===========================================================================
#pragma once
struct F_________LuaContext;
struct lua_State;
struct FVector;
@ttvd
ttvd / gist:efa048205a117c52f964fb3dbf00dbd0
Created May 18, 2022 14:29
Building LLVM and Clang 14 on Windows
x Download Clang and LLVM source.
x Extract them to the same top level folder, so that they are side by side.
c:\temp\clang-14.0.0.src
c:\temp\llvm-14.0.0.src
x Generate VS LLVM solution, build release LLVM (for example within c:\temp\llvm-14.0.0.src\_build)
x For VS Clang solution, we need to set proper Cmake variables
xx LLVM_DIR = c:\Temp\llvm-14.0.0.src\_build\lib\cmake\llvm
xx LLVM_LIBRARY_DIR = c:\Temp\llvm-14.0.0.src\_build\Release\lib
xx LLVM_MAIN_INCLUDE_DIR = c:\Temp\llvm-14.0.0.src\include
xx LLVM_MAIN_SRC_DIR = C:\Temp\llvm-14.0.0.src ?? (possibly not necessary)
p4 duplicate //olddepot/... //newdepot/...
p4 snap //newdepot/... //olddepot/...
p4 verify -q //newdepot/...
p4 obliterate //olddepot/...
@ttvd
ttvd / HoudiniNodeComponent.h
Created December 19, 2021 20:02
Dynamic Houdini Node Component
#pragma once
#include "HoudiniNodeComponent.generated.h"
UCLASS()
class HOUDININODE_API UHoudiniNodeComponent : public USceneComponent
{
GENERATED_UCLASS_BODY()
virtual ~UHoudiniNodeComponent();
@ttvd
ttvd / gist:3373d9dc4a3dcfca7d88d73226920672
Created December 10, 2021 12:04
local iperf3 10 gbit test
zzz@xxx ->iperf3 -s -p 9999
-----------------------------------------------------------
Server listening on 9999
-----------------------------------------------------------
Accepted connection from aaa.bbb.ccc.ddd, port xyzw
[ 5] local aaa.bbb.ccc.eee port 9999 connected to aaa.bbb.ccc.ddd port xyzp
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 1.04 GBytes 8.97 Gbits/sec
[ 5] 1.00-2.00 sec 1.10 GBytes 9.48 Gbits/sec
[ 5] 2.00-3.00 sec 1.10 GBytes 9.44 Gbits/sec
Howdy!
I wrote Red Faction''s Geomod engine...
It does a complete realtime subtractive boolean from the world Geometry. The "hole" that is cut out is a loaded mesh that gets randomly rotated to look different everytime. It could be any shape, we just liked how this one worked. It operates on a face basis, splitting some, deleting some, and adding in new ones. The input is a polygon mesh; the output is a polygon mesh.
The math to to the boolean takes place spread out over a few frames so that it doesn''t impact framerate much.
All of out structures in the game are dynamic to handle this... the code to actually make the whole is only a minor part of the problem. For instance, our AI paths can update to reflect the hole, the rooms and portals update so a hole between two rooms is now a portal, and the collision detection structures for the world use recursive AABB, which get dynamically updated during the Geomod. Even things like slapping bullet decals on the new faces and making sure to remove decals on fa

Core Coding Standard

Coding practices are a source of a lot of arguments among programmers. Coding standards, to some degree, help us to put certain questions to bed and resolve stylistic debates. No coding standard makes everyone happy. (And even their existence is sure to make some unhappy.) What follows are the standards we put together on the Core team, which have become the general coding standard for all programming teams on new code development. We’ve tried to balance the need for creating a common, recognizable and readable code base with not unduly burdening the programmer with minor code formatting concerns.

Table Of Contents

Keybase proof

I hereby claim:

  • I am ttvd on github.
  • I am ttvd (https://keybase.io/ttvd) on keybase.
  • I have a public key whose fingerprint is 09FB 7CFF 4BE3 30E7 A1FC 8692 8277 7B8D 8092 06D5

To claim this, I am signing this object:

ZORG.dylib:
ZORG.dylib (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 21.0.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
install_name_tool -delete_rpath ZORG.dylib ZORG.dylib
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: