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
1
« 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 )
2
« on: October 27, 2011, 01:17:36 pm »
Noreally, it's dangerous. That used to be my house.
3
« 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 <html> <head> <title>Selection field</title> <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <script type="text/javascript"> var mouseX = 0, mouseY = 0, startX = 0, startY = 0, colliders = [];
window.onmousedown = function() { //Defaults $('#selector') .css('position', 'absolute') .css('opacity', 0.50);
//Declarations startX = mouseX; startY = mouseY;
//Apply $('#selector').css('left', startX); $('#selector').css('top', startY);
//Show $('#selector').show(); }
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; } else { tX = startX + ( mouseX - startX ); w = (mouseX - startX) * -1; }
//Calculate Y if ( (mouseY - startY) >= 0 ) { tY = startY; h = mouseY - startY; } else { tY = startY + ( mouseY - startY ); h = (mouseY - startY) * -1; }
//Apply $('#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); } });
//Override return false; }
window.onmouseup = function() { $('#selector').hide(); }
//Init function init () { $('#selector').hide(); $('.selectable').each(function (key, i) { var pos = $(this).position(); colliders.push([this, [ pos.left, pos.left + $(this).innerWidth() ], [ pos.top, pos.top + $(this).innerHeight() ] ]); }); }; </script> </head> <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> </body> </html>
Demo: http://www.walotech.com/nomnom.htmlEdit 2: Added transparency, added red cube to test transparancy Edit 3: Added collision detection, morphed it into a selection engine (couldn't resist ), 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)
4
« on: September 28, 2011, 11:21:07 am »
(That doens't have any texture, that's just me testing lightning )
5
« 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.
Preparation 1. Download YUI compressor, and add the source to your classpath as library. 2. Import the following:
import java.io.IOException; import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; import java.io.Writer;
import org.mozilla.javascript.EvaluatorException; import org.mozilla.javascript.ErrorReporter;
import com.yahoo.platform.yui.compressor.JavaScriptCompressor;
And you should import rhino-1.6R7.jar to your classpath. (Found at /Your YUI folder/lib )
The code
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); } else { 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); } else { 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) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); }
Explanation 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.
6
« 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: http://apps.facebook.com/vanthia/
7
« 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: http://www.livestream.com/IkkerensOfcourse, 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 ^^ Edit: For thise interested in my World of Warcraft profile, here is my armory link: http://eu.battle.net/wow/en/character/tarren-mill/verthasian/advanced
8
« 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: http://www.omnimaga.org/index.php?action=downloads;sa=view;down=577And 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))
9
« 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 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: http://www.omnimaga.org/index.php?action=downloads;sa=view;down=577And 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
10
« 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 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: package com.walotech.splut;
import android.app.Activity; import android.graphics.Color; 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 { @Override public void onCreate(Bundle savedInstanceState) { //Prepare screen //Set landscape orientation setRequestedOrientation(0); //Remove title bar requestWindowFeature(Window.FEATURE_NO_TITLE); //Remove taskbar getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); //Load XML for UI super.onCreate(savedInstanceState); setContentView(R.layout.main); //Assign buttons findViewById(R.id.Lev1Start).setOnClickListener(new Button.OnClickListener() { @Override public void onClick(View v) { setContentView(R.layout.gamescreen); findViewById(R.id.gbck).setOnClickListener(new Button.OnClickListener() { @Override public void onClick(View v) { setContentView(R.layout.main); } }); } }); findViewById(R.id.makeblue).setOnClickListener(new Button.OnClickListener() { @Override public void onClick(View v) { Button StartButton = (Button) findViewById(R.id.Lev1Start); StartButton.setBackgroundColor(Color.BLUE); } }); } public void AB_main() { findViewById(R.id.Lev1Start).setOnClickListener(new Button.OnClickListener() { @Override public void onClick(View v) { setContentView(R.layout.gamescreen); AB_gamescreen(); } }); findViewById(R.id.makeblue).setOnClickListener(new Button.OnClickListener() { @Override public void onClick(View v) { Button StartButton = (Button) findViewById(R.id.Lev1Start); StartButton.setBackgroundColor(Color.BLUE); } }); } public void AB_gamescreen() { findViewById(R.id.gbck).setOnClickListener(new Button.OnClickListener() { @Override public void onClick(View v) { setContentView(R.layout.main); AB_main(); } }); } }
Edit: Already figured it out, seems I was redefining something that was already given in a function
11
« 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
12
« 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)
13
« on: February 10, 2011, 12:41:23 pm »
14
« 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)
15
« 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 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title><De vijf beste pretparken in de wereld!</title> </head> <body bgcolor="#CCCCFF" text="#006666" link="#666633" vlink="#009933" alink="#666699">
<H1> <FONT COLOR="black"> De vijf beste pretparken in de wereld! <FONT> </H1><BR> <BR><BR> <img src="disneyland parijs.JPG" width="289" height="379" border="0"> <img src="disneyland tokyo.JPG" width="282" height="375" border="0"> <BR> <FONT SIZE=5>Disneyland Parijs<FONT> <FONT SIZE=5>Disneyland Tokyo<FONT> <BR><BR><BR> <img src="everland.JPG" width="546" height="306" border="0"> <BR> <FONT SIZE=5>Everland<FONT> <BR><BR><BR> <img src="magic kindom park.JPG" width="438" height="294" border="0"> <img src="tivoli gardens.JPG" width="438" height="294" border="0"> <BR> <FONT SIZE=5>Magic Kingdom Park<FONT> <FONT SIZE=5>Tivoli Gardens<FONT>
</body> </html>
So I asked my teacher about this, and I quote: "As far as I know, there is no other way of doing this."
|