PlaatSoft 150.000 downloads

Today PlaatSoft registered the 150.000e Wii homebrew game download! Many thanks to all the Wii Homebrew players around the world. 🙂 Looking forward to provide you with more high quality Wii Homebrew games in 2010!

Game PlaatSoft CodeMii Google Code Totals
Wii Pong2 3.443 36.970 414 40.827
Wii BibleQuiz 2.279 15.195 221 17.695
Wii RedSquare 2.993 22.718 459 26.170
Wii SpaceBubble 2.817 28.129 501 31.447
Wii TowerDefense 2.395 30.247 1.278 33.920
Totals 13.927 133.259 2.873 150.059

* Counting is based on my website, CodeMii (HomeBrew browser) and Google code site downloads.
** The following windows tool PlaatStats generated this statistics.

Windows PlaatStats 0.30

Hi everybody, Last three days i have invested some time to build a Qt Windows application (32bits). The application collects from my Website, CodeMii (Homebrew Browser) and Google Code the download statistics of my homebrew software. This information is the displayed in a nice form.

17-03-2010 Version 0.30
– First official release.
– Cleanup code.
– If internet is down show 0 values in boxes.
– Move clipboard functionality to Menu action.
– Build tool with QtCreator v1.3.1.
– Released app on freewarefiles.com.

16-03-2010 Version 0.20
– Added fix window size.
– Store window position in Windows registry.
– Improve GUI layout.
– Fetch data from Google Code sites.
– When application is started, information is directly fetched.
– Add windows clipboard support (HTML output is added)
– Build tool with QtCreator v1.3.1.

15-03-2010 Version 0.10
– Start building.
– Created GUI.
– Added network call (Plaatsoft and CodeMii website).
– Added state Machine.
– Build tool with QtCreator v1.3.1.

Download

Click here for detail PlaatStats information and download links.

JasperReports basic example

Hi everybody,

Today i have played around with JasperReports. Really nice java tool to created very easy reports. I did not find many examples on internet. Therefor I post my first try. I hope this will help other developers starting up with this great tool.

This example runs a query (JDBC connected) with some parameters define in Java. The result is converted to PDF and then zipped.

Test.java file


import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;

import java.sql.Connection;
import java.sql.DriverManager;

import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;

/**
 * The Class Test.
 */
public class Test {

	/** The Constant LOG. */
	private static final Logger LOG = Logger.getLogger(test.class);
	
	/** The Constant BUFFER. */
	final static int BUFFER = 10240;
	
	/** The connection. */
	static Connection connection = null;

	/**
	 * Connect database.
	 */
	static void ConnectDatabase() {
		try {			
			// Load the JDBC driver
			String driverName = "oracle.jdbc.driver.OracleDriver";
			Class.forName(driverName);

			// Create a connection to the database
			String serverName = "127.0.0.1";
			String portNumber = "1521";
			String sid = "XE";
			String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
			String username = "test";
			String password = "test";
			connection = DriverManager.getConnection(url, username, password);
		} catch (ClassNotFoundException e) {
			System.err.println("Could not find the database driver");
		} catch (Exception e) {
			System.err.println("Could not connect to the database");
		}
	}

	/**
	 * File zip.
	 */
	static void fileZip() {
		
		BufferedInputStream origin = null;
		try
		{
			FileOutputStream dest = new FileOutputStream("test.zip");
			ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(dest));
			byte data[] = new byte[BUFFER];
			
			// get a list of files from current directory
			File f = new File("src/.");
			String files[] = f.list();

			for (int i=0; i<files.length; i++) {
			
				System.out.println("Adding: "+files[i]);
				FileInputStream fi = new FileInputStream("src/"+files[i]);
				origin = new BufferedInputStream(fi, BUFFER);
				ZipEntry entry = new ZipEntry(files[i]);
				out.putNextEntry(entry);
				int count;
				while((count = origin.read(data, 0, BUFFER)) != -1) {
					out.write(data, 0, count);
				}
				origin.close();
			}
			out.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
     
	/**
	 * The main method.
	 * 
	 * @param args the arguments
	 */
	public static void main(String[] args) {
		JasperReport jasperReport;
		JasperPrint jasperPrint;
		
		long start = System.currentTimeMillis();
		
		try {			
			// Log log4j configuration
			final Properties log4jProperties = new Properties();
			log4jProperties.load(new FileInputStream("etc/log4j.properties"));
			PropertyConfigurator.configure(log4jProperties);
			
			LOG.info("Start");
			LOG.info("--------");
						
			LOG.info("Compile Jasper XML Report");
			jasperReport = JasperCompileManager.compileReport("src/test.jrxml");
			LOG.info("time : " + (System.currentTimeMillis() - start)+ " ms.");
			
			LOG.info("Create Database connection");
			ConnectDatabase();
			LOG.info("time : " + (System.currentTimeMillis() - start)+ " ms.");
			
			LOG.info("Create parameters");
			Map <String, Object> parameters = new HashMap<String, Object>();
			parameters.put("ReportTitle", "User Report");
			parameters.put("DataFile", "src/test1.jrxml");
			parameters.put("IdRange", 10);	
			
			LOG.info("Generated report");
			jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, connection);
			LOG.info("time : " + (System.currentTimeMillis() - start)+ " ms.");
			
			LOG.info("Generated PDF");
			JasperExportManager.exportReportToPdfFile(jasperPrint, "src/test.pdf");
			LOG.info("time : " + (System.currentTimeMillis() - start)+ " ms.");
			
			LOG.info("Create Zip File");
			fileZip();
			LOG.info("time : " + (System.currentTimeMillis() - start)+ " ms.");
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		LOG.info("--------");
		LOG.info("Done");
	}
}

JaspersReports test.jrxml (Report template) file.

<?xml version="1.0"?>

<jasperReport
		xmlns="http://jasperreports.sourceforge.net/jasperreports"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"
		name="User Overview" pageWidth="595" pageHeight="842" columnWidth="515" leftMargin="40" rightMargin="40" topMargin="50" bottomMargin="50">


