Archive for March, 2012

lwjgl.dll: Can’t load IA 32-bit .dll on a AMD 64-bit platform

If you encounter this error while trying to write a game on a Windows 64 bit system using Slick2d, I can give you some insight into how to fix the issue. I'd ran into this issue some time ago, but I don't remember if I posted about it or not. I solved the problem then by using a recompiled version of slick2d. It worked well, but I did something different this time around.

I downloaded the latest version of LWJGL and used it instead. The process of importing the libs is much the same except you use the new LWJGL and its natives instead of the ones included with slick2d. If you need help getting the imports correct, leave a comment and I'll go into it in more detail.

»crosslinked«

, ,

1 Comment

jMonkeyEngine “An instance of the program cannot access specified user directory”

This is a simple issue and most Linux users can probably figure it out rather quickly. I don't mean to offend anyone, but the error message is pretty straight-forward when it comes to the problem. However, I'll explain it to those who run into it and want to know how to fix it. Then again, I may be the only person who runs into this problem. Either way, I'm posting it for anyone who may need it.

The problem stems with the installation of jMonkeyEngine. The installer is a .sh file which which can be executed like so:

1
sh jME3_SDK_Beta-Linux.sh

However, if you are like me, you may have ran it with sudo like this:

1
sudo sh JME3_SDK_Beta-Linux.sh

The good thing about using sudo is that the program will be installed for all users on the machine. I've not ran it without sudo to see if it will install for only the user running the installer, but I'm assuming that it will.

After the installation occurs, it asks you if you want to start jMonkeyEngine. If you answer yes, it will start it as root, and it will write it's hidden users directory in your home directory. The home directory will have root:root as the owner because the program was first started by the root user.

