Skip to content

Instantly share code, notes, and snippets.

View Tricky1975's full-sized avatar
😎
Just doing my thing. Wanna know more?

Jeroen Broks Tricky1975

😎
Just doing my thing. Wanna know more?
View GitHub Profile
#include <iostream>
#include <string>
#include <stdio.h>
using namespace std;
string a{""};
int main(){
for(int i=1;i<=9;++i){
a+=to_string(i);
@Tricky1975
Tricky1975 / Exp.c
Created September 30, 2023 14:34
This was a little program I quickly set up to get the idea how much experience would be required to gain a level. On 1 you need 10 points to become level 2, that's how you should read it.
#include <stdio.h>
#include <math.h>
const char DName[3][10] = {"Easy","Casual","Hard"};
double mul[3] = {0.125,0.25,0.50};
int exppnt[3] = {10,10,10};
// 12345679
@Tricky1975
Tricky1975 / Nice_math.cpp
Created September 25, 2022 15:53
A nice mathematical thing worked out.
#include <iostream>
#include <string>
using namespace std;
typedef unsigned long long ui;
int main() {
char t[20];
for(ui i=1;i<=9;++i){
for(char j=0;j<i;++j) {t[j]=(char)49+j; t[i+1]=0;}
@Tricky1975
Tricky1975 / Info.txt
Created January 12, 2022 19:55
I used this cute BlitzBasic program to pre-render soms sinus effects I needed in other games of mine.
The picture itself was used in a game I scripted in Apollo which I coded in turn in C++.
However for some quick effects BlitzBasic is sometimes a wonderful language due to it's quick syntax and very easy to use compiler.
I used the Blitz3D compiler to be exact.
@Tricky1975
Tricky1975 / 3x+1.bb
Last active August 6, 2021 09:00
This is a kind of formula math professionals appear to avoid... I had to try if I could turn it into a nice effect
Main
Const Cycles = 360
Const Width = 1200
Const Height = 1000
Function Even(a%)
Return a Mod 2 = 0
Program ProtoType;
Uses Crt;
{
I wrote this little program to prototype the geo effect.
I wasn't really sure what the best approach was, so I wrote this
program in Pascal, in DOS, as the DOS environment was the easiest
way to emulate what I needed.
}
@Tricky1975
Tricky1975 / CheckEndian.cpp
Created August 23, 2020 21:27
Just a little routine I whipped up to check if the system the code runs on is LittleEndian or not (now there ain't much BigEndian systems anymore as far as I know, but they are still there, I guess).
#define Test_EndianCheck
typedef union {
unsigned char b[4];
int i;
} ucheck;
namespace TrickyUnits{
bool IsLittleEndian(){
ucheck chk;
chk.i=256;
Init
For i='AZ'
Print(Chr(i))
End
End
// The code above is for my new Neil programming language.
// The output will be that the computer will just sum up the alphabet putting ever letter on a new line.
// This was by the way also my intension, so it's not a bug.
@Tricky1975
Tricky1975 / CreateTargetForAziella.bb
Created March 15, 2020 13:08
Some short 1-sourcefile programs used during the development of Dyrt.NET
; This is a little bit of BlitzBasic code, I used to quickly
; create the targets Aziella can shoot with her crossbow in
; order to solve puzzles.
;
; In the end I used BlitzPlus to run the program (it should
; also work in Blitz3D, but for some odd reason the second
; flip command is systematically ignored by Blitz3D)
;
; I used this program also to create a bit of lighting effect
; in the target.
@Tricky1975
Tricky1975 / Study_SelfIndexingClasses.cs
Created August 5, 2019 09:22
Study how to make a class myself handling indexes
/*
This was a study source on how to do indexes of my own in C#.
This study can really broaden my views on a few things in C#, and maybe also help me to get rid of a few issues I'm currently suffering in C#
*/
using System;
class test {
public string this[string key] {