Skip to content

Instantly share code, notes, and snippets.

Tutorial 1: Introduction and basic setup.

  1. Overview:

In this tutorial, you will learn how to easily set up a development environment that will allow you to start learning and coding right away, with multiple helpful features that will make it easier, and the material you will start with will be making simple games using the Love2D framework.

Unlike most tutorials on the internet, I'm not going to focus on grinding down basic programming concepts and practices into you,

First some context. There's a pretty cool old(er) game about exploration, colonization and programming called Colobot that got opensourced recently (github) and I found out that it has a somewhat active (Polish) community and they're working on improving, fixing, porting, etc. the game.

Now, this was one of my favorite childhood games and I had literally dozens of different visions as to how a potential sequel could look and decided that it's always better to do something than do nothing and just talk about my ideas, so I started with what I know best(better than 3D graphics and physics at least), which is programming language design (and also happens to be my favorite topic in all of IT, just how cool is that?) and work on designing an educational but powerful programming language.

A question most people would ask is why I won't just use Python or some other simple language. I say: While many of these languages are good, simple and powerful, I believe that if the main

var WOLFRAM_KEY = "<API KEY GOES HERE>";
var local_cache = {};
function wolfram_api_call(query, key) {
var response = UrlFetchApp.fetch("http://api.wolframalpha.com/v2/query?input=" + encodeURIComponent(query) + "&appid=" + key + "&format=plaintext");
var xml = XmlService.parse(response);
var root = xml.getRootElement();
@Asmageddon
Asmageddon / Lua snippets
Last active August 29, 2015 14:06
Lua util functions - pretty-printing, defaultdict, etc.
Just some Lua snippets.
@Asmageddon
Asmageddon / h3-type-system.md
Last active August 29, 2015 14:21
The type system of h3

Type system of h3(working name)

  1. Basic types:

Integer family:

Integer numbers. Includes:

  • Int - largest native signed integer type available on current architecture
  • Differently sized signed and unsigned integers
// Syntax notes:
// Blah!Int is generic type application, equivalent to C++'s Blah<Int>
// Ptr!Type is a pointer to a Type object
// Type? is Option!Type, e.g. either a Type object, or None
// Semantics notes:
// struct is a C-style struct
// union is a typed union, e.g. union!(A, B) can be either A, or B, but not at the same time
// Type notes:
// Splashmap is a map with multiple key and value types, where keys map to only some of the types
// For example, in Splashmap!((A, A), (A, B), (B, B)):
@Asmageddon
Asmageddon / filetype.balls.conf
Created August 26, 2011 13:29
KoL combat script(BALLS) syntax file for Geany
[styling]
default=default
number=number
word=keyword
string=string
word2=commentdoc,bold
classname=type,bold
defname=function
operator=keyword2,bold
identifier=default
@Asmageddon
Asmageddon / main.c
Created September 4, 2011 16:14
Intercept and modify messages sent by libpurple(fails)
#include <glib.h>
#include <glib-object.h>
#include <dbus/dbus.h>
#include <dbus/dbus-glib.h>
#include "marshal.h" /* The file generated from marshal.list via tool glib-genmarshal */
//VOID:INT,STRING,STRING - put into marshal.list
//glib-genmarshal --header --prefix=marshal marshal.list > marshal.h
//glib-genmarshal --body --prefix=marshal marshal.list > marshal.c
//Compile with: "gcc -MMD -Wall -ggdb -O -pthread -I/usr/include/dbus-1.0 -I/usr/lib/i386-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -pthread -L/usr/lib/i386-linux-gnu -ldbus-glib-1 -ldbus-1 -lpthread -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 marshal.c main.c -o main"
@Asmageddon
Asmageddon / passwordstrength.py
Created December 25, 2011 12:55
Evaluation of password security for sequences of random characters and words
import random, math
import re
def log_bin(value):
return math.log(value) / math.log(2)
def cumprod(values):
result = 1
for i in values:
result *= i
@Asmageddon
Asmageddon / gist:1699128
Created January 29, 2012 14:48
Stub of a simple wxpython clipboard manager
#!/usr/bin/python
# -*- coding: utf-8 -*-
import wx
TASKBAR_ICON = "icon.png"
class ClipmanIcon(wx.TaskBarIcon):
def __init__(self):
wx.TaskBarIcon.__init__(self)
self.icon = wx.IconFromBitmap( wx.Bitmap(TASKBAR_ICON) )