Details about Archipelago

Years ago (yes! it’s been years in the making… excuse me!) I started writing the 1st version of Archipelago using C#. I never publish it. It was basically my own little “OpenGL research” project. I have learned SOOOO much doing this! ie: as an Electrical Engineer I never heard about “quaternions”. I was always curious about how those fancy 3D games were done. Nowadays there is so much help that you can find in the internet and people are so generous sharing their knowledge and work! …and I want to give back in a small way allowing anyone to download this program for free. It is fascinating to me and I like the challenge to see what it takes to do it. (I think in general people do not appreciate how much work goes into these 3D games and how complex they can get…. but the “techies” do!) So as an after-hours hobby I learned OpenGL and at that time, how to interface with C# using OpenTK. Back then I was using MS Visual Studio.

Then I had to learn Java (for my real job) … and to my surprise… I liked it! There are so many libraries and tools available for Java (for free! including NetBeans IDE and JogAmp) and I never looked back. I did some benchmark speed tests and noticed no degradation in performance compared to C#. This is not surprising because the bulk of the work is done by the GPU, not the CPU. Some may say I went the wrong way with the language, but … oh well. Let them be happy. Actually many would argue that C# is just in fact a crude copy of Java … so…. but I am not going to get in a political discussion! You’d be the Judge. On the other hand, the API libraries for OpenGL in Java (jogl and jogamp) at the time, were being kept more up to par with newer OpenGL versions as compared to OpenTK (sorry!). Currently I am using GL version 4.3.

Along the process I had to learn about 3D modeling using the well known tool BLENDER; I chose OBJ open format in particular because it is easy to manipulate: it is a text-based 3D modeling format by Wavefront Technologies and this is their wiki page: https://en.wikipedia.org/wiki/Wavefront_.obj_file

So, I wrote a crude OBJ parser. This is currently the only way to add 3D models to Archipelago; but theoretically you can add any OBJ model! Even your own! You might have to “tweek it” a little but you can make it work. Obviously, for gaming it is preferable that these models be “low poly“, as the higher polygon models can affect performance and slow the program down (like with ANY 3D games!).

Obviously, to make your own 3D models, you need a good tool. I highly recommend BLENDER ( see www.blender.org )which is free and very popular; but there are many others that can create OBJ files. It may take some “tweaking” to make it work in Archipelago (you can use the models under the program’s /models/ folder as a reference).

NOTE: I took the “liberty” of expanding the OBJ format to include some parameters needed by Archipelago Sim – see files with extension .xobj. I’ll discuss more about this somewhere else, but for now if you want to “mess” with that, you can use the currently included OBJ models and XOBJ as a template using a good text editor like NotePad++

One of the many challenges has been the physics: especially water/waves physics as it can get extremely complex but most derive from the basic Navier-Stokes equations, which have to be simplified because of the real-time calculations required in 3D gaming. But there are other approaches (search for Tessendorf , Trochoidal waves and FFT applications). Long story short: I ended up using “Trochoidal waves” which is an extension of “Gerstner waves” that when combined with textures and some vertex/fragment shader tricks, you can obtain relatively decent-looking waves. In full disclosure: I am not going to pretend to have the best water/wave simulation in this program but I think it is quite adequate. I am always working at it πŸ˜‰

As this “research project” became more complex, the natural progression was to make it into a full-fledged “game” which I called “Archipelago – a Sailor Simulator”. Only until recently I decided to publish it. I know … there is still a lot that can be improved. With time πŸ˜‰

Hey! if someone out there wants to join me in the further development of this project, contact me but keep in mind this is a free program, so don’t expect any $ from me. πŸ˜‰ But you could use this as a learning platform, if you want to seriously work in this area in the future.

In conclusion.. it had been fun! I hope you enjoy playing Archipelago as much as I enjoyed developing it!

Quote: “Any fool can know. The point is to understand.” –Albert Einstein