Project Octant Part 4: The Beautiful Noise

By Shamus Posted Monday May 7, 2012

Filed under: Programming 62 comments

Perlin Noise is a technique for quickly generating a metric crapload of really interesting pseudo-randomness. “Interesting” in that it forms nice organic patterns instead of pure random noise. “Pseudo Random” in that you can give it the same input and get the same output. “Crapload” means that you can make a final data set thousands of times larger than the noise you start with.

Note that in the context of this project I’m going to discuss Perlin in terms of 2D images, but I’m using it in 3D. It’s just easier to show you what we’re doing in 2D.

We begin with a basic image of really random noise, which I will depict as a 2D greyscale image. The more random the better. We want areas of light, dark, and medium brightness. We want it to be really diverse overall, but have small local clusters of bright or darkness. We don’t want large areas to be homogeneous, and we don’t want the small areas just just be a scatter of white and black pixels. We can accomplish this a lot of ways. I could churn out a bunch of values in a random number generator, for example. Or, we can just open up a new image in your Photoshop of choice, crank up the noise filter on a blank image, and hit save.

octant4_1.jpg

Awesome, right?

Continue reading ⟩⟩ “Project Octant Part 4: The Beautiful Noise”

 


 

Alan Wake EP8: A Chainsaw for a Face!

By Josh Posted Saturday May 5, 2012

Filed under: Spoiler Warning 190 comments


Link (YouTube)

This was supposed to go up yesterday, but Shamus had some sort of inexplicable problem when he tried to watch it. On an unrelated note, I would like to point out that Shamus is a crotchety old man that doesn’t have time to figure out you youngins’ newfangled “internet videos,” thank you very much.

 


 

Experienced Points: Kickstarter: Proceed With Caution

By Shamus Posted Friday May 4, 2012

Filed under: Column 173 comments

This morning I sent in today’s column, clicked over to Penny Arcade, and saw they have a comic about this very same issue.

 


 

Project Octant Part 3: Using Qt

By Shamus Posted Friday May 4, 2012

Filed under: Programming 100 comments

Qt is a cross-platform application and UI framework with APIs for C++ programming. In English, that means it’s a bunch of software that you can add to your project to make programs with a GUI that will run on Windows, Linux, or Mac. This is actually a big deal. There’s a reason that so few programs are cross-platform: It’s hard to write code that will run anywhere.

I know I keep sending you back to the Object-Disoriented Programming post so often it sort of feels like a Rickroll at this point, but this is a really important problem. C++ itself is very barebones. It doesn’t load fonts. It doesn’t understand images. It doesn’t understand windowed environments. To do these things you need an SDK. You’ll need one for each new thing you want to do. Each one might tie you to a particular operating system, and they’re very likely to conflict with each other in annoying ways. By the time you get all the stuff you need for GUI, images, sound, graphics, threading, and input, your project will be this Frankenstein’s Monster of sewn-together systems. And you haven’t even started coding yet!

Continue reading ⟩⟩ “Project Octant Part 3: Using Qt”

 


 

Alan Wake EP7:Bears & Flares

By Shamus Posted Thursday May 3, 2012

Filed under: Spoiler Warning 106 comments


Link (YouTube)

When you meet the kidnapper, it shows him drop a flare and seem to wipe out a bunch of Taken at once. This led me to the incorrect conclusion that flares = grenades. This came back to bite me when you’re supposed to hold them off. I was using them all wrong. I kept throwing them down, trying to figure out why the flares weren’t killing my foes like I expected. Do I need to be closer? Do I need them to cluster up more? Then when the guy told me to hold them off, I’d already run out. Oops.

 


 

Project Frontier: Source

By Shamus Posted Thursday May 3, 2012

Filed under: Programming 125 comments

frontier_source1.jpg

The source for Project Frontier is now available on BitBucket. I’m really hoping you find it to be useful. I’m very sorry to see I left the codebase in such shabby shape.

The program defaults to re-loading the last save you played. If you’re running it for the first time, then it doesn’t do anything. Bring down the console with ~ and type:

