Making a BitFire (to keep your computer warm)

I was gaming the other night, and suddenly missed the sight of a warm fire next to me. I grew up with a wood stove, so am quite fond of it. Unfortunately, my apartment does not have a fireplace – so I decided to simulate some fire instead!

Using Python, I wrote a quick script to generate a 2d array of one of three values – red, yellow, or black – one row at a time, with each row after the first (all red) seeding a random integer between 1 and 3. If the number equals 1, that column “decays”, or decreases in color (from red to yellow, or from yellow to black). When ran through an infinite loop and throttled by a sleep function, I got a nice little animation in the terminal window that looked like this:56789

That looks neat, but it also doesn’t look like fire. I added some code to make it take into account the array used in the previous loop (instead of completely random each frame) and also counted the elements to each side in the calculation, rather than just the one below. The result looks like so:bitfire2

Poor gif quality aside, I am happy with the result 🙂 especially for only an hour of my life wasted on it. If anyone is interested in seeing the code, I uploaded it to github.

https://github.com/BlueOSO/bitfire

Thanks for reading!

Advertisements

Animating 3d art in 2d

In my adventures of game design, I have been experimenting with different art styles. One idea I had recently was modeling and animating 3d assets, but converting them to sprites to use in 2d games – since I am more experienced in 3d art, but 2d games are a whole dimension easier to work with.

As it turns out, someone made a blender plugin just for that – the ability to save any rendered animation as a spritesheet (or gif (with a hard ‘g’, of course)). So I tested out aanimation of a model I made recently, just to see:sprites.png

Which, when played frame by frame (or in a gif) looks like this:

spritesfrontright

It might not seem like much, but considering I can now record this same animation from multiple views, this makes it extremely easy and efficient to make multiple views of the same animation, which is very common in many 2d games:

spritesbackspritesbackleftspritesbackrightspritesfrontspritesfrontleftspritesfrontrightspritesleftspritesright

This concept can be expanded to every aspect of game art – the world, monsters, random chairs, etc. Using shaders, a lot of neat effects can also be applied, such as the toon/cel shading used in this model. I am excited to keep experimenting with this method of art creation.

Thanks for reading!

3d Printing Large Objects

I have had a 3d printer for some time now, but have only recently turned to extremely large objects. The maximum print size for my printer is about 8x8x8 inches, so I had to figure out how to split large models into smaller pieces. For example, this is what I wanted to print:world.png

For anyone who doesn’t recognize it, this is the helmet that the Lich King wears in Warcraft. And it’s massive. Luckily, there is a tool in Blender3d that lets you slice through a model along a plane, and you can separate the vertices from there. I took my time to try and maintain as much structural integrity as I could, while trying to hide as many seams as possible:Material.001 Diffuse Color

Twelve different pieces, and around 50 hours of print time total. Not including the mistakes 🙂

After each piece was printed, I hot glued them together and I am pretty happy with the result. It even fits comfortably on my head!23316408_10212876552646660_8187321639748163167_n

Thanks for reading!

Pokémon Cuckoo Clock

I was shopping at Goodwill awhile ago, and found a mechanical Black Forest cuckoo clock in excellent condition.23192609_10212819117730823_466548077_n

I thought it was pretty cool, and have always had a fascination for real clocks, but I still felt it could use some improvements. The Pokémon franchise has always been one of my favorites, so I decided to theme this clock as such.

I didn’t want to change the design of the clock too much since I did like most of it already, which meant I had to try and match the existing artwork as much as possible. That meant wood carved, hand-painted pokĂ©mon.23192859_10212819117170809_580959912_n

One chunk of my knuckle later, I had a couple nicely carved pieces to paint. After buying some new chains, weights, and a pendulum, it didn’t take long to fix the mechanical issues, and now I have a perfect cuckoo clock of my own.23140245_10212819113970729_1255735074_n

I’ll probably add more to it later, but I have since moved on to other projects as usual.

Play That Song by Train is a Terrible Excuse for a Song

I don’t listen to the radio much. When I do, it’s usually on the way to class or work for about five minutes. But a few weeks ago when I turned on the radio I heard this song:

This annoyed me to new extremes.

First, I understand how no melody is sacred in music. Artists have been stealing/borrowing pieces of music for their own uses for centuries. What really grinds my gears, however, is when someone takes a piece of a gorgeous, meaningful song and turns it into a repetitive, shallow, dull excuse for a song.

But that’s just my opinion. Here is a version i prefer:

Being a Wizard

It recently came to my attention that one thing I truly lacked in life was a wizard hat. Aside from the fact that it complements my crazy hair, it also sounded like a fun project.

The fun part about this was the mix of skills. I sew on occasion, but haven’t done much with leather. I also happened to have a bunch of leather lying around, but no pattern. I decided to use a method a friend of mine uses for stuffed animals – model the item in blender3d, unwrap the texture UVs, and use that as a pattern.3457It worked flawlessly, especially considering I really didn’t like any of the hats on google images. After scaling the picture and printing out the pieces, I cut out the leather and sewed it all together with a simple cross stitch. The whole process took two evenings, but the end result is pretty epic.22046949_10212555959352028_1496685822161072134_n

As a bonus, I play as a warlock in D&D so now I have something to wear every time.

atan() vs. atan2()

Math can be fun, and occasionally challenging. When trying to calculate the angle a character is facing relative to the rotation of a camera and the joystick input from a controller, headaches are born.

One might say, “Hey, let’s use trig.” Cool. find slope based on XY coordinates, and plug that into an arctan function to figure out radians. Multiply that by some stuff and get degrees. Flawless.

Even better, one may realize, “Wow, C++ has an atan() function built in! Neato!” And one would be correct.

However, when one applies said flawless, perfect math to this application, they may find that for half of the joystick rotation, it works just as planned. Up makes the character go forward, left goes left, right goes right, down goes up… and now one might pull their hair out for three hours straight, wondering what isn’t working correctly.

Long story short, atan() calculates the radians from the slope in quadrants 1 and 4 of a 2d plane. atan2(), however, calculates within all four quadrants, and was the solution to all of my problems.

Thorough description: https://stackoverflow.com/questions/283406/what-is-the-difference-between-atan-and-atan2-in-c

Long live thorough documentation.3457

First Steps

Creating a wordpress website was overall fairly intuitive. The domain availability lookup was fairly slow, and made me wonder if it was even working at first. Also, the verification email to confirm my address took forever to actually send. Then I realized that UWSP’s email filtering service was actually holding the confirmation email from going to my inbox. Most of the time spent on this was me trying to figure that out.

Selecting a template was a bit confusing, as there is a “customize” button next to “Themes”, with no clear indication that “Themes” itself was a button. Overlapping buttons are annoying and that particularly annoyed me.

Adding a widget was pretty easy, the hardest part was deciding what widget to add since most have very specific uses. I settled for a random picture I had in my drive. I have no regrets.