Recently I visited a presentation about JavaFX and I got the impression, that this might be something which might be useful for my OpenPatrician project. Therefore I added a task to explore different aspects need for the game. In this first part I present two basic examples.
Flash with no sound
I recently installed Linux Mind Debian Edition (LMDE), and everything worked perfect, until I wanted to watch a video tutorial. There was no sound, though opening an mp3 file from the browser worked. So I googled a bit, found some hints and one solution:
I checked the files ~/.pulse/*-default-sink and ~/.pulse/*-default-source. The entries were different. One said alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor and the other only alsa_output.pci-0000_01_00.1.hdmi-stereo After compliting the missing .monitor and forcing alsa to reload the configuration
sudo /sbin/alsa force-reload
the sound worked.
Used sources:
Create timelapse on Linux
In preparation to create a timelapse of my modeling work, I had to figure out a way how to record it on Linux. It turns out that it is not that complicated and is comprised of the steps:
- The periodical screenshots
- Compile the images into a movie
The solution I found works for me on a Linux Mint Debian Edition (LMDE), but I see no reason, why it should not work for any other Linux distribution.
All this I figured out with the help of Kvisle’s Post on this issue.
Tetris in Java
This small programming exercise is mostly a proof of concept, that the it is possible to create a simple game using the Rendering engine within only a few hours.
Lazy loading gallery with Java Swing
From web pages this is a well known issue: You have an image gallery with many rows of pictures. Only part of them are visible in the browser. So the first images that should be loaded are the ones that are visible. With the browser technology this is not a big deal, as each resource (image) is loaded in a separate request, so the images at the top are requested first and you can start looking at the images and, when you scroll down the ones below will be loaded already.
With a desktop application this is a bit different, as you have to do something to achieve reasonable loading times. With a desktop application the the user interface is completely defined before displaying. Imagine you have loads of images that are to be loaded: The loading from your drive takes time and consumes memory. The first issue can be resolved by loading the images asynchronously, so the UI is not blocked while the images are loaded. However you might also save memory by only keep the images that are displayed in memory. This article shows how I achieved this: