Skip to content

Instantly share code, notes, and snippets.

View ArendPeter's full-sized avatar

Arend Peter Castelein ArendPeter

View GitHub Profile
@ArendPeter
ArendPeter / readme.md
Created February 11, 2024 00:42
SOPS Readme

SOPS: Secrets OPerationS

SOPS is an editor of encrypted files that supports YAML, JSON, ENV, INI and BINARY formats and encrypts with AWS KMS, GCP KMS, Azure Key Vault, age, and PGP. (demo)

image


0 90 180 270 h0 h90 h180 h270
A A
B 𐤡 B
C 𝈱 Ɔ C 𝈱
D D
E Ш Ǝ Ǝ E Ш
F 𝈯
G
H H H H
@ArendPeter
ArendPeter / print.gml
Created March 27, 2021 17:24
print.gml
/// @desc Converts args to space separated list, and passes it to show_debug_message
/// @param arg1 First argument of series
/// @param arg2 Second argument of series
/// @param arg3 etc, this is a hack to make it look like var args in auto complete (same as choose())
/// @param ... If you know of a beter was to do this let me know
function print() {
var str = "";
for(var i = 0; i < argument_count; i++){
if(is_string(argument[i]))
@ArendPeter
ArendPeter / CameraFollowPlayer.gml
Created February 5, 2021 16:43
CameraFollowPlayer.gml
// camera follow player
var cam_x = oPlayer.x - camW()/2
var cam_y = oPlayer.y - 150
cam_x = clamp(cam_x, 0, room_width-camW())
cam_y = clamp(cam_y, 0, room_height-camH())
camPos(cam_x, cam_y)
@ArendPeter
ArendPeter / stepTowards.gml
Created February 5, 2021 15:48
stepTowards.gml
/// @desc Returns position which steps the current position toward the target
/// @param current position we're currently at
/// @param target target position
/// @param step how many units to step towards the target
function stepTowards(current, target, step) {
if(abs(target-current) < step) return target
return current + step*sign(target-current)
}
// Because Game Maker's view functions take too long to write :'(
/// @desc Returns y position of camera, and sets first if given
/// @param [y] (optional) new y
function cam_y(yy) {
if(yy != undefined){
cam_pos(cam_x(), yy);
}
return camera_get_view_y(view_camera[0]);