Feeds:
Posts
Comments

While trying to remain as distribution-generic as I can, this HOWTO will, as a matter of course, focus on Debian and Ubuntu. This information is current as of openBVE 1.2 and Tao Framework 2.1.0.

If you just want it to work: openBVE is available in Ubuntu’s repository now (as of 9.04, see here), but it lags behind the official version. Everything is installed automatically and it works out-of-the-box.

If you’re like me though and hate having a software version lagging behind, or you want or need to manually install openBVE, here’s what I had to do.

Manual Installation:

  • Prerequisites: Just one thing. You’ll need to install Mono if you don’t have it already. It’s apparently included by default with Ubuntu and other Debians, so this eases our pain a little bit.
  • Installation:
  1. Download the openBVE executable package zip file on openBVE’s download page. Extract it to a folder.
  2. Download the Tao Framework. Get the .tar or the .zip archive of the latest version. Extract all of these files to your openBVE folder. (No, all of them probably aren’t necessary. It’s just much quicker than sorting through them.)
  3. Install OpenAL and ALUT from your distribution’s package repository. The canonical Debian example:
  4. sudo apt-get install libopenal0a libopenal-dev

    and

    sudo apt-get install libalut0 libalut-dev

    If you can’t install via a repository, you’ll probably either have to find the files elsewhere or compile them from source from here. I think you can install using the .dmg for OS X but I don’t know how.

  5. I had problems getting sound to work. If you do, try this:

    In your openBVE folder where the Tao Framework was extracted, open the file Tao.OpenAL.dll.config in a text editor.

    Change the line

    <dllentry os="linux" dll="libopenal.so.0" />

    to

    <dllentry os="linux" dll="libopenal.so.1" />

    and save.

  6. To run openBVE, open a terminal and change into the directory where you’ve extracted all this mess:

    cd /path/to/openBVE

    Then type

    mono openBVE.exe.

    This should hopefully give you a completely functioning openBVE.

Notes:

  • I tried simply copying the files over from my Windows partition and running openBVE but that didn’t work. I have no idea why, unless the versions are different and I didn’t know it.
  • I’m getting a very low frame rate but that’s probably due to my poor graphics card. You’ll probably have better results.
  • Don’t be surprised if you end up with graphical glitches. I haven’t seen any in-game so far, but images in the pregame menus are distorted. I couldn’t get a 3D cab to load either.

References:

’90s Web design

Something about the mid-1990s Web is intriguing. It’s very evocative of an amateurish spirit; perhaps one a bit more freeform than today’s. Dare I say it has a certain bit of charm about it.

But that’s not to say the designs were much good. Garish colors, terrible dithered GIFs, drop shadows, beveled edges and seamed tiled backgrounds were the order of the day. By the looks of it even professional companies had a weird idea of good design. Case(s) in point.

I think Google and Yahoo! are canonical examples of this because of their place in the growth of the Web. So, let’s proceed to laugh at them in a ridiculing yet loving manner (along with Microsoft and Apple):

Ahahahahahaha. Ahaha. Ha. Makes you feel a bit more high-and-mighty, now doesn’t it Mr. Homebrew Designer? Google’s site here is from 1999, a bit later, but it still shows its age. Yahoo!’s header is a prime example of what I mean by “terrible dithering”. These were the “better” designs too. Almost every high-end professional company site from then, by today’s standards, looked amateurish. They weren’t necessarily any less professional; the technology just hadn’t developed.

Ah, but the meat of the matter, the heart of the Web, was the user-created, amateur “home page” scene. Trust me, it deserves the quotations.

The essence of the mid-90s Web, and even ’90s life in general, was one of affluence. Everyone seemed to catch the “gotta-have-it-now” disease. See what I mean? Pokémon had nothing on how many useless widgets were needed on a page to make you feel cooler than that one creepy guy down the street with three computers in his basement who had a webpage filled with overstretched pictures of kittens.

Naturally, we can’t leave out FrontPage. It was my first tinkering experience with anything remotely related to coding and designing. I remember using FP Express waaaaaaay back on Windows 98. I had no knowledge whatsoever; it was just fun to take a site and flip it around a bit using FP’s WYSIWYG editor. Sure, it may have been accused of spitting out invalid HTML and leading to websites being “too easy to design badly”, but it did give me my first taste of design (not that I’m any better for it now).

Despite how terrible the designs may have been, they still are a part of web history. So, long-broken hit counters, IE page transitions, construction signs, spinning globes, dancing balogna, and rainbow divider bars, we salute you! We stifle laughter while doing so, but nevermind that.

