Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Paul

Pages: 1 ... 172 173 [174]
Paul's Projects / Re: 3D Sound System
« on: May 03, 2009, 06:18:57 PM »
Today I discovered some delay problems when trying to put together some demos.  This problem didn't exist in earlier versions of SoundSystem, so it must be a problem with something I've added recently.  It appears to be a thread synchronization issue at first glance.  I will post an update after I've solved the problem.

Paul's Projects / Re: Map Maker
« on: May 03, 2009, 06:15:38 PM »
Here is an outline of my progress so far:

I have finished writing the code for loading texture and altitude maps, and I have created several tools for changing the view and applying textures to the map.  The code for selecting map cells is complete.  Cells can be selected one at a time or multiple at a time while holding down "Control".  It is also possible to "drag-select" with the mouse.  I made it so that if any cells are selected, the paint tool will automatically fill them with whatever texture I pick.  I made it so right-click always acts like the select tool, so I won't have to keep switching back and forth between tools.  I added in a visible wireframe that I can turn on or off from the Options toolbar.  This helps to distinguish one cell from the next.  The "Save" button in the options toolbar works nicely.  The "Load" function, however, isn't finished.  I've also added in buttons for "Select by cell", "Select by map", and "Free select".  The later two will be implemented later after I add in the ability to load more than one adjacent maps at a time.

Paul's Projects / Re: Map Maker
« on: May 03, 2009, 06:11:08 PM »
Project Overview:

This project will consist of two parts.

The first part will be a graphical user interface for generating 3D maps.  Maps will consist of textures, altitudes, objects, and water.  The GUI will allow the user to load custom textures and objects.

The second part will consist of a user-friendly library for loading the maps generated by the GUI for use in an actual game.

This is one of the tools I will need for the "Universe Storage" game.

Paul's Projects / Map Maker
« on: May 03, 2009, 06:06:59 PM »
-- This slot is reserved for resources, links, and screen shots --

Paul's Projects / Re: Robot Builder
« on: May 03, 2009, 06:04:37 PM »
I thought I would explain how Robot Builder is going to work, in case anyone was curious about it.  The way the controls are supposed to work is that you open a chip editor and drag flip-flops and logic gates from a toolkit into the editor to wire them up together and create an IC chip.  From there, you would be able to click on the robot and wire the IC chip into it.  The robot would behave depending on the circuit.  If you happened to look at the 2D version of Robot Builder, what you are seeing there is a wall-hugger circuit at work.  Graphically, it would look like this:

Since I never finished the menu system, I programatically hardwired the circuit into the robot just to test the PartManager infrastructure and connecting to inputs and outputs on the robot.

Paul's Projects / Re: Robot Builder
« on: May 03, 2009, 06:04:02 PM »
Project Overview:

This project is one of the mini-games I plan to make on my way toward the "Universe Storage" game.  The concept for "Robot Builder" is to create IC chips, then wire them up inside a robot to make it do stuff.  It is a little like the concept of an old game I used to play called "Robot Odyssey" (This game was a great way for anyone to learn the basics of logic and electric engineering in a relaxed-pace, fun environment - one of my favorites back in the day.  I recommend googling it).  I have already created a class called "Part", which is managed in a class called "PartManager".  From the "Part" template, I have created the following logic gates: AND, NAND, OR, NOR, XOR, XNOR, and NOT.  I also made TFlipflops and SRFlipflops.  I began creating Robot Builder in 2D, because when I started the project I had almost zero experience programming in Java.  But now after completing the SoundSystem library, I am quite familiar with Java, and would rather put more work into learning to use jPCT in an actual game. 

This project will be my first attempt to create a 3D robot builder game.

Paul's Projects / Robot Builder
« on: May 03, 2009, 06:01:37 PM »
-- This slot is reserved for resources, links, and screen shots --


Robot Builder 2D  (Unfinished)
My original 2D version of Robot Builder.

3D Robot Viewer
Applet I created to test my 3D robot.

Robot Odyssey  (Wikipedia)
The inspiration for Robot Builder

The Robot Odyssey Resource
AppleWin emulator and Robot Odyssey disk images

Paul's Projects / Re: 3D Sound System
« on: May 01, 2009, 08:55:27 PM »
Project Overview:

This project began as a problem posted on the jPCT forum about OpenAL being extremely complicated, and that there needs to be a 3D sound library that is easy to understand and use.  I decided to create a class that does all the tedious stuff and simplifies OpenAL.

This project has evolved a lot since then.  I have since added in a plug-in infrastructure for interfacing with multiple 3rd-party sound and codec libraries, the ability to switch between OpenAL and JavaSound on the fly, automatic compatibility checking, and much more.  And of course, I extended the base library to make a version that is easily compatible with jPCT.

