Lua: Metatable OOP

Lua has long been hailed as a very flexible language that allows programmers to create features they need from it even if those features do not exist by default. One such notable feature is an object-oriented paradigm that can be implemented in Lua using metatable manipulations. By request of friends, this post will give some basic insight into how this is done. Continue reading Lua: Metatable OOP

Ruby: Extracting ACDSee Metadata

So I’ve recently taken to using the Ruby programming language for writing utility scripts, not for any practical purpose, but because the language looks interesting and I want to try it out. I feel like this utility script might be useful to someone else, so I decided to publish it. It’s a script that extracts embedded and sidecar ACDSee metadata from images – keywords in this case – and stores it in an easy-to-use hash. Continue reading Ruby: Extracting ACDSee Metadata

Useful CS2D Lua Functions: Part II

Recently, I’ve been asked twice about how to check if there’s something obstructing the path from (x1;y1) to (x2;y2). Here I’ll provide two implementations equally useful – to check if there’s something obstructing the way for a player (wall or obstale) and to check if there’s something obstructing the way for a bullet (wall).
Continue reading Useful CS2D Lua Functions: Part II

Useful CS2D Lua Functions: Part I

So, this post will begin a series of posts that provide some useful CS2D Lua functions and explain how to use them. The functions provided are some very popular ones, people constantly ask for them, so this series of posts will allow them to refer to ready code chunks without annoying people on the forums.

A very popular request both in personal messaging and on the forums is, “How do I find the position of an object if it continues to go where it’s facing for X pixels?” Paraphrased, of course, but that’s what people ask, one way or another.
Continue reading Useful CS2D Lua Functions: Part I