With the decline of sites like GeoCities and the rise of social networking, it’s obvious a shift has occurred. No one uses free hosting services anymore. All the terrible design is being recycled, somehow, into profile-oriented sites like MySpace, albeit with more, uh, “snazziness” thanks to CSS support. Worse, it’s being recycled into a new generation.

It makes me wonder: What will be thought of the current designs in a decade?

Crave more pain? Of course you do! Try WebPagesThatSuck and the ancient yet interesting So what is “So ’90s” in Web design?.

Good web design is simple web design. A plain black-and-white HTML page beats the pants off something deemed “good” because it looked like it used more than text and the header size tags.

Making it a habit

They say that in order to make a habit out of something, one needs to do it for at least a month. A solid 30 days of forcing yourself to action will eventually ingrain into your mind an automatism, and the effort needed to get to action will diminish.

I hope I can do that with writing here. Two days from now will mark my NaBloPoMo 30 days of posting. I wonder if it’ll get easier or harder..hmm.

Frankly I just don’t want to stop for fear that I’ll never be able to start again. I want to see if I’m capable of it. I may not make it every day (especially after going back to school), but I don’t want to let this blog die a slow, painful death either. Hang on, what’s that? It already has? Case in point.

Oh, that reminds me: Did you ever notice that when you run out of topics you start making self-referential ones? I have nothing else to write about so..I write about making a habit out of writing. Sounds suspiciously like metablogging (see number 10).

I spent a long, hard time yesterday trying to make sense of parameter passing. Oh, what a ‘joy’ it was. Just to make everyone else feel better about themselves, here’s my flawed understanding of it…at least in C++. Don’t take this to heart, because I guarantee there’re mistakes.

First, a couple definitions:

  • Parameter – what a function is defined to accept as an argument (in its prototype and definition)
  • Argument – the actual value passed to a function by a caller

Passing by value creates a copy of the arguments to a function. The arguments given to a function are different values from the parameters defined in a function. Attempting to change the parameters won’t affect the arguments passed to the function, since they refer to different values.

Consider:

void noRef(int x, int y){
x = 56;
y = 20;
}

If int i = 3, and int  j = 9, and we call the function as noRef(i, j), then we would expect i to be set to 56 and j to 20. But they aren’t. In effect, without passing by reference, this function doesn’t do anything. This is because we’re trying to modify what is passed directly, which won’t work because the original i and j aren’t being passed, but instead copies of them.

Passing by reference passes the address of the arguments, and thus instead of making a copy, both the arguments given to the function and the parameters defined in a function are referring to the same value.

It is possible, then, to change the arguments passed to a function directly.


void ref(int& x, int& y){
x = 56;
y = 20;
}

If we call ref(i, j), then i = 56 and j = 20, just as we’d expect.

Passing by reference is also more efficient for larger variables, like structs and vectors. Instead of taking the time to copy them, they can simply be referred to. If it is desirable to pass by reference (e.g. having a large struct) but not allow changes to be made, one should use the const keyword so that the struct is not copied (thus more efficient), but it retains the safety of passing by value (because it can’t be changed).

A question that I raised to myself yesterday was why a function like

int add(int a, int b){
int c = a + b;
return c;
}

worked both with and without references. The best I can figure is that no parameters are being modified directly. We aren’t trying to change the value of a or b. And, since copies of the original values are being passed to the function instead of the original values themselves, having no references yields the same result as with references.

Oh, also: This site is pretty much what got me to understand this concept.

Ok, so I (mostly) finished going through that book I mentioned the other day. Then I remembered that I have a book better-oriented toward C++, so I started reading it yesterday. It’s How To Think Like a Computer Scientist: C++ Version. It’s also available for Java and Python, in various file formats.

I’ve read it with eagle eyes. I’ve pored over every page, every line of code, done most of the exercises, and I felt like I was making some real progress. Apparently it was all in vain.

I’ve only felt like I was making progress because the stuff until now is easy for me. One exercise took me a while to figure out, but other than that most of it has been fairly trivial.

But now I’m being introduced to things I have no idea about. Every single book or article I read never explains the stuff after the basic-basics right. This time around, I keep getting hung up on the concept of passing by value and by reference, and by just what the hell an ‘object’ is.

Nothing makes sense because as soon as a term is introduced, it’s used extensively. A lot of the time, even the definitions tend toward being recursive.

The only things I need to learn are the things that don’t feel very well explained. Naturally. Aargh. This calls for a reread of probably the last 20 pages or so. A very careful reread.