	<style name="Sans_Bold" isDefault="false" fontName="DejaVu Sans" fontSize="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
	<style name="Sans_Normal" isDefault="true" fontName="DejaVu Sans" fontSize="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
	<style name="Title" style="Sans_Bold" fontSize="12"/>
	<style name="ColumnHeader" style="Sans_Bold" forecolor="white"/>
	
	<parameter name="ReportTitle" class="java.lang.String"></parameter>
	<parameter name="DataFile" class="java.lang.String"></parameter>
	<parameter name="IdRange" class="java.lang.Integer"></parameter>
	
	<queryString><![CDATA[SELECT id, displaynaam, puik_id FROM gebruiker WHERE id <=$P{IdRange} order by id]]></queryString>
	<field name="id" class="java.lang.Integer"/>
	<field name="displaynaam" class="java.lang.String"/>
	<field name="puik_id" class="java.lang.String"/>
	
	<title>
		<band height="70">
			<line>
				<reportElement x="0" y="0" width="515" height="1"/>
				<graphicElement/>
			</line>
			<textField isBlankWhenNull="true" bookmarkLevel="1">
				<reportElement x="0" y="10" width="515" height="30" style="Sans_Normal"/>
				<textElement textAlignment="Center">
					<font size="22"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{ReportTitle}]]></textFieldExpression>
				<anchorNameExpression><![CDATA["Title"]]></anchorNameExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="0" y="40" width="515" height="20" style="Sans_Normal"/>
				<textElement textAlignment="Center">
					<font size="14"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{DataFile}]]></textFieldExpression>
			</textField>
		</band>

	</title>
	
	<pageHeader>
		<band height="15">
			<frame>
				<reportElement x="0" y="0" width="555" height="15" mode="Opaque" backcolor="black"/>
				<staticText>
					<reportElement x="5" y="0" width="155" height="15" style="ColumnHeader"/>
					<textElement verticalAlignment="Middle" textAlignment="Left"/>
					<text>Id</text>
				</staticText>
				<staticText>
					<reportElement x="125" y="0" width="100" height="15" style="ColumnHeader"/>
					<textElement verticalAlignment="Middle"/>
					<text>Displaynaam</text>
				</staticText>
				<staticText>
					<reportElement x="270" y="0" width="60" height="15" style="ColumnHeader"/>
					<textElement verticalAlignment="Middle" textAlignment="Left"/>
					<text>PuikId</text>
				</staticText>
				</frame>
		</band>
	</pageHeader>
							
 <detail>
 	<band height="15">
			<frame>
				<reportElement x="0" y="0" width="555" height="15" />
				<textField>
					<reportElement x="5" y="0" width="155" height="15"/>
					<textElement verticalAlignment="Middle" textAlignment="Left"/>
					<textFieldExpression>$F{id}.toString()</textFieldExpression>
				</textField>
				<textField>
					<reportElement x="125" y="0" width="100" height="15"/>
					<textElement verticalAlignment="Middle"/>
					<textFieldExpression>$F{displaynaam}</textFieldExpression>
				</textField>
				<textField pattern="#,###.00">
					<reportElement x="270" y="0" width="60" height="15"/>
					<textElement verticalAlignment="Middle" textAlignment="Left"/>
					<textFieldExpression>$F{puik_id}</textFieldExpression>
				</textField>
			</frame>			
		</band>	
  </detail>
  
  <pageFooter>
		<band height="40">
			<line>
				<reportElement x="0" y="10" width="515" height="1"/>
				<graphicElement/>
			</line>
			<textField>
				<reportElement x="200" y="20" width="80" height="15"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression class="java.lang.String"><![CDATA["Page " + String.valueOf($V{PAGE_NUMBER}) + " of"]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement x="280" y="20" width="75" height="15"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[" " + String.valueOf($V{PAGE_NUMBER})]]></textFieldExpression>
			</textField>			
		</band>
	</pageFooter>
  	
	<lastPageFooter>
		<band height="60">
			<textField bookmarkLevel="1">
				<reportElement x="0" y="10" width="515" height="15"/>
				<textElement textAlignment="Center"/>
				<textFieldExpression class="java.lang.String"><![CDATA["There were " + 
					String.valueOf($V{REPORT_COUNT}) + 
					" address records on this report."]]></textFieldExpression>
				<anchorNameExpression><![CDATA["Summary"]]></anchorNameExpression>
			</textField>
			<line>
				<reportElement x="0" y="30" width="515" height="1"/>
				<graphicElement/>
			</line>
			<textField>
				<reportElement x="200" y="40" width="80" height="15"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression class="java.lang.String"><![CDATA["Page " + String.valueOf($V{PAGE_NUMBER}) + " of"]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement x="280" y="40" width="75" height="15"/>
				<textElement/>
				<textFieldExpression class="java.lang.String"><![CDATA[" " + String.valueOf($V{PAGE_NUMBER})]]></textFieldExpression>
			</textField>
		</band>
	</lastPageFooter>
		
</jasperReport>

Log4j.properties file

log4j.rootLogger=INFO, console, logfile
log4j.appender.logfile.File=../log/test.log

# Appender to log4j.log
log4j.appender.logfile=org.apache.log4j.RollingFileAppender
log4j.appender.logfile.MaxFileSize=1000KB
log4j.appender.logfile.MaxBackupIndex=9
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d{dd-MM-yyyy HH:mm:ss,SSS} %-5p (%c:%L) - %M: %m%n
log4j.appender.logfile.Append=true

# Appender to Console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{dd-MM-yyyy HH:mm:ss,SSS} %-5p (%c:%L) - %M: %m%n

Wii RedSquare 0.9.6

This evening RedSquare 0.96 for Nitendo Wii is released by PlaatSoft. The following changes were made:

02-03-2009 Version 0.96
GUI:
– Improve local high score screen. Add score stars.
– Improve game over screen. Add score stars.
– Added three extra game settings buttons.
– Improve square images.
– Update menu screen information.
– Disable Wii DVD light thread. Not stable.
Core:
– Added support for maximum four concurrent players.
– Added game level: Easy, Medium and Hard.
– Gameboard border size is now related to selected game level.
– Amount of blue squares is now related to selected game level.
– Start position of blue squares can now be randomized.
– Enable A and B button to select red square during game.
– Press Home button to go back to the main menu.
General:
– Added screenshots to source code documentation.
– Improve debug trace information.
– Build game with devkitPPC r19 compiler.

Wii SpaceBubble 0.94

This evening SpaceBubble 0.94 is released by PlaatSoft. The following changes were made:

17-02-2010 Version 0.94
GUI:
– Improve game settings screen.
– Added donate screen.
– Update main menu screen information.
– Improve bubble graphics.
Core:
– Extend user name from 3 to 6 characters.
– Default user name is based on Wii nickname.
– Increase http buffer size from 8kb to 10kb.
General:
– Added source code to Google Code Repository
– Added source code documentation (Javadoc style).
– Added Doxygen (automatic documentation generation tool) config file.
– Build game with devkitPPC r19 compiler.

Download

Click here for more information and the download link.

Wii RedSquare 0.9.5

This evening RedSquare 0.95 for Nintendo Wii is released by PlaatSoft. The following changes were made:

11-02-2010 Version 0.95
GUI:
– Added Wii DVD light effects to game.
– Improve game settings screen.
– Added donate screen.
– Added scrollbar to highscore and release notes screens.
– The 100ste highest local scores are showed.
– The 40ste highest today and global high scores are showed.
– Added to most screens network status information.
Core:
– Extend user name from 3 to 6 characters.
– Default user name is based on Wii nickname.
– Increase http buffer size from 8kb to 10kb.
– Bug fix: Http thread memory cleanup was not correctly executed.
General:
– Added source code to Google Code repository.
– Added source code documentation (Javadoc style).
– With the doxygen tool the documentation can be generated.
– Build game with devkitPPC r19 compiler.

If anybody has a good idea how to improve this game, please post a comment

Wii TowerDefense 0.94

PlaatSoft has released TowerDefense v0.94. The following changes were made:

05-02-2010 Version 0.94
GUI:
– Improve video initialization.
– Overall FPS has improved 50 percent. Thanks Crayon.
– Lots of other small GUI changes.
Core:
– Mixed the weapon fire mode a little bit more!
– Nuke is 500 dollar cheaper!
– Increase http buffer size to 10Kb.
General:
– Added inline source code remarks in javadoc style.
– Use Doxygen (windows tool) to create HTML source code documentation.
– Use GrrLib 4.2.1 BETA library (Now native FreeType support available).
– Build game with devkitPPC r19 compiler.

Download

Click here for more information and the download link.

Wii KnightsQuest 0.1.0

Hello everybody,

Because TowerDefense is almost finished i have started a new project. This week I have decided to create KnightsQuest. KnightsQuest is a strategic game. The goal is to build up an empire and destroy all other kingdoms. If you have conquered the hole world you have won. The graphics engine will be based on the GRRLIB library. I hope that round the summer holidays the first beta release will be available.

04-02-2010 Version 0.1

  • GUI:
    • General GUI basis.
  • Core:
    • Use GRRLIB 4.2.1 (beta) as graphical render engine.
    • Use libfat v1.0.6 as disk access engine
    • Use libmxml v2.6 library as xml engine
    • Use libogc v1.8.0 library as Wii interface engine
  • General:
    • Started programming in C++.
    • Setup basic directory structure for new project.
    • Store source code in Google code SVN repository.
    • Build game with devkitPPC r19 compiler.

    Download

    Click here for more information and the download link.

Wii firmware upgrade 3.0e->4.2e

This evening I have upgraded my friends Wii firmware from version 3.0e to 4.2e. Before I upgraded the Wii firmware I first installed the Homebrew channel (1.0.6) and hidden DVDx channel with the Bannerbomb exploit. This hack is really easy. It took my only 5 minutes to complete all steps. After that I successful upgraded the Wii firmware to 4.2e and installed all (new) available Nintendo channels through the Wii shopping channel. This took about 45 minutes.

Conclusion: Installing the Homebrew and DVDx channel was never so easy. I hope lots of other Wii owners will upgrade there Wii and will explore the world of free Homebrew software. 😀

Source code documentation

Latest week I have added to all my Wii projects extra source code documentation based on javadoc notation style. With doxygen (Doxygen is a documentation system for C++, C, Java, Objective-C, and lots of other programming languages) i have created HTML documentation. This documentation is added to the Google SVN repositories. I hope this will help you to understand the source code better.

Ohloh membership

Hi, As you maybe already notest i have joined the Ohloh community. Some kind of Facebook community for open source projects. Most large open source projects (for example Firefox, Gcc, Bash, subversion, Apache, etc.) have joined this great community. It would be really nice that you give me some credits for my work in this community. So if you like the developed software, join the ohloh community and click on the “I USE THIS” button located on the detail project pages. 😆

Many thanks in advance.

Wii TowerDefense 0.93

PlaatSoft has released TowerDefense v0.93. The following changes were made:

22-01-2010 Version 0.93
GUI:
– Added weapon fire mode information on weapon help screen.
– Improve weapon reload delay initialisation.
– Added donate screen.
– Bugfix: Weapon fire sprites were 22 degree misaligned.
Core:
– Introduce different weapon fire modes.
– Fire at enemy in range nearest to base (Gun / Rifle)
– Fire at enemy in range with highest energy level (Cannon / Missile)
– Fire at fastest enemy in range (Laser / Nuke)
– Rebalance weapon specifications. Mix features more!
– Optimised some draw methods for beter performance. Thanks Crayon.
General:
– Build game with devkitPPC r19 compiler.

Wii TowerDefense 0.92

PlaatSoft has released TowerDefense v0.92. The following changes were made:

16-01-2010 Version 0.92
GUI:
– Added 6 animated weapons. Thanks Applicant!
– Improve enemy animated sprite frame sequence.
– Improve help and level select screens.
– Lots of other small changes.
Core:
– Weapons now fire on strongest enemy in range.
– Increase bonus money when wave is cleared.
– Increase initial weapon power.
– Decrease weapon prices.
– Added weapon sell functionality with minus button.
– User initials are now default based on Wii nickname.
– Bugfix: Monsters can not be shooted before launch.
– Build game with devkitPPC r19 compiler.