something new in the horizon...

So I’ve been out for quite some time, and this is just a quick update. First, I have tones of unread, thus answered emails on my inbox. I haven’t managed to go through that lately. I usually scroll to see if there’s a really urgent one, I will eventually read them all. I decided to quit my current job, my last day is October 31st. I couldn’t glimpse a very promising carrier there and I practically staggered learning-wise for the past months due to the type of work we develop so yeah, that’s it....

October 27, 2011 · 1 min · 165 words · David Amador

Hurry you only have 16 ms to render everything

So I’ve been working on my new game and I’m doing some tweaks here and there on the engine. Mainly with the rendering section, trying to squeeze as much as possible, thus maintaining an acceptable framerate. It’s not like I’m doing a heavily graphic game but I like to know that It can be used even on slower pcs and that I’m not using more cycles than necessary. This past week and after reading a bunch of stuff and keynotes from John Carmack about Rage (60FPS ftw) I decided to measure my own stuff....

August 8, 2011 · 4 min · 654 words · David Amador

Using Git for revision control

If you are coding, no matter what it is, games, software, websites, you should be using a code revision control of some sort. Are you using? Cool. Is it Git? Smart choice, so you probably don’t need to read the rest of this post. For the rest I’m giving some help on how to start from scratch. First of all I recommend some reading on Revision Control so that you understand what I’m talking about....

July 8, 2011 · 2 min · 363 words · David Amador

So what have I learned after eight months on the App Store

First of all I think this is my last idevblogaday post for a while. I my math doesn’t fail me this is my 10th post and it’s time for someone to take turn. Actually it’s just the 9th. I hope my words have somehow enriched your knowledge, in case you want to stick around just bookmark my feeds. I keep this fairly updated. Also since I’ve been working on a new game...

June 24, 2011 · 4 min · 672 words · David Amador

Playing sound using OpenAL

For sound I use OpenAL, it’s free, cross-platform, I’ve managed to get it working on iPhone, Windows and Mac. Setting up OpenAL to play a sound is pretty straight forward, a bit like OpenGL. First you need to create a context. ALCcontext *context; ALCdevice *device; device = alcOpenDevice(NULL, ALC_DEFAULT_DEVICE_SPECIFIER); if (device == NULL) { // Handle Exception } //Create a context context=alcCreateContext(device,NULL); //Set active context alcMakeContextCurrent(context); // Clear Error Code alGetError(); Now for the second part, loading a wav file....

June 10, 2011 · 2 min · 269 words · David Amador

Time for some new tools and editor

Holy cow, this is my 100th post. “Insert epic sentence” Depending on how much time you follow my blog or Different Pixel activity you may know that we have an internal Editor called Sapphire Past It was developed over a year ago with the intent of being a “All in one” 2D game editor for our games, built on XNA. It started out pretty well and I’m very happy with the outcome....

May 27, 2011 · 2 min · 321 words · David Amador

Indie and day job, making it work

A large percentage of the indie developers have to work on their project at night and/or weekends. In order to pay the bills they have to maintain a day job. There’s no shame in that, many do it, I do it, not everyone can make a mega jump right into fame and fortune with a single project. The rest of us mere mortals have to gradually build a fan base, learn from past mistakes, do better PR, etc....

May 13, 2011 · 4 min · 781 words · David Amador

OpenGL Render to Texture

Render to texture is a very handy functionality. Imagine your game allows for some character customization. You have the body, some different hats, different clothes and other small stuff. Now the easiest way to render this is to just draw it piece by piece every frame. With the proper Z coordinates everything falls in place. But you now have like 4-5 draw calls for one single object. Worse, you might have different textures and swamping textures is expensive....

April 29, 2011 · 2 min · 238 words · David Amador

Tracking/Identifying individual touches on iPhone

I got this question the other day, how to track individual touches if you are using a couple of fingers for a game? Actually it’s pretty easy if you can access the touch previous position and it’s current position. Let’s start with a small class to store the information class Touch { public: Touch(); ~Touch(); void update_position(float x, float y){ _current_position.x = x; _current_position.x = y; } bool is_same_touch(float x, float y) { if(_current_position....

April 15, 2011 · 1 min · 185 words · David Amador

A little on how to initialize and use GameCenter

Small side-note first, Vizati is now available for the Super Nintendo, more info. For my third idevblogaday post I’m going to talk about Game Center. Game Center was released only a couple months ago (September or so) but already tons of applications are using it and even more, players ask for it. It’s a way to track achievements, leader boards etc. Unfortunately It’s only available from iOS 4.1+, so some compatibility check has to be done....

April 1, 2011 · 3 min · 445 words · David Amador

Scripting week

This week I’ve been working on replacing my current scripting system. It worked great for Vizati but I need something with a little more flexibility. Instead of explaining what I’ve managed to get working I’ve made a screenshot with some notes. I think I’m going to make this my #ScreenshotSaturday

March 26, 2011 · 1 min · 50 words · David Amador

Loading images into OpenGL in iPhone

So you can’t make a game without images, right? Well, actually you can but that’s another story. But how can you load a jpg or a png and use then on OpenGLES? First let’s make a simple class Texture2D class Texture2D { public: Texture2D(int id, int width, int height) { _textureId = id; _width = width; _height = height; } virtual ~Texture2D(void) { // Delete Texture from HGL Memory glDeleteTextures(1, ((GLuint*)&_textureId)); } int getTextureId() {return _textureId; } protected: int _textureId; // The reference ID of the texture in OpenGL memory int _width; int _height; }; Now for the code to actually load the image...

March 18, 2011 · 2 min · 319 words · David Amador