?

Log in

SITE MOVED

Jan. 1st, 2020 | 12:00 am

I have moved back to neftaly.com.

Please update your bookmarks.

Link | | Share

Javascript Image Slider

Aug. 26th, 2010 | 02:30 pm

Image sliders are useful for displaying featured content, advertising banners, etc.
I had trouble finding one that didn't rely on an external library, so I made my own.



Code behind the cutCollapse )

It's currently configured for 3 banners at 750x300px, will auto-cycle every 5 seconds and has been tested in the latest IE, FF and Opera.

Link | | Share

PagedGeometry - Python-Ogre vs OGRE

Jan. 13th, 2010 | 01:02 am

Python-Ogre is a wrapper for the C++ OGRE. Here's a fairly inaccurate comparison using DX9 with 8x AA, showing the PagedGeometry library (different lighting, different forest propagation vars, etc).


Left: Python-Ogre, 39FPS
Right: OGRE (C++), 41FPS

I get 100-150FPS using Python-Ogre with AA off, and 200-300FPS with pure OGRE.
It may seem like a large difference, but is really the result of different lighting settings, extra unused libraries, etc.

Link | | Share

Simple templates

Apr. 23rd, 2008 | 12:36 pm

This is the basis for an extremely simple (yet fast & effective) PHP templating/MVC system.
include.php:
<?
function content($buffer) {
	/* Auto-templating function */ 
	if (@TEMPLATE === false) {
		return $buffer; 
	} else { 
		include "template.php";	
		return $template; 
	}
}
ob_start("content");
?>

template.php:
<?php $template = <<<TEMPLATE
<html>

<head>
<title>title</title>
</head>

<body>
{$buffer}
</body>

</html>
TEMPLATE;
?>

To use it, just add include("include.php"); anywhere in your script.

Link | | Share

UPC Barcodes

Mar. 14th, 2008 | 08:47 pm

Please note that my main site will be down for a while, and thus none of these examples will work.

UPC barcodes are pretty easy to do in Javascript. This particular script takes a product name and 10 digit UPC barcode, adds a prefix, calculates the checksum and draws it.


UPC.draw("Product Name", "1234567890");

Download UPC.zip here.

Link | | Share

Experiements with <canvas>

Oct. 30th, 2007 | 10:22 am

This is a little something I put together as a test of the <canvas> element. It is derived from the aussie game "Puzzle Quest" and requires either FF or Opera. I'll take it down in a few days (as the artwork I've used isn't mine).
HappyQuest.

The XML driving the map/spritesCollapse )

Link | | Share

Guitar effects unit

Feb. 5th, 2007 | 09:19 pm

This is a couple of circuits in one - a distortion pedal, a wah-wah, an amplifier and a pre-amp (similar to my last post). It's all powered by a couple of sealed lead-acid batteries.

 

I'm trying to get my hands on a few Bakelite knobs and some antique-looking speaker fabric, to make it look like a 40's era radio.

Link | | Share

Pre-amplifier

Jan. 27th, 2007 | 08:23 pm

Here's a pre-amp I recently built - I'm particularly happy about how the case came out.

Link | | Share

Worldbender Editor - what do you think?

Sep. 16th, 2006 | 11:15 pm

The Worldbender Editor is an isometric level-editing system written in JavaScript.
There's a demo map here. Try it out and tell me what you think!

Link | | Share

Neftaly's magical IE PNG renderer

Sep. 4th, 2006 | 11:30 am

Here's my take on a PNG Alpha rendering hack for IE.

Code behind the cutCollapse )

Link | | Share