Tag Archives: programming

Advantages of a Beginner

When you’re a beginner, it’s easy to feel like you don’t have anything to offer. After all, there are a gazillion people out there who are better than you, right? It turns out newbies bring a lot to the table.

Beginners know how to learn new skills. Let’s say you want to learn programming. Who do you think is better to ask for advice: a friend who’s been doing it professionally for thirty years, or your friend who took a single college course on it about two years ago? Well, the 30-year seasoned professional hasn’t had to learn how to program in decades, and they learned back on a now-ancient Commodore 64. Even though your other friend is quite inexperienced, they’ll have a much better idea of where to get started.

commodore-64

Not that you couldn’t still learn to program on one of these today, but it’s a few decades behind current technology. (Source: Wikipedia)

A beginner can write a guide or tutorial in a language other beginners will understand; experts will have trouble.

Newbies (potentially) know a lot about new tools and technology. When you’re teaching yourself a new skill, you’re inherently forced to put a lot of research into that topic. Odds are that you’ll stumble upon a lot of new and upcoming tech during that research. It’s also easier to objectively compare different tools and tech when you don’t have several years invested into a particular tech stack.

Beginners don’t yet know what isn’t possible. It’s easier to think outside of the box when there is no box. When you have a lot of experience in a field, it’s easy to dismiss a lot of ideas that seem impractical without giving them the attention they deserve. Obviously, this same trait can also backfire horridly and bite you in the rear, but it’s not without its advantages.

A Swift Review of Swift

Over at Ludisto, we’ve been using Apple’s new programming language Swift for our latest mobile game. We started back in July while Xcode 6 was still in beta, and the language has evolved and improved a lot over that time period. Most of the time, the experience is fantastic! Other times, well…

swiftc segfault error

…the compiler segfaults with no useful error message.

The upside is, you know the issue was caused by your most recent code change(s). Tracking it down usually isn’t too hard, but figuring out a workaround can be annoying. Most of the major issues were hammered out during Xcode 6’s beta phase, but you do still run into problems from time to time. Some form of continuous integration (i.e. automated builds) would likely be pretty useful for catching issues early. For example, right now, we’re dealing with an issue where our project won’t Archive, which is needed to build the app for the app store; that would’ve gotten caught much earlier if we had an automated build system checking things nightly.

For anyone with any reasonable amount of programming experience, Swift is super easy to learn. Apple’s book The Swift Programming Language covers it really well, and is a good reference manual. The catch here is that you won’t learn any of Apple’s APIs from that book, so jumping into actually writing an app in Swift is probably a lot easier if you’ve used Objective-C in the past. As someone who had no prior experience with native iOS development, I struggled a little, but it was absolutely manageable. Adobe Flash was über easy to get started with back in the day; SpriteKit is even easier. Apple’s Swift resources page gives a lot of useful links. For a really good tutorial project to get started with SpriteKit, I highly recommend How to Make a Game Like Candy Crush with Swift. Additionally, Apple’s WWDC 2014 videos have a ton of useful talks to watch for free.

xcode-logo

Getting to use Xcode is also a nice perk

Overall: Swift is great! I highly recommend checking it out and using it, especially for smaller projects. There are still some small kinks that need to get hammered out, though, so I’d recommend against using Swift exclusively in a large project just yet; check back in maybe six months to a year.

GDC Day 1: Math for Games Programmers

GDC '13 logo

For the second year in a row, I attended the Math for Games Programmers tutorial at GDC today. As expected, there was a fair amount of review, but I also learned some cool new things!

The earlier talks on splines, blending, matrices, etc. were basically review for me, but it was nice to have that refresher. That said, one tip came up that really stood out to me for matrix math. Matrices are multiplied in a sort of “reverse” order, for example:

Rotation * Translation = translate-then-rotate

Incidentally, this is actually the same order you’d write functions while programming:

rotate( translate( point ) ) = translate-then-rotate( point )

Nifty!

Jim van Verth’s talk on quaternions was absolutely fantastic. He spent the talk discussing how quaternions work rather than why we use them. Questions like “why four values?,” “why do we input theta over 2 instead of the entire angle?,” “how can we visualize 4D space?” and more are covered. As a bonus, the tutorial will actually make it to the GDC vault this year, so definitely check out the talk if you can! If you don’t have vault access, you should be able to pick up the slides at http://essentialmath.com/tutorial.htm once they’re posted.

