OpenGL 2D Independent Resolution Rendering

Around two years ago I made a tutorial for XNA in which you could render 2D games scaled to the current window resolution with proper letter-boxes or pillar-boxes. As many know since then I moved to C++ and OpenGL, and ocasionally people ask me “Can you still do that independent resolution thing?”, and yes it’s perfectly possible. I’ve used this on all latest Windows, Mac and iOS, in case you are wondering. ...

April 22, 2013 · 3 min · 539 words · David Amador

Updates, development and new feed url

Almost 4 months without a post, this is the first time it happened. It was nothing in particular that held me back, I just kept postponing and, to be honest, I only write posts when I have something I really want to write about. Before going into the rest of the post, I would like to ask people to update my feed url on your RSS readers. I always used Feedburner to redirect feeds, and with Google Reader going down I decided to start switching, so in your new FeedsReader use this address: (</feed/>). I didn’t deactivated the old one, so they will work both for now (if I didn’t broke anything). Also, give Feedly a try in case you haven’t found a replacement for Reader. ...

April 20, 2013 · 6 min · 1158 words · David Amador

Dary's Legend alpha released

Yay, so a milestone was reached with this project. If you follow my blog you probably already know that between small projects like Puwang and other mandatory freelancing stuff my big project in hands for these past few months is Dary’s Legend, a roguelike. Around two months ago I coincidentally bumped into a conversation about funding and the whole kickstarter thing where one of Desura staff members was participating, and while talking about my own problems funding a whole game out of my pocket he mentioned that he knew the game and that Desura’s Alpha Funding might be a good place for it. ...

December 5, 2012 · 3 min · 479 words · David Amador

Puwang is out on the App Store

So tonight, while I was sleeping, Puwang was approved and released on the App Store. I made a small gameplay video where, directly from the screen. and there’s another one, offscreen, on a real iDevice here Spread the word, buy it if you like =) ...

October 10, 2012 · 1 min · 49 words · David Amador

Puwang - a 5 day work

Hi, how’s everyone doing? So this was a different week for me. It’s been a long time that I had the chance to work on a small prototype or a 48H competition because of my work on Dary’s Legend so I decided to stop for a couple of days and do something else. Also my cat’s been quite sick, and between the Vet and taking care of him, working on a fun project gave me more time do everything. ...

September 28, 2012 · 2 min · 369 words · David Amador

How to take screenshots in opengl

So here’s some quick code to save a screenshot of your OpenGL game in a TGA file. bool save_screenshot(string filename, int w, int h) { //This prevents the images getting padded // when the width multiplied by 3 is not a multiple of 4 glPixelStorei(GL_PACK_ALIGNMENT, 1); int nSize = w*h*3; // First let's create our buffer, 3 channels per Pixel char* dataBuffer = (char*)malloc(nSize*sizeof(char)); if (!dataBuffer) return false; // Let's fetch them from the backbuffer // We request the pixels in GL_BGR format, thanks to Berzeger for the tip glReadPixels((GLint)0, (GLint)0, (GLint)w, (GLint)h, GL_BGR, GL_UNSIGNED_BYTE, dataBuffer); //Now the file creation FILE *filePtr = fopen(filename.c_str(), "wb"); if (!filePtr) return false; unsigned char TGAheader[12]={0,0,2,0,0,0,0,0,0,0,0,0}; unsigned char header[6] = { w%256,w/256, h%256,h/256, 24,0}; // We write the headers fwrite(TGAheader, sizeof(unsigned char), 12, filePtr); fwrite(header, sizeof(unsigned char), 6, filePtr); // And finally our image data fwrite(dataBuffer, sizeof(GLubyte), nSize, filePtr); fclose(filePtr); free(dataBuffer); return true; } I’ve been using this on my projects and it works, although I read a couple of times it’s better to use p-buffer or FBO, but I leave that for you to research. ...

September 8, 2012 · 1 min · 199 words · David Amador

QuakeCon 2012 - John Carmack Keynote

I usually don’t do this, but come on, it’s John Carmack, and this 3h30m keynote given at QuakeCon 2012 is fascinating.

August 4, 2012 · 1 min · 21 words · David Amador

Gamedev is like a house of cards

It all starts so pretty isn’t it? A clean project, a quick prototype, it works! It’s beautiful. Now it’s time to add more features, everything is planned out, all cogs have a place to be, it goes smoothly for a while. Now you realize other small components are needed, no problem, let’s make them… Eventually you do need to plug them into the game itself, and that’s when the problems start, most of the other stuff wasn’t built considering these new components. Will they break? ...

July 30, 2012 · 1 min · 156 words · David Amador

Dary's Legend development Timelapse sample

Working on Dary’s Legend has been my daily routine so I decided to make a time lapse. So this is a video compiled using Chronolapse, by taking a screenshot every 60s during a couple of days while I’m working on Dary’s Legend, the new game from Different Pixel. The video is being played back at 10 real minutes per second. This was recorded between 14-06-2012 and 30-06-2012 (some days are missing) ...

July 1, 2012 · 1 min · 71 words · David Amador

Dary's Legend First Teaser

So, yeah I know I’ve been a little lazy about my blog it’s for a good cause. We decided to release a small teaser showing what we have. I can’t stress this enough, it’s a work in progress. I can’t find out how to embed the video with HD by default so don’t forget to see in 720p Lately I’ve been working mostly on small UI stuff, pixel tuning every menu/button and graphical interfaces in the game. It’s a bit hard mixing a lot of menus keeping a consistent and nice user experience. ...

June 1, 2012 · 1 min · 148 words · David Amador