Category Archives: Rants

More about swift…

Okay so when you use a language daily, you begin to really pick up some opinions and feelings about it that tend to really stick with you.  With swift, I definitely have some of those.

Let me focus on just two… of the things that really irk me about the freaking swift language.

Number one – Casting

This is my number one gripe with the swift language.  The compiler just wont shut the hell up and do what I was intending.  Now I know that apple has designed the language to absolutely not allow any implicit casting, and I understand their reasons behind this, but man, you’ve taken one benefit, and added 10-fold the costs.  Requiring explicit casting takes code in swift that should look extremely simple and adds about 3-4 explicit constructor-casts to it causing the code to display as bloated, confusing ill-intended crap.  What really bothers me is that this is the case even for upgrading types such as assigning a float into a double.  Another problem is that in the C world (all of the APIs that we work with on a daily basis) there might be 4 or 5 different integer types (int, Sint32, GLuint, etc) and multiple float types (GLfloat, float, CGFloat, etc).  Casting between these in C/C++/Objc is completely harmless 99% of the time and therefore done implicitly.  In swift, I have to pepper this code with constructor casts every, single, freaking time.

In C++, you could allow implicit types by overloading the constructor so that an expression such as int x = someFloat would be the same as a constructor for int that takes a float as an argument.  Swift badly needs this.

For now I’ve gotten to the point where I’ve added very simple computed properties to the various types in swift to at least make some of this casting more painless.  Just a few of those extensions are below.

This makes it so that code that would have to look like

Can be…

 

Number two – Stability (source kit crashes)

Google swift and “sourcekit” and you’ll see, this is nowhere NEAR an actual finished language.  Apple has rushed this out the door and I’m honestly sorry that I’ve decided to use it to make a game.  Imagine typing code and then every half hour you get 30 seconds of a frozen spinner before ”sourcekit crashed” appears in your IDE.  If you’re lucky, it’ll stop for another 5 minutes, but if you aren’t it’ll happen in a loop and you have to go delete your “ModuleCache” dir and quit and restart xcode and start working again…. until about an hour later.  This is NOT how I prefer to work.  I like the “idea” of swift, but its just way too unstable to use.  I’m going to finish this game with it, and then probably stay away from swift for any real projects for another year or so until apple fixes this extremely annoying stability problem.

 

These two things may seem small, but they’re enough to waste 10 minutes of time for every hour I work on this game, and for me, that’s just completely unacceptable.  

Why most indie games are 2D games.

Why Most Indie Games are 2D Games

Okay so do you want to know why most indie games are in 2D?  Read the posts from the last month or so in my blog.  In summary, you’ll notice that 90% of all that work was asset creation.  Keeping in mind, this is supposed to be a small-scale single-level 3D mini game.  Artwork, modeling, texturing, more artwork, more texturing, more modeling.. etc.  Simply stated, asset creation for 3D games is LONG, HARD work.. and in my case, I didn’t even do it all myself (I had a character modeler/animator help me with my single base character model, and I’ve relied quite a few times on turbosquid).  Even still, compared to 2D game development, this process can be extremely time consuming.  If this was a 2D platformer, most devs would have had at least basic assets for a “level 1″ finished probably in the first day, and would have been programming the actual game long before now.  I’ve always tried to ignore this fact but its true.  Look at the number of delays, setbacks, and ultimate release date shifts that have plagued recent AAA game projects project and you’ll see that rapid 3D game development is not an easy task even for seasoned developers.

Most independent game developers have certain skillsets that usually fall into the domains of programmer or artist.  Now I know there’s stortywriting, sound effects, music, etc.  But just about everything involved in a game’s development really splits into the two big umbrellas of either programming or creative (artwork, asset creation, etc).  The problem here is that as one advances in their particular domain, and starts to get really good at one aspect of the field, they often have to leave the other side of things to somewhat wither.  To become a really good programmer, I mean a really good programmer, you need to get obsessed with your craft.  That means even if you were a decent artist, you probably won’t keep up your artistry skillset as much.  The same goes for becoming a very good artist, and even a 3D artist.