I don’t know how long it’s been like this (can’t be too long), but the site’s been redressed. Check it out.

nicetranslatorcapture

One word: o…k. I can dig the softer colors (a bit too subdued) but I really liked its organization better before. There’s just something about it that makes it feel much more cluttered.

What gets me how such a simple, useful site can manage to feel heavier than it needs to. I find it a bit intimidating, even though it’s supposed to facilitate ease between the user and multiple language translation. The excess of text really doesn’t do much for it.

With all the stuff, there’s nothing to focus on, which is key in simple design. Obviously the textbox and language selectors are supposed to draw your eyes but they really don’t, at least not mine.

But I’m rambling. Nice Translator is a great piece of work. The design is fine, it just needs tightening up (like those graphics on level 3).

Oh, and I took the screenshot with Screenshot Pimp, an add-on for Firefox that allows a page to be saved as an image. It’s handy to avoid having your browser’s GUI get in the way, and it can also capture the whole page, even if it’s not all visible.

If you’re interested in continuing with NaBloPoMo but have trouble writing either on the monthly topic or thinking up something of your own, I recommend Daily Prompt.

Essentially, a new writing topic is posted daily and users can submit their entries based around the topic. At the end of each week or so, there’s a summary of submitted entries. It’s not specifically for blogs, although it suits them rather well.

I especially recommend subscribing via RSS. Nothing beats having new, fresh ideas every day to run with.

Writer’s block be gone! *Huzzah!*

openBVE fans, rejoice!

Happened upon this video today (I’m a bit late in finding this out):

Look at that detail *uncontrollable drool*.

As of version 1.2, 3D cabs are now a reality. The route in the video hasn’t been released yet but if you want to try out a 3D cab, follow the instructions here. It’s the only released 3D cab yet, as far as I can tell.

C# book find

I found a pretty sweet e-book for learning C# the other day (I believe via GameDev.net’s forums). I just recently started actually paying attention while reading it, and today I’m a bit over halfway.

It’s called the C# Yellow Book by Rob Miles, and it’s not as dry a read as you might think. I find it to be a bit confusing but I’m not as well-acquainted with programming in general as the intended audience for this book probably is.

This is a problem with quite a bit of the programming info I run up on. It’s all smooth and easy until they hit the topics I want and need to study, then it just falls flat. They start assuming knowledge (my fault for not studying enough) and, maybe my knowledge is really lacking, but the explanations tend to start feeling…off.

I find the organization to be a bit haphazard too, but it’s not particularly hard to follow.

I’m not using it to learn C# specifically; instead, I’m hoping it’ll give me more of an insight into classes and all the object-orientation hobblehoo that I’ve been trying to wrap my head around for a long time. So far, it’s doing a pretty good job. And I’ve happened to learn a fair bit of C# too.

Some of the explanations have helped me a lot, particularly the ones pertaining to interfaces, abstract classes, and overriding methods, though I still question how much I really understand because I tend to skim a bit lot.

Great read. If you’re acquainted with Java, he has another free book on his site to ease you from Java into C#. I don’t know any Java, naturally.

This post is certainly going to be lacking in it.

My largest difficulty in writing, and learning how to write, is gathering substance. To make something worthwhile to read, a piece needs at least one of three things:

  • An engaging narrative
  • Usefulness, or
  • Entertainment value

The trouble with the former is a lack of imagination. Even the most contrvied tale had a large degree of effort put into it. Planning is crucial in crafting a story. Guess what I don’t like to do?

Even if it’s a true story, it has to be organized. It’s a completely separate art to have the ability to stick to a plan and restrain oneself from wanting to  tread tangents. Brevity is brilliance and all that.

But, I never manage to write enough. I’m always either short-sighted and miss important details, or too wordy because I’m afraid I’m missing something. It’s hard for me to strike a balance between being vapid and “fleshed-out” while avoiding drowning in prolixity (I love that word).

For usefulness, it takes a lot of research to gather all the things needed to make a writing useful. To serve the reader, every source has to be noted, and every nook has to be searched for the best information possible. Research is something I despise having to do.

And to top it off, it has to be organized, and it has to be organized well. Every section and every paragraph should flow into the next without breaking the reader’s comprehension. In other words, the text should just make sense, without making the reader question its order.

All that’s left for me is entertainment value. I’ve had a few people think I’m funny, so maybe I’m doing something right.

Good writing takes much effort. Much more than I feel I put into it.

« Newer Posts - Older Posts »