caustik's blog

programming and music

I have a blog?

with 2 comments

It’s dusty.

Written by caustik

January 21st, 2012 at 9:04 am

Posted in Uncategorized

Sprites website

without comments

I got around to putting together a little web site for the Sprites app.

Check out http://sprites.caustik.com/

Written by caustik

August 1st, 2011 at 11:44 am

Posted in Programming

Tagged with ,

Where’s caustik?

with 9 comments

Geesh haven’t updated this blog in a while. I’ll do this mini update at least..

Took a new job at opencandy (some really cool stuff in the pipeline there!), still pushing out DJ mixes here and there over at my soundcloud page (caustik’s sound cloud). Create a soundcloud account if you haven’t got one already and make sure to add me =)

Every once in a while I’ve been working a bit on this app that lets you create sprites that can walk around your desktop and interact with your windows and each other. Here’s a little screenshot. It’d be cool to talk with some of the guys who run sprite repository web sites and get a bunch of characters created =)

Here’s the latest build. Just drag and drop an .spr file or any image file on the executable and it should drop on your desktop. You can drag and throw them around, and you can click the sprite/image and press left/right/up/down/space to move it around. It’s fairly basic right now, but the plan is to make them able to walk around by themselves and interact more, etc.

sprites

oh, and double click to exit. if you drag and drop a bunch of them, they all open in one instance and double clicking on one will close them all. have fun =)

Written by caustik

January 7th, 2011 at 10:34 pm

Fix for multiple monitors with fullscreen games

with 3 comments

There’s a pretty annoying issue that happens in windows when you are playing a game in fullscreen on one monitor, and have a second (or third, fourth) monitor with other stuff open on it. If your game is playing at a resolution that is different than your normal desktop resolution on that monitor, everything gets all moved around on the other monitors.

To fix this, I wrote a tiny utility program which you can run before you start the game, and it fixes this behavior by calculating what the correct location should be for all your windows and moving them there. It’s useful if you like having IM windows open, notes or a web browser, etc. You can’t interact with those programs while you’re in the game, but at least you can *see* them (for example, if you have a strategy guide or map, etc open)

Of course, I’m not responsible for any damage this program does to your computer. I’ve tested it a fair amount, but it’s entirely possible somebody with an unusual setup could find a situation where you may lose a program’s window due to it being positioned in the wrong place.

Let me know if this is useful, I’ll try to improve it and turn it into a proper project.

fsfix

caustik

Written by caustik

September 6th, 2010 at 4:28 am

Posted in Games,Programming

Tagged with , ,

Mini-Mix 014 (2010.07.31) [Trance]

without comments

01. Max Graham – Dusky 2010 (Does She Know Yet) (Original Mix)
02. Beat Service – Waiting For The Sun (Original Mix)
03. Solar Stone, Sirocco – Destination (Original Mix)
04. Glenn Morrison ft Cathy Burton – Symptoms Of A Stranger (Original Mix)
05. Liquid Nations – Ride (Airwave Remix)

Favorite audio plugins : http://varietyofsound.wordpress.com/

Written by caustik

July 31st, 2010 at 11:06 pm

Vuvuzela (Caustik Remix)

with one comment

Vuvuzela (Caustik Remix) – in Bb Major


Written by caustik

June 18th, 2010 at 11:11 pm

Parallel Intervals 002 [Techno]

with one comment

Parallel Intervals 002 [Techno]

01. Spiriakos, Steen – DC (Original Mix)
02. Jean Simon – Berreando La Cometa (DJ Cristiao Remix)
03. Josh Love – Red Hants (Original Mix)
04. Jan Waterman – Retro Modernized (Original Mix)
05. Odessa SoundFreaks – Nachos (Original Mix)
06. Nikola Vujicic – Fresh Sound (Original Mix)
07. Prude Polly & DJ Cristiao – Hot Stu (Original Mix)
08. AudioKlinik – Hustle and Bustle (Fer BR Remix)
09. Noisebud – Fuckin Vacation (Roce Remix)
10. Alexey Kotlyar feat. Robbie Sommers – Your Secret (Scared)
11. Jeff Only – Rhythm Connection (Original Mix)
12. Spiros Kaloumenos – Wireless (Original Mix)

