Archive for the ‘Code’ Category

2013-02-02

Old stuff to start with One Game A Month – IOCCC19 Billiards


IOCCC19 Billiards
A failed attempt at taking part in 19th IOCCC.

There’s a new “One Game A Month” project which has just started at January, with aim for developers to make game each month for a year (or more). Although it’s February already, there’s still time to start and submit for January as well, the first month being a special case where you can submit late entries.

I didn’t do anything new for the January and thought about skipping that month already, but then I decided I could just add some older thing for the January entry, and here it is…
(more…)

2012-04-14

LD22: LIFELONE

22nd Ludum Dare contest was held late last year. Now that it’s going to be held 23rd time next weekend, I thought maybe it’s finally time to add a page and posting about my entry to the last one!

So, for the #22 theme was “Alone”, weirdly somewhat close to theme used for 20th LD48. I made a wannabe-artsy-moody game called LIFELONE which tries to convey feelings of loneliness. Or something. Check it out.

2011-12-16

Scanline

Back in October, we wanted to attend the forthcoming Alternative Party event. I think one could say it is a demoscene event, but with a broader or different scope or goals – for example, encouraging or embracing artistic expression with niche platforms (either niche by being rare, or niche by being so old).

So, we thought about taking part in the alternative demo competition. The platform is mostly free choice there, but the compo name itself directs you to think about something different. I thought that maybe it could be interesting to make a demo which would consist of only a single static line with changing colors, and try to take most of that limitation. That is, to make a “1-Dimensional Demo” (at least by my definition).
(more…)

2011-06-04

Better looking anti-aliased lines with simple trick

Here’s some notes about anti-aliased lines.
For these tests of rendering anti-aliased lines my goals were roughly as follows:

  • relatively high-quality anti-aliased lines (better than subsampling or postprocessing)
  • simple low-tech solution extendable to wide range of platforms (e.g. not relying on availability of shaders)
  • visually better consistency than what you get if you just ask graphics API to anti-alias lines for you, and you might not even get any if the hardware is lacking
  • try to solve issue of anti-aliased lines showing a “roping” effect
  • concentrate on case of single lines without yet going to additional complexities such as line caps or joins between multiple lines

(more…)

2011-06-01

LD20: Guinea Pig Warrior

20th Ludum Dare contest was held a few weeks ago. The given theme was “It’s Dangerous to go Alone! Take this!”. I created a little platformer where the player character has a temporal projection sidekick. Check out Guinea Pig Warrior.

2011-03-05

LD19: Drill Warrior

19th Ludum Dare contest was held already back in December. Since I managed to make an entry this time, I figured out I could post about it before the next one is held, which will be probably next month.

The theme was “Discovery”. Description, downloadable Windows build and source code of my game Drill Warrior can be downloaded from the separate page about the game.

2010-07-04

Various ways to backup

Over the years I have been using several kinds of solutions to backup stuff. Here’s a description of the ones I can remember. Many of them focus on being low-cost, simple and straightforward, but are far from a perfect solution in many other ways.

(more…)

2010-06-29

Unwrapping Values – nearest next angle from a previous angle

So, assuming you have angles previousAngle and nextAngle, and you want to transition from the first to the second smoothly. If it’s like from 358 to 2, a simple linear interpolation will awfully go through almost a full circle down from 358 to 2, when a simple four degree transition forward would have been enough, i.e. you should have been going to 362 degrees instead. So, how to figure out what’s the shortest transition?

I remember hitting against this problem numerous times, always remembering that I have solved it previously but always seem unable to find the previous solution. And I still can’t just write it out by heart.

Once again I had to solve this, so this time I tried to Google for it (“angle wrap delta”), and found out that somebody named Jason S had posted a nice generalization to a related question in Stackoverflow.com.

For your convenience, I’m posting a modified C version of the code here.
(more…)

2009-12-11

Little framework for making prototypes or an LD48 entry

If you didn’t know yet, the Ludum Dare 48 hour game development competition is held again this weekend. In the competition the idea is to make a game using a given theme, more or less from scratch. Basically most people use some small amount basecode to start up with as there’s not really that much point to make every boring bit (like how to open a window) again every time. Besides, a little framework still has less stuff than what fine tools such as Unity3D provides you with to start with. :)

So here’s my little C++ basecode/framework for making a Ludum Dare 48 hour game development competition entry. It should be equally suitable for making some other little prototype games. You’ll need to svn checkout Irrlicht and download FMOD 3 separately. The framework is meant to be used on Windows with Microsoft Visual C++ 2008 (Express Edition is enough).

framework_LD48_tonic_200912.zip

2009-11-10

Code: Tokenizer

Here’s a little C++ utility class for splitting C strings into tokens by given separators. It’s inspired by “tokenwad” taken from Sol’s CFL3, which I have used quite a few times. This version has low memory overhead as it performs only 1-2 allocations (depending if the tokenization is done in-place or a separate copy is needed).

(more…)