Archive

Posts Tagged ‘ubuntu’

How To: Google App Inventor in Ubuntu 10.04

July 21st, 2010 2 comments

I was recently given access to Google’s App Inventor. You know, that ‘building-block’ development environment that’s supposed to make application development on Android handsets easy and fun?

If you’re like me, you followed the setup procedures provided by Google. And then you eagerly created a new project and tried to start the “Blocks Editor”, as per the next set of instructions provided by Google. And then things broke.

The Blocks Editor requires super user permissions to run, otherwise the web start crashes. Here’s how to easily launch the Blocks Editor.

From the command line, create a file

touch javaWebStart.sh

and make it executable

chmod +x javaWebStart.sh

and open it in your favorite editor.

Paste the following into the file

#!/bin/sh
gksudo /usr/bin/javaws $1

and save it!

Now when you click “Open the Blocks Editor” and it asks you what program you want to open it with, point it to that script. It will ask for your root password (the gksudo part does that) and Blocks Editor has everything it needs to set itself up. No more crash!

Categories: technical Tags: , , ,

VirtualBox Network with XP Guest in Ubuntu Host

October 17th, 2009 4 comments
This tip refers to VirtualBox 3.0.8 and Ubuntu 9.04.

If you’re anything like me, you might have need of a WinXP install within Ubuntu. In my case, it’s convenient to have a VirtualBox of Windows running for immediate testing of websites (as I build them) so that I can test the sites functionality and appearance within Internet Explorer.

Unfortunately, the default settings of a guest WinXP install don’t allow for networking “out of the box”. But it’s an easy fix!

First, make sure the virtual machine is not already running. Turn it off if it is.

Next, highlight the WinXP virtual machine within the Sun VirtualBox main screen. Click Settings. Select Network. Change the Adapter Type to Intel PRO/1000 T Server (bunchanumbers) then OK and start the virtual machine.

When you boot into the Windows guest, the network should now work.

Adjust World of Goo’s Resolution

October 15th, 2009 No comments

World of Goo celebrated it’s first birthday earlier this week. To honor the birthday, 2D Boy, the game’s developers, have priced the game at whatever you want to pay. But you have to act quick as the sale runs out October 19.

Significantly, there is a .deb installer for the game. It runs very well on my old laptop running Ubuntu 9.04.

Back to the topic at hand, can you change the resolution of the game? How about running the game inside a window rather than fullscreen?

Yes you can, and yes you can. Here’s how.

Find the config.txt for the game in

/opt/WorldOfGoo/properties/

You could edit that config.txt if you like, but it’s recommended you copy it to your $HOME directory.

cp /opt/WorldOfGoo/properties/config.txt ~/.WorldOfGoo/

Now you don’t have to sudo the file to edit it. Open up the config.txt that you placed in $HOME/.WorldOfGoo/ (I like to use scite).

scite ~/.WorldOfGoo/config.txt

Starting around line 20 is the Graphics Display area. It looks something like:

<!-- Graphics display -->
 <param name="screen_width" value="800" />
 <param name="screen_height" value="600" />
 <param name="color_depth" value="0" />
 <param name="fullscreen" value="false" />
 <param name="ui_inset" value="10" />

Change the screen_width and screen_height values to whatever you desire. Likewise with the fullscreen option. My config shows I run the game in 800 by 600 resolution in a window.

Next time you launch the game, the settings will have taken effect.

Slick, LWJGL and Ubuntu 9.04

June 12th, 2009 No comments

It has been a busy month for me and a slow month in regard to posting any sort of update here. I’ve been reading a whole whack of stuff. A giant whack.

Speaking of reading stuff, why not check out http://books.1889.ca/ for some excellent reading material. Follow the author on Twitter, while you’re at it. I’m not being paid to promote 1889 books, it is just good stuff.

Back to the topic at hand, I want to share a tidbit of information. If you’re like me, you use Ubuntu. And recently, a new version of Ubuntu became available. So if you’re like me, you upgraded to Ubuntu 9.04 from Ubuntu 8.10. Then stuff broke. Because, like me, you use an ATI video card and ATI decided to not update last year’s model of video cards to work with the new version of X (the window system) in Ubuntu 9.04.

That’s a side rant, and possibly unrelated. My main problem was that the game(s) I’ve been writing would no longer compile, or run, with Ubuntu 9.04. Wait, it was Ubuntu’s fault? No. Something broke somewhere along the way and LWJGL was b0rken just a little bit (b0rken… look it up).

I fixed it. And you can, too. Grab the nightly build and replace your native libraries.

Now Slick (which uses LWJGL) and Eclipse and Ubuntu 9.04 all play nice together. Development of Generic 2D Platformer (and Pixahl) commence.

Right, I may be called on the name change to Piksahl. Piksahl was the Perl version, but that was just silly. Who programs a game in Perl? I started to, because I could. Now I’m doing it in Slick/Java. That makes more sense. Thus, the name change.

Categories: Game Dev Tags: , , , , ,

DrPetter’s SFXR with Ubuntu 8.10

May 9th, 2009 7 comments

“Ubuntu 8.10″ you say? Yep, I’m still rocking the Intrepid Ibex. Ubuntu 9.04 doesn’t work as well as I’d have hoped and I’ve got my Ubuntu 8.10 partition all configured and useful.

I’m getting off topic, though. I’ve been playing with the Slick game library (which is an extension of the LWJGL for Java game programming). And with any video game, you need sound effects. Lots of sound effects. And when you don’t know how to make sound effects, what better way to make them than… randomly!? Yes, by using a “random sound effect” generator. Particularly, DrPetter’s SFXR.

Download SFXR from DrPetter’s page first, but if that fails you can grab it locally here.

The install is the standard linux make/make install, but it requires libsdl1.2-dev and libgtk2.0-dev installed first. (Thanks to cecil for pointing out the gtk2 requirement).

sudo aptitude update
sudo aptitude install libsdl1.2-dev libgtk2.0-dev

Then run the make and install for SFXR (from within the SFXR directory)

make
sudo make install

Now you’re all set. You can run SFXR from the command line simply by typing sfxr.

Categories: Game Dev Tags: , , , , , ,