Written by caustik

May 13th, 2010 at 4:30 am

Mini-Mix 013 (2010.05.11) [Progressive Trance]

without comments

01. Poshout – The Mind Games (Cramp Remix)
02. M6 – The Flow (Original Mix)
03. David Murtagh – Four Miles Away (Original Mix)
04. System F – Elevate (Dan Brazier Remix)
05. Kay D. Smith & Marc Tall – Hoipolloi (Wippenberg Mix)

Written by caustik

May 13th, 2010 at 4:29 am

May 2010 DnB Pulse

without comments

01. Logistics – Warehouse (IllSkillz remix)
02. Tantrum Desire feat Cabbie – Failure To Engage (Original Mix)
03. Jubei ft. S.P.Y. – Project 1 (Original Mix)
04. Dephzac – We Are Together (Original Mix)
05. The Square – Everything Disappears (Original Mix)
06. Sensai and Heist – Interrogate (Original Mix)
07. DJ Marky & SPY – Fang Face (Original Mix)
08. Netsky – Memory Lane (Original Mix)
09. Netsky – Your Way (Original Mix)

Written by caustik

May 10th, 2010 at 9:32 pm

Prettier C/C++ code using explicit scope

with 3 comments

Probably the single most impactful epiphony I’ve had in my years of programming in C/C++ is discovering the ability to provide explicit scope inside a function. For snippets of code that are conceptually self-contained, but only used once in the program, they improve readability, provide optimization hints to the compiler, and are just kind of cool =)

Here’s some “before” code, like you’d expect to see throughout C source code:

int func1(int param1, int param2)
{
    int ret = GREAT_SUCCESS;
    int tmp1, tmp2;
    structType struct1;
    otherStructType struct2;

    struct1.val1 = param1;
    struct1.val2 = 20;

    /*! do something */
    ret = func2(&struct1);

    if(FAILED(ret)) { return ret; }

    struct2.whatever = param2;
    struct2.somethingElse = 4;

    /*! do something else */
    ret = func2(&struct2);

    if(FAILED(ret)) { return ret; }

    return ret;
}

The variables are declared at the top of the function, the parameters for each function call
are determined, the struct parameter is filled out, return code checked.

Compare to using explicit scope:

int func1(int param1, int param2)
{
    int ret = GREAT_SUCCESS;

    /*! do something */
    {
        structType struct1;

        struct1.val1 = param1;
        struct1.val2 = 20;

        ret = func2(&struct1);

        if(FAILED(ret)) { return ret; }
    }

    /*! do something else */
    {
        otherStructType struct2;

        struct2.whatever = param2;
        struct2.somethingElse = 4;

        ret = func2(&struct2);

        if(FAILED(ret)) { return ret; }
    }

    return ret;
}

What this has accomplished is your eyes immediately see that “do something” and “do something” else
are functional blocks, which you can quickly read as independent units. In addition, you can very
easily tell that the function simply “does something”, then “does something else”, then returns the result.

Each functional block has it’s variables declared only inside it’s explicit scope. So you don’t have this huge block of declarations at the top of your function, making things much easier to read. Also, the compiler now knows without ambiguity which variables are used where, which can help optimize it’s memory usage (e.g. it can re-use stack space instead of reserving it all at the top).

To me, the difference is night and day – and this is only a really simple example. Try it out on some
more complex code, and watch your code quality/readability improve. This works in both C and C++, it’s
particularly great for C since you normally are forced to declare your variables at the top of the function.
When you explicitly declare your scope, this is no longer the case! Really, C just makes you declare at the
start of {} blocks.

Written by caustik

April 12th, 2010 at 12:37 am

Posted in Programming

Tagged with