Posts

Mask - the liero clone

Finally I've rewritten my little engine so that it is in a presentable state. The list of things I've tried and changed is huge but in the end it turned out pretty stable. It's gonna take a while to transform this preview into a real game though and i'm not sure i'm up for it actually. This feels like a release to me because it's playable :) Anyway what i need to do is roughly: Add a menu for game setup and changing controls Adding more weapons Adding powerups Implement some kind of sound support Get new graphics Controls Here are the controls for both players. I just realized that the keys might be placed very tight. I'm using a split natural keyboard so it works for me. Action Player 1 Player 2 Walk D,G,R,F Left, Right, U, Down Change Weapon Q Y Jump W U Shoot S J Ninja Rope Q+W Y+U Digg Hold one direction and tap the other You can also try experimenting with the mouse to add/remove ground and add particles. Applet If you're lik...

JFreeChart Legend Arrangement

When i was working with JFreeChart i found no way to layout the items of the legend box the way i wanted. I had no choice but to write a custom Arrangement . If anyone knows of a better way please enlighten me. ColumnFlowArrangement can layout on both the vertical and the horizontal axis. It works by specifying the width, in items, of the initial column. The column is filled with as many labels as there is room for, then a new column will be created with the same width. The arrangement works the same way for rows. The names of the arguments in the class can be a bit confusing but I will fix this and add factory methods to increase readability when I find the time/energy. The class can be found at: https://gist.github.com/bysse/6627232

jQuery floating table header plugin

A jQuery plugin that makes the header of a table floating if the original header isn't visible due to scrolling. The plugin will automatically choose the thead tag as the header for a table. If thead isn't found it will search for rows marked with the class 'floating'. The behavior can be changed by the settings forceClass and markingClass. News 2012-08-19 This plugin is no longer maintained by me and this page will therefore not be updated anymore. 2011-01-04 1.4.0 ! Lazy loading of tables and performance optimations by Jason Axley 2010-08-02 1.3.0 ! Better ie6 support, http://plugins.jquery.com/node/16655 Fixed parameter name typo, http://plugins.jquery.com/node/16819 2010-07-08 1.2.0 ! Fixed a few bugs and added reinit and recalculate functions to the table. 2009-10-19 1.1.0 ! Better compatibility, better tested. There are still some problems with IE6 that i would like to have some help with. 2009-10-15 1.0.7 is out! With all fixes made...

Eclipse 3.4 - Essential hotkeys

This is the third part of my Eclipse configuration series. At work we have a new guy who never has used Eclipse before, so he's a little lost when it comes to navigating the code base. I tried to write down a list of hotkeys that would make his life easier, but there are so many of them! Here is a list of my favorite hotkeys grouped by the area of use. I really tried to keep the list short but some shortcuts you just can't live without. General ctrl+space - The most important hotkey of them all, auto complete. ctrl+m - Maximize the current view. ctrl+3 - Open preferences or any other view. Navigation f3 - Open declaration. ctrl+o - Quick outline of the class files, great for navigating within a class quickly. ctrl+t - Open the type hierarchy. ctrl+shift+g - Get a list of all methods that calls the current method. ctrl+k - Next occurrence of the currently selected text. ctrl+. - Goto the next error or warning, use ',' for the previous. ctrl+shift+r ...

jQuery Column Iterator Plugin

Today i needed a jQuery plugin that could iterate over all cells in a column of a table. Since our tables can be very large i didn't want to use the jQuery column cell selector plugin since it creates a lookup table. We won't use rowspan in the tables anyway so i made my own column iterator. A demo can be found at:     http://slackers.se/resources/demo/columniterator/demo.html The plugin can be downloaded at:     jquery.columniterator.js     jquery.columniterator.min.js

Eclipse 3.4 - Even more efficient use of auto complete

The auto complete feature in Eclipse is a real time saver. Not many people know that the feature can be used event more efficiently. I've worked with Eclipse every day the last couple of years and i didn't know about this until a few days ago when i "discovered" it by accident. A single capital letter matches itself and then everything until the next word. Actually it's more similar to [a-z0-9]* than "everything". In other words, you can search for, or auto complete, entire words with just one character. For example the string "RR" matches the classes:    ReportRepositoryBean    ReportResult    ReportResultImpl The feature can also be used with the shortcuts: ctrl+shift+r - Open Resource ctrl+shift+t - Open Type

iTunes blocks JBoss naming service port

Today I had problems with Eclipse and JBoss. Somehow Eclipse couldn't detect that JBoss had started and aborted the process after 420 seconds and i noticed the exception in the log. 2000-06-03 80:23:11,220 ERROR [Naming] Could not start on port 1099 java.net.BindException: Address already in use: JVM_Bind After a quick check with Active Ports i saw that iTunesHelper.exe held the port. And when the process got killed, Eclipse started working as expected again. 1099 might have been assigned to iTunesHelper since it's inside Windows' ephemeral port range. Just to be sure this doesn't happens again I removed the auto start of iTunesHelper from the registry. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\iTunesHelper  And adjusted Windows' ephemeral port range so that some other service doesn't grab the port. There's a great guide over at ncftp.com on how you do this for different operating systems.