Archive

Archive for the ‘Development’ Category

Catacomb Snatch

november 21st, 2012 No comments

End February Mojang (if you are from an other planet: the makers of Minecraft) participated on a charity event called “The Humble Bundle“.

For this charity they developed in 60 hours a game called Catacomb Snatch, but what you could expect, 60 hours is not much time.

After the charity event was done (they raised over $352.000), the source-code (java) of the game was released into the wild.

What i saw happening (mostly on the minecraft forum’s) was people patching the game up, not looking at each others fixes, others patched the game closed-source and were asking for donations, yes they did!

So i decided to start a Github project for this game, i merged all the patches i could find on the interwebs, builded them, and a guy named Zorro300 (on the minecraft forum) started to advertise my github project on the forums, that it has a merge of all the fixes, it’s open-source and everybody could contribute.
That made it boom so hard, i couldn’t keep up..
over 30 people started committing a load of fixes, new features, new sprites, etc

The same week I registered catacombsnatch.net, installed a jenkins build-server, created an irc-channel on freenode
2 guys made the website and installed the forums.

So this project has been silent for the last couple of months, sometimes i did some patching, but mostly, people don’t have time 😉
An other reason why I’m not that active, my java skills are not that great, i do have basic understanding of programming, this game is quite the challenge.

We do have a lot of idea’s, for example an improved multiplayer system with lobby, where you also can add friends, some kind of ranking system.. etc..
this also requires gameserver system etc..
We also want to port the game to the OUYA game console.

But for these features, we need some people who are better in java, and have some spare time 😉
+ one of the priorities now is abstracting the “rendering” system, so we can add a better system, also that will make it more easy to port to android.

Anyway, this post was long overdue 😉 I’ll see if i can keep this blog a bit more up-to-date.

Categories: Development Tags:

Velleman Kit K8000 and Linux

september 26th, 2010 5 comments

Dit bericht is in het engels omdat zo iedereen het kan lezen 😉

So for a while I own a Velleman k8000 kit.. and now I had the time to do something with it!
I went on a google hunt and came up with the following sites:

These sites had interesting files, but they were a little outdated.
So i started a little project to combine them and updated them to work on my ubuntu system.

The changes i made are available in github

I’m new in driver and python programming, I’m just a phper who started experimenting with python.
So if you see rookie mistakes, please, don’t flame, help and fix it, i would love to learn of it 🙂

Categories: Development, linux Tags: , , , , ,

What i have learned about Cassandra NoSQL DB

mei 12th, 2010 2 comments

NOTE: THIS IS FOR CASSANDRA 0.0.5 (OLD)

Normally I write in dutch, but because the rest of the world doesn’t understand dutch (you should learn our bastard language!), i’ll have to evolve to english (and more international) blogposting. (So don’t shoot me if i make major grammatical mistakes and don’t be a bitch about it!)

I’ll try to keep this post as up-to-date posible

So Cassandra is an NoSQL Database, that means, no SQL language.

I even dare to call it an improved memcached.

First of all i’ll post a couple of links where i learned a lot from

Documentation:

Examples:

Libraries:

There is a List of libraries on http://wiki.apache.org/cassandra/ClientOptions

I’m using the phpcassa lib. (yeah i use php, deal with it)

Since there is a lack of advanced beginner documentation, i have made an little example based on the “wtf is a supercolumn datamodel

$GLOBALS['THRIFT_ROOT'] = 'lib/classes/api/phpcassa/thrift/';
require_once $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/Cassandra.php';
require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php';
require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php';
require_once $GLOBALS['THRIFT_ROOT'].'/transport/TFramedTransport.php';
require_once $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php';

include_once('lib/classes/api/phpcassa/phpcassa.php');
include_once('lib/classes/api/phpcassa/uuid.php');

CassandraConn::add_node('127.0.0.1', 9160);

/**
 * Example based on the blog example of http://arin.me/blog/wtf-is-a-supercolumn-cassandra-data-model
 */
/**
 * what you see next, you need to add to your storage-conf.xml
**/
/**
<Keyspace Name="BloggyAppy">

	<!-- CF definitions -->
	<ColumnFamily CompareWith="BytesType" Name="Authors"/>
	<ColumnFamily CompareWith="BytesType" Name="BlogEntries"/>
	<ColumnFamily CompareWith="TimeUUIDType" Name="TaggedPosts"/>
	<ColumnFamily CompareWith="TimeUUIDType" Name="Comments"
		CompareSubcolumnsWith="BytesType" ColumnType="Super"/>
	<!-- other keyspace config stuff like replication values -->

</Keyspace>
**/

/**
 * Load the ColumnFamilies
 * Normally there you should define the consistancy levels, but that depends on the number of nodes/replication factor or what kind of data it is.
 */
echo "Loading ColumnFamilies..";
$authors = new CassandraCF('BloggyAppy', 'Authors', false, 'BytesType');
$blogentries = new CassandraCF('BloggyAppy', 'BlogEntries', false, 'BytesType');
$tagged = new CassandraCF('BloggyAppy', 'TaggedPosts', false, 'TimeUUIDType');
$comments = new CassandraCF('BloggyAppy', 'Comments', true, 'TimeUUIDType', 'BytesType');
echo "Done.\n";