game new 1

You can replace the 1 with any number you like. That’s the seed number used to create the world. Different numbers will lead to different worlds. (The screenshot above is from right near the spawn point in world #1.)

Looks like it also defaults to wireframe on, textures off, shaders off. That’s dumb. Sorry. In the console:

render.shaders=1
render.wireframe=0
render.textured=1

That should put you in a good place. Also use:

mouse.invert=1

If you’re a mouse-inverter. Use

flying=1

Or:

flying=0

To turn flying on and off. The WASD keys move you around. Right-click enters and exits mouselook.

Missing textures are represented with a checkerboard pattern.

Please let me know if you have any other problems.

 


 

Github

By Shamus Posted Wednesday May 2, 2012

Filed under: Notices 155 comments

EDIT: So after spending the better part of an hour trying to make this work, I see a comment from someone pointing me to an old post where I talked about using Mercurial for my project. I sort of vaguely remember looking at Mercurial at some point. I think I installed it?

I look, and sure enough I see Mercurial files in the Project Frontier directory. Hm. So I guess all I need to do is create an account on BitBucket?

I do so, but it turns out I already have an account. I log in, and I find weeks and weeks of meticulously tracked changes. Apparently I not only used Mercurial, but I used BitBucket, and I used both extensively. I can read through hundreds of changes. All written by me.

It is really, really creepy realizing that I did all this stuff and no longer remember it. It’s like looking at someone else’s work. Or like someone else is reading my work. Or something. I don’t know.

I’m worried there’s something wrong with my brain that makes me forget things. Also… what if there’s something wrong with my brain that makes me forget things?

Okay, I’ll be making the repository public, but I need to go freak out for a little while.

So I’m trying to add Project Frontier to GitHub. This is not going well.

Created an account. Created a repository. Installed Git locally. Followed the directions to set up git locally, which includes typing stuff into a Linux shell, which is trivial if you know what you’re doing and utterly, utterly mysterious if you don’t. Created ssh key. Set up a local repository. Added files meticulously one at a time from a list of hundreds of files because the Git GUI just lists all files and I don’t see how to filter for JUST source files. I hit commit and… nothing showed up.

Okay. This was supposed to be a quick & easy thing, and I’m now 40 mins in, I’ve got Git infrastructure spewed all over my computer and I can’t get it to do this very simple thing. I’ve used source code control before, and it was always pretty straightforward. Even thirteen years ago, I never had to type crap into a console window to perform simple tasks. Is Git only for people who understand Linux? (The front end is all friendly and Windows-like, which is what led me to believe I’d be able to do this. If it started with a console window I would have realized this was for someone with a different skill set and looked elsewhere.)

I see to get it to ignore the hundreds of unwanted files I just need to create a file called… .gitignore. Damn it. Stupid Windows will allow filenames starting with a period to EXIST, but it won’t let you CREATE them. (Minecraft has this same problem: the install directory is called .minecraft, which means if you want to backup & restore, you have to COPY files in and out of it, instead of renaming the directory.) You can blame Windows (I do) but the upshot is that I can’t use this feature on this operating system.

I have no idea what Git wants or how it works. I don’t see ANYTHING that tells me how to push changes to the remote repository. If doing simple things like “submit changes” means using a terminal window, then… damn. What year is it? I know you Linux coders have a high tolerance for this sort of thing, but damn – there are better ways of using a computer these days. Case in point: If I had a menu, I would be able to work this out for myself.

So, I’m willing to put time into this if it means it will be done right. But if Git is useless to a non-Linux person on a Windows machine, then it’s time to uninstall this mess and look elsewhere. So how about it? Is it possible to use GitHub with this GUI front end? Can Git work without using a terminal? If Git works on Windows, can someone explain how to go about getting files from here to there?

Sorry to use the community as a search tool, but Google isn’t helping and I’d like to know if I’m wasting my time before I do any more of this.

EDIT: Based on the comments, looks like GitHub is the wrong way to go for me. I’m going to try out BitBucket.