As the industry has made the shift into large-scale theatric AAA games, more and more specialized craftsmen/craftswomen are needed to spend 8-hour days on something as simple as the texture of a claw of a single enemy in a single dungeon of a game.  The sheer manpower that AAA studios can throw at a game allows for the large attention to detail that 3D games require to feel right.  Even a “simple” game like mario 64 likely required dozens of artists to pan and pan over every keyframe of mario’s animations to make sure it was perfect.  Now don’t get me wrong, this was also true of the SNES/Genesis 2D era.  However, attention-to-detail, or lack thereof in these kind of games comes with less of a penalty, and certainly less of a time commitment.

It’s a hard pill to swallow since my dream of making games that started at a young age, has always predominantly been a dream of 3D game development.  But you know what?  I still love 3D game development.  It’s supposed to be hard.  The hard… is what makes it great.  Tom Hanks is right.  

So where does that leave the indie developer with respect to 3D game development?  Well when you have a team of only 2-3 people (or in my case, 1 people), you CAN succeed at independent 3D game development.  The absolutely crucial difference here is to understand and accept your limitations as an independent.  For starters, no matter who you are, limit your freaking scope.  Understand that you simply can’t make an AAA-length 3D game in any reasonable amount of time.  If you’re 1 person, and a hobbyist with almost zero budget (like me), set a goal for a game that requires at most 1-2 3D environments with very few (if any) unique character models.  If you are weak with art but you have the funds, consider using services like turbosquid to procure assets.  If you are weak with 3D programming, consider (after buying a few books) using a 3D engine such as unity or unreal instead of building your own.  

Above all, plan out the scope of your game to a t.  Then, give yourself a pre-determined amount of time to finish the game project… and..   quadruple it.

Driveby Gangster Update – a Dive Into Swift

Over one month in to my planned “2 week” 3D game project, 90% of my assets are done!  I still need a 3D tommy gun and an old-timey driveby gangster car.  But I’m going to start actually programming (imagine that) the very simple AI that will drive the walking of most of the bystanders in the game.  I’ve got my work cut out for me since most of the game logic code I’ve written to this point is all throwaway “get-it-to-work” POC code.  I now need to organize and get a basic heirarchical game-architecture together.  More fun, as I mentioned in my first post, I’ll be doing most of the game classes and logic in swift.  Swift, despite being officially released, still has its problems.  Namely for me, the speed of the IDE (for things like auto-completion) while typing in swift is the biggest gripe I have with the language so far.  That problem is followed by a close-second of annoying cryptic compiler errors that have nothing to do with the underlying problem of “I’m expecting an Int32, but you gave me an Int”.  Either way, I’m keeping my promise to write the game in swift as an experiment to see if the language is truly something I’ll want to leverage for game development in the future.

Iron….y

Here we find ourselves in that too-often familiar situation.

I usually complain that I don’t have enough time to put into gamedev. Ideas usually come to me in my sleep, when I’m working at my day job, when Verto Studio beckons and I have to urgently fix a bug or work on it for other reasons.

Now, ahhh, I have/had a completely free three-day weekend. Verto is up-to-date, work is caught up, and I’m completely free. I decided to put together a three-day game-jam of my own this weekend. I even nicely packaged up my “engine”, the Verto Core, into an XCode Project so that it is ready to use for 3D game development.

All systems are go!

All ready to go, I dusted off my “idea generator”, the wacom tablet, and bam! I suddenly realized, I have no good idea. Nothing I can do in 3 days at least. That sudden realization that all of my ideas are ridiculous long-term epic game projects that cannot be accomplished by one man in any reasonable amount of time.

Now I’ve been at this far too long to know better. ..To know better that actually starting one of those long-term game projects, even on the whim of a weekend is a terrible terrible idea. Why? Because I hate visiting the graveyard of once-promising game development efforts. So much so that I do everything in my power to avoid adding to that graveyard.

So back to the issue at hand: why can’t I come up with any small-scale 3D games? I say 3D because it’s what I’ve always strived to achieve, and now that I’m here, I can’t just make a 2D game and throw away all that 3D knowledge and hard work it took me to get there. Maybe I’m thinking too hard. I always tell myself that I should never force a good idea out, and that it’ll come to me when the time is right. That or I just don’t have the right type of brain for game design. Thus I’ll just sacrifice this weekend to continued relaxation, gaming, drinking, socializing, and otherwise unproductive endeavors..

..frick