Skip to content

Instantly share code, notes, and snippets.

@neshume
neshume / PointCloudDensity.py
Created March 15, 2021 22:40 — forked from 0xLeon/PointCloudDensity.py
Point Cloud Density Calculation
"""
Provides methods for calculating point cloud densities.
All methods can handle instances of PLYObject or list or ndarray instances of lists of vertices.
"""
import numpy as np
import scipy.spatial
def getRealDensityFromPlane(ply, planeParams):
"""
@neshume
neshume / custom_game_engines_small_study.md
Created October 24, 2020 16:36 — forked from leetrout/custom_game_engines_small_study.md
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) becaus

@neshume
neshume / LICENSE
Created September 23, 2019 16:17 — forked from shinout/LICENSE
Topological sort in JavaScript
Copyright 2012 Shin Suzuki<shinout310@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@neshume
neshume / nodejs.md
Created July 28, 2019 17:01 — forked from anonymous/nodejs.md
nodejs
/* 

Read a ini file

[Section1]
Param1=value1
[Section2]
Param2=value2
@neshume
neshume / GetCpuTempAndroid.java
Created October 7, 2018 07:11 — forked from ValCanBuild/GetCpuTempAndroid.java
A way to get the CPU temperature from an android device by using the sys/class/thermal/temp command
public float getCpuTemp() {
Process p;
try {
p = Runtime.getRuntime().exec("cat sys/class/thermal/thermal_zone0/temp");
p.waitFor();
BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = reader.readLine();
float temp = Float.parseFloat(line) / 1000.0f;
@neshume
neshume / invaders.pde
Created February 12, 2018 11:21 — forked from tangzero/invaders.pde
Space Invaders Generator
/**
* Space invaders generator. Generates and draws invaders. Inspired
* by invaders fractals:
* http://www.levitated.net/daily/levInvaderFractal.html
*
* Mouse press will create new invaders and draw the new ones.
*/
/** Scaling factor */
float sc = 3f;
@neshume
neshume / MultipleDevicesOverTCP.md
Created January 30, 2018 19:26 — forked from teocci/MultipleDevicesOverTCP.md
How to connect multiple Android devices with ADB over TCP

#How to connect multiple Android devices with ADB over TCP

From your device, if it is rooted

According to a post on xda-developers, you can enable ADB over Wi-Fi from the device with the commands:

su
setprop service.adb.tcp.port 5555
stop adbd
start adbd
/*
a shader executes per pixel
so every thing you see here is he function for every pixel
raymarching is in principe a function that finds the closest point to any surface in the world
then we move our point by that distance and use the same function,
the function will probably be closer to an object in the world every time
and after about 40 to 200 iterations you'll either have found an object or
missed them all into infinity
@neshume
neshume / float16.c
Created May 21, 2017 22:05
Fast half-precision to single-precision floating point conversion
// float32
// Martin Kallman
//
// Fast half-precision to single-precision floating point conversion
// - Supports signed zero and denormals-as-zero (DAZ)
// - Does not support infinities or NaN
// - Few, partially pipelinable, non-branching instructions,
// - Core opreations ~6 clock cycles on modern x86-64
void float32(float* __restrict out, const uint16_t in) {
uint32_t t1;
error -> TFS repository can not be root and must start with "$/"
solution -> MSYS_NO_PATHCONV=1