Skip to content

Instantly share code, notes, and snippets.

@deniska
deniska / hello.asm
Created May 29, 2025 18:38
simple unconventional uxn assembler
org 0x10
Console:
.vector: rb 2
.read: rb 1
.pad: rb 4
.type: rb 1
.write: rb 1
.error: rb 1
org 0x100
import random
import math
import PIL.Image
funcs = [
('add', 2, 1),
('mult', 2, 1),
#('atan2', 2, 1),
#('floor', 1, 1),
#('ceil', 1, 1),
@deniska
deniska / tree.c
Created September 17, 2024 09:04
#include "raylib.h"
#include <math.h>
const int WIDTH = 1800;
const int HEIGHT = 900;
const float MIN_ANGLE = 0.0f;
const float MAX_ANGLE = M_PI/1.5;
void DrawTree(float, float, float, float);
@deniska
deniska / AndroidManifest.xml
Created July 13, 2024 13:16
Example of building raylib app for android
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" package="org.example.pongpong">
<uses-sdk android:minSdkVersion="29"
android:targetSdkVersion="29" />
<uses-permission android:name="android.permission.SET_RELEASE_APP"/>
<application android:debuggable="true" android:hasCode="false" android:label="PongPong" tools:replace="android:icon,android:theme,android:allowBackup,label" android:icon="@mipmap/icon">
<activity android:configChanges="keyboardHidden|orientation" android:label="PongPong" android:name="android.app.NativeActivity" android:exported="true">
<meta-data android:name="android.app.lib_name" android:value="pongpong"/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
@deniska
deniska / pongpong.c
Created January 30, 2024 17:49
pongpong, simple raylib based doodle
#include <stdlib.h>
#include <raylib.h>
#include <raymath.h>
const int SCREEN_WIDTH = 600;
const int SCREEN_HEIGHT = 600;
const int BOX_SIZE = 30;
#define BALL_SIZE (BOX_SIZE/3)
@deniska
deniska / build.sh
Created November 1, 2022 15:51
Call go code from python
#!/bin/sh
set -xe
go build -buildmode c-shared -o libhello.so hello.go
.venv/bin/python build_hello.py
@deniska
deniska / CMakeLists.txt
Created September 18, 2022 06:23
CMakeLists.txt for raylib based android project
cmake_minimum_required(VERSION 3.18.1)
project("raylibtestproject")
add_library(main
SHARED
raylibtestcode.c) # my source files
set(PLATFORM Android CACHE STRING "" FORCE)
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Hello world</title>
</head>
<body>
<canvas id="c" width="640" height="480"></canvas>
<script src="lib/twgl-full.js"></script>
<script src="texturebatch.js"></script>
@deniska
deniska / rectool.sh
Created December 11, 2014 18:16
Streaming to twitch using ffmpeg
#!/bin/bash
WIDTH=1280
HEIGHT=720
XPOS=1500
YPOS=200
read KEY < ~/.twitch_key
URL="rtmp://live-prg.twitch.tv/app/$KEY"