Jump to content

  • Log In with Google      Sign In   
  • Create Account

Way Walker

Member Since 11 May 2003
Offline Last Active Jul 31 2016 09:27 PM

Posts I've Made

In Topic: Idea: Private Linux Mirrors for game development

12 June 2011 - 05:34 PM

This is essentially what frameworks like .Net or Java do (although these are far from the first to do this). They specify a virtual machine which is essentially "a fixed OS", and even "fixed hardware" in the sense that the bytecode/instruction set is fixed. The idea, as suggested, is that you don't need to worry about changes in hardware or OS because you're targeting a virtual, as opposed to real, OS/hardware combination that doesn't change.

Actually, anything above assembly can get you a lot of the way there if you use cross platform libraries (assuming they're maintained, but the same is true of the virtual machine or any "reusable OS"). Even C is defined in terms of an "abstract machine". The only problem is that users aren't typically set up to compile code, but languages like Python and Ruby get around this by making compilation typical.

In Topic: N-body simulator

25 March 2011 - 08:29 PM

The only real difference between the two methods is whether you use an adaptive or constant timestep. In both cases you're essentially doing 6N individual integrations for the given timestep, the only difference is whether you change the timestep between steps.

Using a constant timestep is pretty much standard practice in molecular dynamics where many researchers simply use velocity Verlet. Check out LAMMPS for a popular parallel code that does this. The only problem is that you need to "guess" a timestep that will provide sufficient accuracy throughout the simulation. This isn't a big problem in molecular dynamics where the main issue is convergence and the maximum timestep for convergence won't vary much during a given simulation.

For an adaptive method, I've had good luck with SUNDIALS. All the work is done through an NVECTOR interface which makes parallelization easy enough. It provides a basic parallel implementation of the NVECTOR interface, but you'll probably want to write your own that works with how you'd like to partition your data.

In Topic: How many of you use C for game programming?

24 January 2011 - 02:15 PM

Oh and one of my big gripes is malloc and free are annoying as hell to use with all their casting clutter.

If you need to cast, then you're trying to compile a C program as C++. My favorite idiom is:
Type *var = malloc(sizeof *var);
This is less brittle, more readable, and the compiler will tell you if there's no prototype for malloc(). I don't know how relevant that last part is anymore. Maybe it could cause a problem if sizeof(int) isn't the same as sizeof(void*)?

But, I still agree that there's not much use for C in game programming. The only place I could see using it would be as a lighter choice than C++ to drop down to from a higher level language, whether for speed or gluing bits together. In those cases, I see myself using mostly the C subset of C++, and C++ isn't as good at being C as C is.

In Topic: Ubuntu

21 January 2011 - 07:17 PM

Look, all I wanted to express in response to this thread was that Ubuntu may not be the ultimate operating system when it comes to some everyday tasks that I feel are important. Ofcourse that's just an opinion, but I've seen so many cases of people giving a presentation on Windows and on some Linux distro (mostly Ubuntu). And most of the time the linux people need way more time to set things up. It's not a good impression when your employer for example sees you're struggling with your system.

I agree that Linux distros aren't always the best for some everyday tasks. I'm always running into minor issues with Skype, and if you want to rip to flac you have to jump through an extra hoop if you want to be able to seek to the middle of a track (at least if you use Amarok and k3b). However, I really don't get this presentation issue. Is that something that's been fixed since XP? I haven't seen anyone try it with Vista or 7, but in XP there's no end of issues, the most common being movies only playing on the laptop's screen and that dialog asking every few minutes if now would be a good time to restart your computer to install updates. On the Linux side, I plug it into the VGA port on my netbook and things just work. At least, that was the case in Kubuntu. I haven't tried it with openSUSE yet.

In Topic: Ubuntu

13 January 2011 - 03:54 PM

I switched to Ubuntu from Fedora for KDE support and greater stability. With Fedora, the attitude toward KDE is that they are a Gnome distribution so you're lucky they provided the packages at all, let alone if the packages work. They aren't much better with supported packages and things breaking is almost a fact of life with Fedora. KDE support is a bit better with Kubuntu being an official derivative, but it's still a derivative so it's not supported to nearly the extent the Gnome desktop is. Also, Ubuntu's focus on usability means that I've had good luck even with backports enabled.

valderman pretty much covered why I moved away from Ubuntu and currently use openSUSE. The Ubuntu forums try to be helpful, no RTFM attitude, but often seem like the blind leading the blind. Also, manual configuration is very nice in openSUSE with Yast where Ubuntu makes you jump through hoops. For example, there's a PPA that gets recommended regularly to get the aoTuV updates to the ogg vorbis libraries, but to use it you'd have to uninstall the standard libraries (which means you'll have to do something about the dependencies) install the version from the PPA, and lock that version meaning you'll have to manually track updates to the libraries. Unfortunately, aoTuV isn't available in the OBS for openSUSE, but, if it were, you'd just select the version you want in Yast, which will change the vendor so it will track the version in that repository.