/**
 * Insert example data
 */

echo "Inserting data..";
$authors->insert("Arin Sarkissian", array("numPosts" => 11, "twitter" => "phatduckk", "email" => "[email protected]", "bio" => "bla bla bla"));
///
$blogentries->insert("i-got-a-new-guitar", array("title" => "This is a blog entry about my new, awesome guitar", "body" => "this is a cool entry. etc etc yada yada", "author" => "Arin Sarkissian", "tags" => "life,guitar,music", "pubDate" => time(), "slug" => "i-got-a-new-guitar"));
$timeuuid_1 = UUID::generate(UUID::UUID_TIME,UUID::FMT_STRING, "i-got-a-new-guitar");
$tagged->insert("guitar", array($timeuuid_1 => "i-got-a-new-guitar"));
$tagged->insert("life", array($timeuuid_1 => "i-got-a-new-guitar"));
$tagged->insert("music", array($timeuuid_1 => "i-got-a-new-guitar"));
$tagged->insert("__notag__", array($timeuuid_1 => "i-got-a-new-guitar"));
//
$blogentries->insert("another-cool-guitar", array("title" => "This is a blog entry about my other guitar", "body" => "this is a cool entry. etc etc yada yada", "author" => "Arin Sarkissian", "tags" => "guitar", "pubDate" => time(), "slug" => "another-cool-guitar"));
$timeuuid_2 = UUID::generate(UUID::UUID_TIME,UUID::FMT_STRING, "another-cool-guitar");
$tagged->insert("guitar", array($timeuuid_2 => "another-cool-guitar"));
$tagged->insert("__notag__", array($timeuuid_2 => "another-cool-guitar"));
//
$blogentries->insert("scream-is-the-best-movie-ever", array("title" => "This is a blog entry about my favorite movie Scream!", "body" => "this is a cool movie entry. etc etc yada yada", "author" => "Arin Sarkissian", "tags" => "movie,horror,", "pubDate" => time(), "slug" => "scream-is-the-best-movie-ever"));
$timeuuid_3 = UUID::generate(UUID::UUID_TIME,UUID::FMT_STRING, "scream-is-the-best-movie-ever");
$tagged->insert("movie", array($timeuuid_3 => "scream-is-the-best-movie-ever"));
$tagged->insert("horror", array($timeuuid_3 => "scream-is-the-best-movie-ever"));
$tagged->insert("__notag__", array($timeuuid_3 => "scream-is-the-best-movie-ever"));
///
$timeuuid_1a = UUID::generate(UUID::UUID_TIME,UUID::FMT_STRING, "Joe Blow");
$comments->insert("scream-is-the-best-movie-ever", array($timeuuid_1a => array("commenter" => "Joe Blow", "email" => "[email protected]", "comment" => "you're a dumb douche, the godfather is the best movie ever", "commentTime" => time())));
//
$timeuuid_2a = UUID::generate(UUID::UUID_TIME,UUID::FMT_STRING, "Some Dude");
$comments->insert("scream-is-the-best-movie-ever", array($timeuuid_2a => array("commenter" => "Some Dude", "email" => "sd[email protected]", "comment" => "be nice Joe Blow this isnt youtube", "commentTime" => time())));
//
$timeuuid_1b = UUID::generate(UUID::UUID_TIME,UUID::FMT_STRING, "Johnny Guitar");
$comments->insert("i-got-a-new-guitar", array($timeuuid_1b => array("commenter" => "Johnny Guitar", "email" => "[email protected]", "comment" => "nice axe dawg...", "commentTime" => time())));
///
echo "Done.\n";

/**
 * Fetch data
 */

echo "\n##FETCHING DATA##\n";
$taggedposts = $tagged->get("__notag__"); // You can change this value
foreach ($taggedposts as $tpost){
	echo "Fetching post: ".$tpost."\n";
	$blogentry = $blogentries->get($tpost);
	print_r($blogentry);
	if (!empty($blogentry)){
		echo "Fetching author info: \n";
		$author = $authors->get($blogentry["author"]);
		print_r($author);
		$numcomments = $comments->get_count($tpost);
		echo "Fetching ".$numcomments." comments for ".$tpost.": \n";
		$commentposts = $comments->get($tpost);
		print_r($commentposts);
	}
	echo "\n##NEXT##\n";
}
echo "\n##END FETCHING DATA##\n";

/**
 * Get a range of posts
 */
echo "\n##GET ALL BLOGENTRIES, YOU CAN ALSO LIMIT##\n";
$blogs = $blogentries->get_range();
print_r($blogs);

///
echo "\nScript Done.\n";

This is a basic working example for the use of the cassandra Basics.
Later i will post some example’s of what i have done in my own production code, like using timestamps as indexes to get some data.
I’ll also post some stuff where i was stuck etc, it should help other people, so look for my future cassandra posts ^^