If you are interested in reading about the early development of the library, check out the original thread here.

If anyone has any ideas for improving the library, let me know!

The SoundSystem License:

You are free to use this library for any purpose, commercial or otherwise.
You may modify this library or source code, and distribute it any way you
like, provided the following conditions are met:

1) You may not falsely claim to be the author of this library or any
   unmodified portion of it.
2) You may not copyright this library or a modified version of it and then
   sue me for copyright infringement.
3) If you modify the source code, you must clearly document the changes
   made before redistributing the modified source code, so other users know
   it is not the original code.
4) You are not required to give me credit for this library in any derived
   work, but if you do, you must also mention my website:
5) I the author will not be responsible for any damages (physical,
   financial, or otherwise) caused by the use if this library or any part
   of it.
6) I the author do not guarantee, warrant, or make any representations,
   either expressed or implied, regarding the use of this library or any
   part of it.

Author: Paul Lamb

Paul's Projects / 3D Sound System
« on: May 01, 2009, 08:46:45 PM »
-- This slot is reserved for the most recent working releases --


Sound System  Version date:  January 7, 2012
The core SoundSystem library, independent from 3rd-party libraries.  It is stripped down to the bare essentials, and designed to be easily customizable with various sound library and codec plug-ins.  If memory is a concern (such as in an applet) this may be a good option, because it allows you to choose as many or as few plug-ins as you require for your project.  NOTE: The core SoundSystem library without any plug-ins is only capable of playing MIDI files.  Additional plug-ins should be added for more capabilities.  The source code and license are included in the .zip file.

Sound System jPCT  Version date:  January, 2012
The jPCT-friendly 3D sound library.  The SoundSystemJPCT class overrides the core SoundSystem libray, and provides a number of methods to make adding 3D sound to any jPCT project easy.  It includes methods for binding Listener to Camera and Sources to Object3Ds, as well as using SimpleVector parameters.  SoundSystemJPCT utilizes the LWJGL binding of OpenAL (with JavaSound as a backup option), and the J-Ogg library for .ogg support.  NOTE: The core SoundSystem library, source code, and all relevant licenses are included in the .zip file.

SoundSystem Utils  Version date:  August 9, 2009
Includes a SoundSystem loader, and an example XML file.


JavaSound library plug-in  Version date:  January 7, 2012
Interface to the Java Sound API.  More compatible than OpenAL, but not as high quality and fewer features.  This plug-in utilizes JavaSound's panning and volume control methods to simulate an reasonable-quality 3D sound system.  Known bug: quickPlaying sounds will begin playing them at full volume for a split second, before switching to the correct volume.  This is a bug with the Java Sound API itself, and therefore beyond my control to correct.  An easy workaround is to add 0.02 seconds of silence to the beginning of each sound effect (the free Audacity sound editor works well for this).

LWJGL OpenAL library plug-in  Version date:  April 17, 2013
Interface to the LWJGL binding of OpenAL.  The LWJGL library ( is required for this plug-in to work.  This library sounds much better than Java Sound, but is not as compatible.  I recommend using the JavaSound library plug-in as a backup option.  NOTE: Please read the included LWJGL license.

JOAL library plug-in  Version date:  April 17, 2013
Interface to the JOAL binding of OpenAL.  The JOAL library ( is required for this plug-in to work.  As mentioned previously, this library sounds much better than Java Sound, but is not as compatible.  I recommend using the JavaSound library plug-in as a backup option.  NOTE: Please read the included JOAL license.

WAV codec plug-in  Version date:  October 23, 2010
Adds support for .wav files.

JOgg codec plug-in  Version date:  August 24, 2010
Adds support for .ogg files using the J-Ogg library.  This codec is less compatible than the JOrbis codec, but the license is less restrictive.  Sometimes running incompatable .ogg files through a converter will make them compatable.  NOTE: Please read the included JOgg license.

JOrbis codec plug-in  Version date:  November 23, 2010
Adds support for .ogg files using the JOrbis library.  More compatible than the JOgg codec, but reads data more slowly (it may not be possible to stream more than one file simultaneously when using this codec).  This plug-in is licensed by the LGPL.  NOTE: Please read the included LGPL document.

IBXM codec plug-in  Version date:  August 24, 2010
Adds support for Protracker, Fast Tracker 2, and Scream Tracker 3 (.s2m, .mod, and .xm) files using the IBXM library.  File sizes for these formats tend to be quite small, so this may be a good option for background music.  This plug-in is based on or using the IBXM library, which is bound by the BSD License.  NOTE: Please read the included license document.

JSpeex codec plug-in  Version date:  August 24, 2010
Adds support for .ogg or .wav files encoded with Speex (a compression optimized for human voice).  See for more information.


JavaDoc  Version date:  November 8, 2011
Also includes the JavaDocs for SoundSystemJPCT and all library and codec plug-ins, and the utils library.

3D Sound with SoundSystem  PDF (download the example programs)
A tutorial-style guide to using the core SoundSystem library (last updated: April 14, 2009).

Guide to SoundSystemJPCT  PDF (download the example programs)
Another tutorial-style guide to using SoundSystemJPCT. (last updated: April 14, 2009).


Sound Effects Player  (download the Source Code)
Demonstrates library switching on the fly, streaming background music, playing MIDI, and playing multiple sources simultaneously.  Last updated August 21, 2010

Bullet / Target Collision  (download the Source Code)
Demonstrates the LibraryJavaSound plug-in.  Last updated March 30, 2009

Holy Bouncing Helicopter Balls!  (download the Source Code)
Demonstrates moving through a world with multiple sources.  Last updated August 21, 2010

What's new?

- Fixed raw data stream repeating bug in LibraryLWJGLOpenAL and LibraryJOAL
- Fixed raw data stream millisecond position bug in LibraryLWJGLOpenAL and LibraryJOAL

Modelling / Re: How to convert Google Sketchup models to .3ds
« on: May 01, 2009, 08:37:44 PM »
Method #2
(when the FBX Converter doesn't work)

I have found that the Collada importer for Blender is more compatible than the FBX converter for loading .dae files.  Blender is free, making it a good tool to use for converting Google Sketchup (free version) models into .3ds.

How to use this method:

1) Download Blender from and install it.  Pay attention to what version of Python it recommends that you download.

2) Download the correct version of Python from and install it.

3) If your version of Blender doesn't import .dae files, download the COLLADA plug-in for Blender from  Follow the included instructions for installing it.

