Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Ikkerens

Pages: [1] 2 3
Minecraft Discussion / Minecraft HUGE bomb
« on: October 30, 2011, 06:27:26 am »
For those willing to try,
this is a bomb consisting of 9.085.440 tnt

It is triggered a few seconds after entering the world, since it is in touch with lava :)

(TNT as far as the eye can see :P)

Minecraft Discussion / Note to self: TNT is dangerous
« on: October 27, 2011, 01:17:36 pm »
Noreally, it's dangerous. That used to be my house. *.*

Web Programming and Design / Javascript Element Selection Engine
« on: October 04, 2011, 07:54:51 am »
Wrote a little code which allows you to select elements within an html page (using a drag selection field)
All you have to do to make it "selectable" is add the selectable class :)
Code: (html) [Select]
<title>Selection field</title>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
var mouseX = 0, mouseY = 0, startX = 0, startY = 0, colliders = [];

window.onmousedown = function() {
$('#selector') .css('position', 'absolute')
.css('opacity', 0.50);

startX = mouseX;
startY = mouseY;

$('#selector').css('left', startX);
$('#selector').css('top', startY);


window.onmousemove = function(e) {
//Set mouse values
mouseX = e.pageX;
mouseY = e.pageY;

//Positioning values
var tX, tY, w, h;

//Calculate X
if ( (mouseX - startX) >= 0 )
tX = startX;
w = mouseX - startX;
tX = startX + ( mouseX - startX );
w = (mouseX - startX) * -1;

//Calculate Y
if ( (mouseY - startY) >= 0 )
tY = startY;
h = mouseY - startY;
tY = startY + ( mouseY - startY );
h = (mouseY - startY) * -1;

$('#selector').css({ left: tX, top: tY, width: w, height: h });

//Check for collision
//Private function to detect collision (called twice, once horizontal, once vertical)
function cps(p1, p2) {
var x1 = p1[0] < p2[0] ? p1 : p2;
var x2 = p1[0] < p2[0] ? p2 : p1;
return x1[1] > x2[0] || x1[0] === x2[0] ? true : false;

//Store the selector position data in this array
var sel = [[tX, tX + w], [tY, tY + h]];

$.each(colliders, function(key, i) {
var selectionBorder = ( cps(sel[0], this[1]) && cps(sel[1], this[2]) ) ? '1px solid black' : '1px solid white';
if ( $('#selector').css('display') == 'block' )
$(this[0]).css('border', selectionBorder);

return false;

window.onmouseup = function() {

function init () {
$('.selectable').each(function (key, i) {
var pos = $(this).position();
colliders.push([this, [ pos.left, pos.left + $(this).innerWidth() ], [, + $(this).innerHeight() ] ]);
<body onload="javascript:init();">
<div class="selectable" style="position:absolute;left:500px;top:500px;width:100px;height:100px;background-color:red;border:1px solid white;"></div>
<div class="selectable" style="position:absolute;left:800px;top:200px;width:100px;height:100px;background-color:blue;border:1px solid white;"></div>
<div style="background:lightblue;border:1px solid blue;display:none:position:absolute;width:0px;height:0px;left:0px;top:0px;z-index:9001" id="selector"></div>


Edit 2: Added transparency, added red cube to test transparancy
Edit 3: Added collision detection, morphed it into a selection engine (couldn't resist :P), added blue cube to test multi-selection, people could use this in any application.
Edit 4: Moved the show() so that it doesn't flicker :)
Edit 5: Edited live demo to show potential and how selected items can be used.

Feel free to use this entire engine (with author credits), or snippets of it (no author credits needed)

Web Programming and Design / My new web project... it's coming...
« on: September 28, 2011, 11:21:07 am »

(That doens't have any texture, that's just me testing lightning  *.*)

Computer Programming / Runtime Javascript Minifying/Obfuscation
« on: September 19, 2011, 03:11:15 pm »
So, recently I've been working on my own webserver, which is now fully functional.
And I came across the part where I wanted my javascript to be minified as soon as the server started up.
This is to save bandwidth blah blah blah...

Anyway, so I've been googling to find a way to do this.
The first thing I came upon was YUI compressor, the downside, this program was meant to be executed using command prompt/terminal, and used to read/save into files.

Absolutely useless in the first case, until I looked into YUI's source.

So, to save alot of users some googling time, or even googlers that manage to get here, here's a way to use YUI compressor on a string, and to result a string.

1. Download YUI compressor, and add the source to your classpath as library.
2. Import the following:
Code: (java) [Select]

import org.mozilla.javascript.EvaluatorException;
import org.mozilla.javascript.ErrorReporter;


And you should import rhino-1.6R7.jar to your classpath. (Found at /Your YUI folder/lib )

The code
Code: (java) [Select]
String TheJavaScriptString, MinifiedJavaScriptString;
Reader reader = new StringReader(TheJavaScriptString); //Obviously this should point to your string with javascript code
try {
JavaScriptCompressor JSCP = new JavaScriptCompressor(reader, new ErrorReporter() {

public void warning(String message, String sourceName, int line, String lineSource, int lineOffset) {
if (line < 0)
System.err.println("\n[WARNING] " + message);
System.err.println("\n[WARNING] " + line + ':' + lineOffset + ':' + message);

public void error(String message, String sourceName, int line, String lineSource, int lineOffset) {
if (line < 0)
System.err.println("\n[ERROR] " + message);
                        System.err.println("\n[ERROR] " + line + ':' + lineOffset + ':' + message);

public EvaluatorException runtimeError(String message, String sourceName, int line, String lineSource, int lineOffset) {
error(message, sourceName, line, lineSource, lineOffset);
  return new EvaluatorException(message);
Writer out = new StringWriter();
JSCP.compress(out, -1, true, false, false, false);
MinifiedJavaScriptString = out.toString();
} catch (EvaluatorException e) {
} catch (IOException e) {

At the first line, we "convert" the string to a reader, since YUI only supports types of the reader format.
Originally, YUI gives a FileReader as argument. But this'll do as well.

Since all of the compression magic happens in the JavaScriptCompressor class, we'll call this.
We give it 2 arguments, 1. reader, our string, and 2. an errorreporter. YUI seems to use this to report errors.
You can basically ignore the errorreporter part, since I didn't write it and directly copied it from the YUICompressor class, nothing special here.

After creating the JSCP instance, we'll create a writer (opposite of reader, dôh), but instead of a FileWriter, a StringWriter, since we'll be outputting to a string.
JSCP.compress is YUIcompressor's function to output the code.
This compress function has 6 arguments.
1. the writer, here our stringwriter.
2. the line-break position, not used here: -1
3. munge, do you want the code obfuscated?
4. verbose, output warnings?
5. preserve all semilocons, if false, YUI will check of some semilocons are no longer neccasary.
6. optimisations, do you want YUI to automatically optimize your code?

Then, at last, we let StringWriter output a string, which can then be used for whatever you like...

The End
Well, that's it, if you have any questions feel free to ask them here.

YUI compressor is not owned/produced by me and the license included (LICENSE.txt) should provide you with all the licensing information you need.

Web Programming and Design / Vanthia Open Beta [javascript mmorpg]
« on: September 16, 2011, 07:30:02 am »
Some of you may already have heard of it (mostly when I spoke of it)
But the Vanthia Open Beta has begun.

You need a facebook account to play:

Miscellaneous / LiveStream
« on: April 08, 2011, 01:58:38 pm »
Well, as some of you have seen on IRC now, I will (from now on) stream as much as possible when gaming or making Splut for Android.
This stream will be available at:

Ofcourse, this won't be online at ideal times, since most of us live in different timezones,
therefore all my streams are being recorded (see below player), in which you can preview earlier streams of mine.

Have fun watching ^^

For thise interested in my World of Warcraft profile, here is my armory link:

General Discussion / [Request] Background music for android splut
« on: March 23, 2011, 02:10:22 pm »
I don't know if this is the correct forum for this, but no one responded on IRC, so feel free to move if this isn't in the correct place.

Well, ofcourse the Android Phone is capable of playing sounds and music.
I did try some attempts on my own to make music with FruityLoops, but it seems I'm not really that much of a sound-person ^^

For those who don't know Splut:;sa=view;down=577
And I'm porting it to the Android platform.

To the point:
I need several music files (prefered in the ogg/vorbis format, not required though, I can convert myself) based on the following list:
And, they need to be loopable (if the song expires, it immediatly starts over again)

*Cheerful main menu music
*Cheerful in-game music (slightly a more adventurous style)
*Evil environment in-game music
*Slightly sad (not too sad) in-game music

Il update this list as I think of more types.

Thanks in advance.
(Btw, ppl that help will get a share on the profits ofc) (But then again, I can't share what I don't have (yet, I hope))

Art / [Request] Pixelart for Android Splut
« on: March 17, 2011, 03:43:44 am »
So, as some of you might know, I've been working on a Android version of Splut  :w00t:
But, as most of you know, I suck at making graphics ^^

So basically, to the point:
I need several 128x128 full-colored tiles for Splut, as I've got my tilemapper working recently.
If you need some inspiration, or want to know what game I am talking about:;sa=view;down=577

And I need the following tiles:
-A block
-A smiley
-A wall (sides of the screen, doesn't have to be a wall, just something that looks good at the sides)
-A flag (and most likely some other goals will be requested later)
-A cookie
-A portal

Computer Programming / [Java] What's going wrong?
« on: March 02, 2011, 02:29:08 am »
Well, the Android version of Splut is slowly coming along, if the language would stop being so pricky  :mad:
Anyway, I was wondering if anyone could help me with this,

I have 2 screens (XML format, named gamescreen & main), and at the moment I'm testing it.
Both buttons work, unless I return to the previous screen.
(Basically, I press 1 button to go to gamescreen, works, press the button to go back to the main, works, try to go the gamescreen again, fails.)
Code: (java) [Select]
package com.walotech.splut;

import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;

public class Main extends Activity {

    public void onCreate(Bundle savedInstanceState) {
     //Prepare screen
     //Set landscape orientation
     //Remove title bar
     //Remove taskbar
     //Load XML for UI
        //Assign buttons
        findViewById( Button.OnClickListener() {
public void onClick(View v) {
       findViewById( Button.OnClickListener() {
public void onClick(View v) {
        findViewById( Button.OnClickListener() {
public void onClick(View v) {
Button StartButton = (Button) findViewById(;
    public void AB_main() {
        findViewById( Button.OnClickListener() {
public void onClick(View v) {
        findViewById( Button.OnClickListener() {
public void onClick(View v) {
Button StartButton = (Button) findViewById(;
    public void AB_gamescreen() {
     findViewById( Button.OnClickListener() {
public void onClick(View v) {

Already figured it out, seems I was redefining something that was already given in a function ;)

Miscellaneous / Computer Specs
« on: February 16, 2011, 03:46:52 am »
I'm sorry if there is already a thread like this, but I couldn't find it.
Well, I thought, why not post our computer specs (so, not your calc's) (no, really, don't) (I'm serious!)

*Windows 7 - 64 Bit
*Tower: Cooler Master HAF 922
*Processor: AMD FX-8150 3.60GHz 8MB
*Ram: 6 x G.Skill Ripjaws F3-12800CL7T2-24GBRMD (24gb kit)
*Graphics Card: 2 x XFX Radeon HD 5970 Black Edition Limited (CrossFire)
*Mother Board: Asus Crosshair IV Formula
*Power Supply: Innovatek Cool-Power Pro 850W
*Storage: Seagate Constellation ES.2 ST33000651NS, 3TB
*Storage 2 (SSD): OCZ SATA II 2.5" SSD 400GB

Gaming Discussion / [SC2] A suprising ending
« on: February 16, 2011, 03:23:30 am »
Well, this is quite an epic battle between 2 players:
Yourmydinner (on omnimaga known as SJ1993)
Provider (which I do not know)

Can't tell you much about it, since that would spoil the battle.
Have fun ;)
(Its zipped because I can't upload .screplay's here)

Humour and Jokes / Google agrees!
« on: February 10, 2011, 12:41:23 pm »

Go to the last page, and find out who number 7 is.
Not giving any spoilers.
Spoiler For Spoiler:
You actually thought I'd tell you without trying?

Humour and Jokes / A poem
« on: February 07, 2011, 07:44:24 am »
To further exclude any aspects that we could
have missed. We will make dure that all
endings created in the last 5 years are sealed.

Great idea, was the first reaction of most people.
apperantly everybody loved it. But ofcourse
my main concern was becoming real.
Even though we sealed it, we still lost.

Written by Jeroen Slot (SJ1993)

Web Programming and Design / This... is... bad...
« on: February 02, 2011, 09:22:10 am »
Well, today I found out how my ICT school teacher teaches how to make a website.
I requested a friend of mine her code to inspect it for any minor improvements...
But this actually made me cry :(

Code: (html) [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<title><De vijf beste pretparken in de wereld!</title>
<body bgcolor="#CCCCFF" text="#006666" link="#666633" vlink="#009933" alink="#666699">

<H1>&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;     <FONT COLOR="black"> De vijf beste pretparken in de wereld! <FONT> </H1><BR>
<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="disneyland parijs.JPG" width="289" height="379" border="0">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="disneyland tokyo.JPG" width="282" height="375" border="0">
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=5>Disneyland Parijs<FONT>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=5>Disneyland Tokyo<FONT>
<BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="everland.JPG" width="546" height="306" border="0">
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=5>Everland<FONT>
<BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="magic kindom park.JPG" width="438" height="294" border="0">
&nbsp;&nbsp;&nbsp;&nbsp;<img src="tivoli gardens.JPG" width="438" height="294" border="0">
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=5>Magic Kingdom Park<FONT>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=5>Tivoli Gardens<FONT>


So I asked my teacher about this, and I quote:
"As far as I know, there is no other way of doing this."

Pages: [1] 2 3