Dual numbers sound useful, but I’m not sure how often I’ll use the content of the lecture. That said, “you can basically get the derivative for free” is a pretty awesome thing to keep in mind. They’re pretty interesting from a mathematical standpoint.

The talk on Orthogonal Matching Pursuit and K-SVD for Sparse Encoding went way over my head, but I still pulled a good deal of information from it. I think I have a rough idea of how compression works now. I have some research to do!

The talk on Computational Geometry was pretty interesting, though it seemed more or less the same as last year. Still, it was good to get the review – I had forgotten a lot of it. I also learned about higher order surfaces on the GPU (i.e. tesselation, etc.), which was new to me!

Finally, the talk on Interaction With 3D Geometry by Stan Melax was amazing. It was a super-fast-paced crash-course on a huge number of subjects that left me really inspired to start writing some tech demos to learn how all of the concepts work. I’ll definitely be watching it on the vault.

Tomorrow: Physics!

Welcome!

Greetings!

This website hosts my blog about games, programming, and related topics, along with my portfolio and resume. I’ve always had a passion for breaking things down and analyzing them, and my father introduced me to programming via a few books when I was younger. I find programming fascinating, and decided to pursue it in college. I am enrolled in the Game Design & Development program at Rochester Institute of Technology, and I couldn’t be happier!

Cheers!

Zachary Hoefler

Learning Assembly through Gameboy Programming

My current on-and-off pet project is teaching myself to program Z80 Assembly for the original Gameboy. Though I have some experience with MIPS 2000 Assembly Language, I thought Gameboy programming might be fun after seeing the following video:

As I thought more about it, I realized that the Gameboy has a number of distinct advantages:

  1. They’re cheap. An original Gameboy (DMG-01) cost me only about $20 on eBay.
  2. They’re a full set of hardware all in one. The Gameboy has its display, processor, input, etc. all in one incredibly inexpensive unit.
  3. Flash carts are easy to acquire. In layman’s terms, a flash cart is a cartridge that can be written to and read from easily. To make it even more convenient, I can connect the cartridge to my computer with a USB cable. Essentially, this means I can easily run my code on the actual hardware with almost no hassle. The cartridge I purchased cost only $38.
  4. High-quality emulators are readily available. Though running code on the actual hardware is very cool, there are advantages to running it in an emulator. The BGB gameboy emulator has a powerful debugger built in, for example, which makes development a lot easier.
  5. You can develop for the Gameboy on many platforms. Whether you’re running Windows, Mac, or Linux, the proper tools to get the job done are available.

Of course, the primary motivation was that the project just sounds like fun! As-is, I’ve picked up all of the appropriate hardware and got a “hello world” program up and running:

(What? It was much more fun to display than “Hello World”)

Anyway, I plan to post more about this pet project as time goes on. As far as what game(s) I end up making… well, I’m not entirely sure! A schmupp sounds like it’d be a fun idea, but I’m open to suggestions.

Cheers!
Zach

Project uploaded – Peg Solitaire (MIPS R2000 Assembly)

Just uploaded my peg solitaire game from this past quarter, put it in my portfolio, and added it into my resume. It’s coded in MIPS R2000 Assembly Language!

Assembly’s definitely a lot of fun to experiment with, and you can learn a lot from it. That being said, it makes me really appreciate high-level languages.

Books!

Because I’m a bit of a programming fanatic, I picked up a two books recently: Game Programming Gems and Effective C++: 55 Specific Ways to Improve Your Programs and Designs.

Effective C++ was recommended to me by one of my professors. Although I’ve only gotten through the first chapter thus far, this book is definitely an excellent resource! Effective C++ looks like a solid way to go from just knowing C++’s syntax and how it works at a basic level, to understanding how to use C++. The first few items alone have already caused me to look differently at how I program; pulling that off in a couple dozen pages is rather impressive.

Game Programming Gems is a book I’ve been meaning to pick up for a while now. Though I’d heard of the series before, I never thought too much about it until I sat down and looked at someone’s copy of the first book in the series. After reading a section or two, I was sold immediately. I’ve only looked at a small few bits and pieces thus far, but I can already tell this book–and, likely, the entire series–is something I’ll come back to again and again.