4) If your version of Blender doesn't export .3ds files, download export_3ds2kex.txt from (requires a free registration).  Rename it to and copy it to the Blender scripts directory.

5) Follow my previous instructions for obtaining the .dae file.

6) Import the .dae file into Blender.

7) Export to .3ds.

Modelling / How to convert Google Sketchup models to .3ds
« on: May 01, 2009, 08:33:40 PM »
If you have tried to create models for your 3D games, you probably know that many modeling programs out there (like Max) are quite expensive, and have so many features that using them feels like drinking out of a fire hose. One of the simplest modeling programs to use (in my opinion) is Google Sketchup ( It doesn't have a lot of the features of some of the other modeling programs available, but it is more than sufficient for most models you will want to create. There is even a "3D Warehouse" full of Sketchup models available for download (

Only problem is, the free version does not export your model into a common format (like 3ds). So I figured out a way to do the conversion.

The first important piece of information I found, is that the .kmz file format is actually just a .zip file. If you export your sketchup model to "Google Earth 4 (*.kmz)", you can change the name of your file from filename.kmz to and look inside. You will find a model file in there, of the Collada "Digital Asset Exchange" format. It has the extension ".dae".

Once you have your .dae file, you will, of course need a converter to change it to a .3ds file. I found a free converter that will do this for you. It is called the FBX converter tool, on the Autodesk website.

You can download the windows version of the FBX converter from:
The program will install to the following location (unless you specify otherwise):
Program Files\Autodesk\FBX\FBXConverter\2006.11.2\FbxConverterUI.exe

I also saw Mac and Linux versions of the converter (I forgot to grab the links while I was there - you'll have to search the Autodesk site if you aren't running windows).

Now the FBX converter will convert your .dae file into a .fbx file. From there, the FBX converter will let you convert the .fbx file into a .3ds file.

This converter also supports a few other formats, so it could be pretty handy to have around.

Here is the process for converting from .skp to .3ds:

1) Download or create a .skp model in Sketchup
2) In Sketchup, export your model to "Google Earth 4 (*.kmz)
(note: be sure to choose version 4, because the other one is different)
3) Change the extention of the .kmz file to .zip
4) Pull out the .dae file
5) In FBX Converter, convert the .dae file to .fbx
6) In FBX Converter, convert the .fbx file to .3ds

The main problem with this conversion method is that the Autodesk FBX converter is often not able to convert many .dae files (possibly due to large poly counts) :'(.  Fortunately, I found another more complicated method which generally works for cases when the method above doesn't work.  I will outline this other method in my next post.

Another issue I sometimes have when converting models is the materials not being quite right.  When necessary, I use a free program called LithUnwrap ( to edit the materials.  Lithunwrap works great for this, but it does have a maximum number or polys it will load, so there are probably better programs out there for editing materials.

I made an applet that loads a .skp model I converted:
(Use the mouse to rotate the object)

You can get the source code at:
(In this demo applet, the .3ds file needs to be compiled into the jar)

And to show that I actually converted that model, here is the original Sketchup file:  8)

Pages: 1 ... 172 173 [174]