So when you go back and run the program again, it will not have access to the required folder. The solution is to change the owner of the folder. This is accomplished simply by typing this in a terminal while in your home folder (the terminal should open in your home folder automatically, but just to make sure we'll change directory into it first). In the following example the word "username" should be replace with your actual username.

1
2
cd ~/
chown -R username:username .jmonkeyplatform

You should now be able to open jMonkeyEngine. The -R, for those of you interested, means "recursive", which will change the owner of all files and folder inside of .jmonkeyplatform, not just the folder itself.

, ,

No Comments

The Wrong Path for Desktop GNU/Linux

I've tried to use Unity. I've tried to use Gnome 3. While many others have had success adapting to the these new desktop environments, I find them buggy and frankly...terrible. I know there have been many debates about it, but I want to give my two cents about it as well because it really hits me hard as a long-time Linux user.

Before KDE version 4, I used KDE most of the time. I rarely used another desktop environment. I was used to it. So believe me when I say I'm not afraid of change when it comes to Linux. When KDE 4 came out, it was different, but it wasn't so different that I couldn't have kept on using it. What made me switch to Gnome was the fact that KDE 4 was still in beta and very buggy. I couldn't use it because of the bugs. So, I switched to Gnome and grumbled about how change for the sake of change isn't that great.

KDE could have waited until it was ready for production before releasing it. Many distributions continued to use KDE 3 for a long time, but KDE 4 scared me away from it. I switched to Gnome and was happy with a desktop that worked well. I wasn't alone. Many people switched to Gnome. I became a staunch advocate of Gnome and tried to steer every new Windows convert away from KDE because I didn't want them to have a bad first experience with Linux.

Enter stage left Gnome 3 and Unity. These two flaky pieces of garbage have been pushed on every major modern distribution. I say modern to refer to the distributions that use more bleeding edge software packages. Debian Stable is still using Gnome 2, but Debian Testing (which will become Debian Stable someday) uses Gnome 3. If you want to use Debian Stable, you'll be stuck with older versions of many software packages. If you want to use modern packages, such as VLC 2.0 (which has minimal support for bluray playback) you'll need to go with a more modern distro.

The problem with going with a more modern distro is that most use Gnome 3 or Unity, and they don't really have a choice. Gnome 2 and GTK2 will no longer be supported or developed.

The philosophy, as I've heard it, from the developers of Unity and Gnome 3 is that users don't migrate to Linux because of all the software choices. Too many desktop environments create confusion for new users. Should they use XFCE4, KDE, Gnome, FluxBox, or something else? The claim is that this massive amount of choice scares away new users.

This is a terrible philosophy. The competition is what helps drive free software. People love having a choice, especially the type of users that actually USE LINUX. The main reason more people haven't adopted Linux is because MOST PEOPLE DON'T EVEN KNOW THEY ARE RUNNING WINDOWS. They just know they have a computer and they use what it came with. They don't know which version of Windows they are running, and they don't care, as long as they can get on Facebook and talk about how bored they are. People don't flock to Linux because Manufacturers don't put Linux on their new computers.

Manufacturers have deals with software vendors which lets them cut the cost of their computers. They get paid by software vendors to install their "crapware" onto the new computers. Computer manufacturers actually get paid to put all that junk on your new computer. If they start installing Linux on their computers, they will have to raise the price of their new systems, because they will no longer be getting the "crapware" income.

An example of how Linux on new devices actually increases market share can be found in Android. There are millions of people using Android on their phone right now oblivious to the fact that it's Linux. They have no idea, and they don't care. There are many internet browsers they can install on their phone, but most will never do so. It already comes with one. There are many software choices out there on Android. That doesn't scare away Android users. They install something if they want it. It's as simple as that.

This whole notion that unifying user interfaces will bring people to Linux is garbage. More and more people use Linux every day. In time, manufacturers may install Linux on more of their computers. Only a few do it today. As that happens, however, the number of Linux desktop users will grow exponentially.

While we are waiting on that to happen, though, why not listen to the users who are actually USING the software right now. Most HATE unity and Gnome 3.

And now that KDE 4 is pretty solid, most, like myself, will be moving to it. I installed it yesterday, fixed a small distortion in the audio, removed the blue shadow from the active windows, and will not be looking back. It's working flawlessly for me. I'm very happy with what it has become, and I'm glad it's available for me at this time when Gnome developers apparently have their head stuck where the sun doesn't shine.

I don't mean to badmouth the developers because I know they have a tough job and they do it all pretty much for nothing. Perhaps the problem is with the project management. I'm not sure where the problem lies. Did the Gnome project get taken over by Microsoft or Apple? I have this curious feeling that it is being led by a bunch of suits instead of developers.

, , ,

6 Comments

How to get rid of the annoying blue shadow in KDE 4

I vowed to switch to KDE after trying for a few months to find an alternative to Gnome 2, which is going the way of the Dodo. I ran into two problems initially. The system sounds were distorting and I hated the annoying blue shadow on active windows.

The fix for the first problem came when I installed the phonon gstreamer backend, though I'm not sure this was exactly the fix as I never switched to that backend in the settings.

To fix the annoying blue shadow, go to System Settings -> Workspace appearance -> Window Decorations. Click on the Oxygen theme and then click "Configure Decoration". Click the Shadows tab and change the colors under "Active Window Glow". I made my inner color a dark grey and the outer color black. I like this a lot better than the bright blue.

,

No Comments

Screw you Desktop Environments, I’m installing KDE

Many years ago I used KDE as my main Linux desktop environment. I switched to gnome around the same time that I switched to Debian and later Ubuntu. I liked GTK themes. I liked Gnome's way of keeping the visual simple and found that it was much more solid than KDE, especially KDE version 4+. I've lived in a Gnome utopia for quite some time, and I loved it.

Now, we have Gnome 3 and Unity. XFCE4 is a good alternative but it just isn't Gnome 2. Rather than battle it any longer and continue my search for a Gnome 2 alternative. I'm switching back to KDE. I don't care if I hate it. At least they aren't trying this whole unification approach that is killing the desktop in Linux on many distributions.

So far, LinuxMint has been the only distribution I've found that had a decent Gnome 3 setup by default, and it has some freakish glitch with my ATI video card that appears to make it reset itself from time to time. It just acts really flaky.

So, I'm installing the kde-full package in Debian Wheezy right now and crossing my fingers for a better experience.

, ,

No Comments

Mount Samba/Windows/CIFS Share with User Read/Write Permissions

Mounting a Windows/SMB/CIFS share can be accomplished in many different ways. The way that I do it works best for me, and I'm presenting it here for anyone who wants to take advantage of the info.

I have a NAS device with Windows shares on IP 192.168.1.90 on my LAN. One of the shares is called "Docs" which I use for important documents. First I create a directory to mount the share to on my local machine. I put this in my /media directory.

1
sudo mkdir /media/Docs

Note that I'm using Debian Wheezy as my distro, but all of this should work in any distro.

Next I add a line to my /etc/fstab file. It can go at the bottom of the file. So, open /etc/fstab in your favorite editor. I'm using vim.

1
sudo vim /etc/fstab

The line I add for the share is:

1
\\192.168.1.90\Docs   /media/Docs cifs username=myuser,password=mypassword,uid=myuser,gid=users,auto 0 0

I set "myuser" to my actual local username. The reason I'm setting the uid in this line is because I want to specify that my user will be the owner of the mounted share (giving me read and write), and I'm setting the gid to users because I want all other users on the local machine to have read access to the mount.

After saving the file, I can sudo mount /media/Docs and I'll have my mount available for my user. When the system reboots, the mount will automatically occur. So my user will have access to the mount directly after boot.

An optional, more secure way to do this is to put your username and password in a file somewhere (perhaps your home directory) and replace the "username=myuser,password=mypassword" part of the mount line with "credentials=/path/to/file". This will help keep your passwords safe. Also note that these credentials aren't your local user credentials necessarily. They can be the same, if you set your local user up with the same creds as the share, but these credentials should be the user information that gets you access to the share.

, , , ,

No Comments

How to play a Bluray movie in Debian Testing

This HOWTO will probably work in Debian Squeeze, but the system I used was running Wheezy. Hopefully this HOWTO won't be necessary long, but until then, it's a very good way to watch blurays on your Linux system. This will also work for Mac and Windows, with some changes, but this is strictly a Debian Testing HOWTO.

There are various ways to do what we need to do. Some require you to rip the bluray first and then watch the resulting MKV. I found that this took 15 minutes or so on my 8-core system. However, there is another method which uses a program called makemkv and pipes the output to VLC using a network stream. I found this method on the web but found that some of the links were screwed up, so I couldn't use it directly. After some searching, I found the script I was looking for and edited it slightly. For your convenience, I'm rewriting the HOWTO and including the files all here.

First of all, create a folder called makemkv in your home directory. You can use a different location if you prefer but for simplicity we'll put it in our home directory.

mkdir ~/makemkv

Change into that directory and grab two zipped tarballs from the makemkv author. Then extract them.

cd ~/makemkv
wget http://www.makemkv.com/download/makemkv_v1.7.2_bin.tar.gz
wget http://www.makemkv.com/download/makemkv_v1.7.2_oss.tar.gz
tar xvf makemkv_v1.7.2_bin.tar.gz
tar xvf makemkv_v1.7.2_oss.tar.gz

Yes you need both the bin and the src.

Make sure you have some dependencies.

sudo apt-get install build-essential libc6-dev libssl-dev libgl1-mesa-dev libqt4-dev curl vlc

In other HOWTOs, the curl dependency isn't mentioned. You need curl for the script we will download later.

Next compile and installed the two packages.

cd makemkv_v1.6.12_oss
make -f makefile.linux
sudo make -f makefile.linux install
cd ../makemkv_v1.6.12_bin
make -f makefile.linux
sudo make -f makefile.linux install

Finally download and run playBluRay.sh. I gzipped it so the site wouldn't complain about the file type. Just gunzip it and execute it.

It will run makemkvcon to decrypt the bluray and setup a stream on port 51000 of your computer. Then it will start vlc using the network stream. It may take a few moments to load it all.

Note that sometimes a bluray won't play correctly even with this method or you may see a behind the scenes segment before the movie. I had this problem on my Rambo bluray.

, , ,

1 Comment

My Latest Computer Build

I just ordered the parts for what will be my newest main desktop. I decided to go with an AMD processor this time around. My current desktop has a Intel Core 2 Quad Q6600 which is a quad-core process running at 2.4ghz. I've had this quad-core for about three years and it still has a lot of life in it. I'll be giving it to my son. This current system also has 8gb of RAM. My new system will have 16gb. The AMD process I went with for the new build is an FX-8150 eight core running at 3.6ghz. It's supposed to be a very good process, though I've read some reviews that claim it bottlenecks games.

Even though I'm getting into game development, I don't play a lot of the mainstream games. Most are first-person shooters, and I've grown tired of that genre. I do play some FPS on the PS3 from time to time, but about the only games I play on the PC are Minecraft, Portal, and the occasional Empire Earth I/II. I've been using Windows 7 on my main desktop for quite some time and my new build will be Linux all the way. I venture into Windows from time to time to play Portal and Empire Earth, but I've decided that Windows uses way too much of my hard drive. I have a 128gb SSD as my main drive and this just isn't enough for Windows these days. It's plenty for Linux, however, as I'll be using network shares for most of my saves and using the SSD for the OS only. I detest platter hard drives unless they are in a hardware RAID configuration because I've lost about ten of them in the past five years. I have terrible luck with mechanical hard drives.

At any rate, I bought a pretty nice system for around $660 after shipping. I'll be using it for rendering some 3D work I'll be doing as practice for my game development endeavor. Hopefully the 8-core CPU will shine when it comes to this type of work. Here is a list of the components that I bought:

Antec Three Hundred Gaming Case External 3 X 5.25; Internal 6 X 3.5 2*Usb2.0

ASRock 970 EXTREME3 AMD 970 & SB950 ATX DDR3 800 AMD - AM3+ Motherboard

Rosewill RG630-S12 630-Watt Green Series 80 PLUS Certified, Single 12V Rail Power Supply Compatible with Intel Core i7 and Core i5

AMD FX-8150 FX 8-Core Black Edition Processor (FD8150FRGUBOX)

G.skill Ripjaws X Series 16gb (4 X 4gb) 240-pin Ddr3 Sdram Ddr3 1600 (Pc3 12800) Desktop Memory Model F3-12800cl9q-16gbxl

Lite-On IHBS112-04 12X Internal Blu-ray Writer(Black), Bulk w/o Software

It should be noted that I didn't get a video card because I have a few spare AMD/ATI cards (though I really prefer nVidia). I plan to use my AMD HD6950 in this new computer. I also don't have a hard drive listed in this build because I will be using my current SSD along with a NAS and a rack mount server which has a nice RAID as well. That's the one good thing about having all this extra computer equipment laying around. New builds are usually pretty cheap because I usually reuse at least a few components. A comparable computer with the same components would run me well over $1000. I would guestimate that it would cost at least $1500 with the same specs.

, , ,

No Comments

Increasing the size of tmpDSK and /tmp in a CPanel Environment

I recently ran into an issue in cPanel after recompiling Apache with some new settings. I enabled the eAccelerator extension in my EasyApache configuration for PHP. Now cPanel uses a default size for its /tmp mount of 512mb. I found out rather quickly that this isn't enough for eAccelerator. I actually ended up resetting this value to 4096mb (4GB). As a reminder to myself and so anyone else looking for the solution to this problem, I will outline what needs to be done below.

First, ssh into your server and login as root or su - root after logging in as a regular user. Now use the power of the command line. Don't panic!

Stop Apache, MySQL, and cPanel

1
2
3
service httpd stop
service mysql stop
service cpanel stop

Next unmount the existing /tmp

1
umount -l /tmp

Remove /usr/tmpDSK

1
rm -rf /usr/tmpDSK

Next, use your favorite editor (Vim in this example) to change the config file for the tmpDSK

1
vim /scripts/securetmp

Search the file for "tmpdsksize" (in Vim type /tmpdsksize and hit enter). The line should look like this by default:

1
my $tmpdsksize     = 512000;    # Must be larger than 250000

Change the 512000 to a higher number in Kilobytes. For my 4GB, I changed it to 4096000.
Save the file (vim :wq enter).
Run the script...

1
/scripts/securetmp

Answer y to the two questions it asks.
Finally start your services back up.

1
2
3
service httpd start
service mysql start
service cpanel start

That should have you set with more /tmp space.

, , , ,

No Comments

Marte Engine Define() and Check()

I'm not very fond of the way that Marte Engine's Input checking occurs. It simplifies things a bit in one area and complicates things in all other areas. The simplification comes from the fact that one can list all the keys for a given action in the listener definition (define("name", keys...), and that is pretty helpful.

However there's something I don't really care for when it comes to the way Marte Engine handles keyboard input, namely, it's too fast. The key repeat becomes an issue when working with things like menus.

Disclaimer: I'm far from being a Java or game development guru. I'm merely pointing out that I ran into this issue. There could very well be a work-around for this within the Marte engine itself. I ran into this problem while trying to implement a main menu for a test game I was working on. When I would push a button, the menu selection cursor would jump to the bottom of the menu, which isn't at all what I wanted it to do.

The believe the reason for this is that the input definitions one can make with a define() method are set to handle only KeyDown events, while I needed a KeyPressed event. Since I could find no other way to force it to use a keypress instead of a keydown, I decided to remove my input event definitions and use a standard check on the input to see if a certain button has been pressed (down and released). This solved my issue with the key events. Now my menu cursor performs as expected.

, , ,

No Comments