Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 09 Jun 2005
Offline Last Active Today, 12:33 AM

Topics I've Started

Any AAA game development startups out there?

04 September 2014 - 03:14 PM

Maybe I'm not looking hard enough, but it looks like when it comes to the most recent content and articles regarding game dev startups, it's primarily focused on indie dev startups, and not so much AAA. On top of that, I don't hear many stories, if any at all, about AAA or AA-ish dev startups. Normally when I'm looking up resources regarding non (or not so much) indiedev, I end up looking towards some older stuff.

Ultimately, I'd like to hear from those of you who have successfully started a AAA or something close like PopCap or Gameloft. Any of those types here? What was your experience like? I don't get much opportunity to meet professional game devs (even though I live in Seattle where there's loads of them) but findings aspiring indies are abundant. Nothing against indies, but I want the perspective of those who are successfully established in the industry.



Gesture recognition causes my app to crash.

27 August 2014 - 10:13 AM

I'm still pretty new to gesture recognition, and I've never needed it until now.  So, I've found various examples on the net, and when I try to implement it, my app just crashes when I touch the screen.  So anyway, this is what I did.


I added this to viewDidLoad

// Create and initialize a tap gesture
    UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc]
                                             initWithTarget:self action:@selector(respondToTapGesture:)];
    // Specify that the gesture must be a single tap
    tapRecognizer.numberOfTapsRequired = 1;
    // Add the tap gesture recognizer to the view
    [self.view addGestureRecognizer:tapRecognizer];

Then I added this to the ViewController

- (void)respondToTapGesture:(UIGestureRecognizer *)gesture
    // Do whatever

What happens is I get a crash.  More specifically, I get an EXC_BAD_ACCESS.


Attached File  Screen Shot 2014-08-27 at 9.11.42 AM.png   12.05KB   0 downloads


That's the stack trace, if that helps.  I have absolutely no idea why this isn't working, when all of the examples appear to be working fine.  Did I forget to add something to plist?



FBO: Render to Texture not working!

26 August 2014 - 01:32 AM

Okay, I wish I would have learned this before, but for my mobile game, I need to render my scene to a texture on devices with smaller resolutions such as the iPhone.  Since my game works best on mobile and touch oriented devices, that's primarily what I'm aiming for.  Now, the biggest issue with certain mobile devices is screen resolution.  A 480x320 resolution is far too small, so my idea is to double the size by rendering to a texture (FBO), and scale touch locations accordinly.  It's kinda hard to explain, but my game requires lots of rapid movements which require a fairly large screen resolution to pull off, and there's no need for this on iPads and what not.  If there's a better solution, feel free to share it.


Once again, I hate dumping code on you all, but I really must get this working asap.  These are the steps I've taken:


1. Create the FBO, RBO, and a texture, and bind them together.

2. Clear the screen to white.

3. Bind the FBO.

4. Clear the screen and draw as normal.

5. Unbind the FBO.

6. Draw a screen sized quad with the results.


So far, whenever I try, nothing renders.

FBO creation and usage:

bool create_render_target( int width, int height, rendertarget_t* rt )
        glGenFramebuffers(1, &rt->fbo);
        glBindFramebuffer(GL_FRAMEBUFFER, rt->fbo);
        glGenRenderbuffers(1, &rt->rbo);
        glBindRenderbuffer(GL_RENDERBUFFER, rt->rbo);
        glRenderbufferStorage(GL_RENDERBUFFER, GL_RGBA, width, height);
        glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, rt->rbo);
        glGenTextures(1, &rt->tex);
        glBindTexture(GL_TEXTURE_2D, rt->tex);
        glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,  width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
        glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, rt->tex, 0);
        GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
        if(status != GL_FRAMEBUFFER_COMPLETE)
            printf( "ogldrv_t::create_render_target(): failed to make complete framebuffer object 0x%X\n", status);
            return false;
        glBindFramebuffer( GL_FRAMEBUFFER, 0 );
        return true;
    void set_render_target( rendertarget_t* rt )
        GLenum error = glGetError();
        if( rt )
            glBindFramebuffer( GL_FRAMEBUFFER, rt->fbo );
            glBindFramebuffer( GL_FRAMEBUFFER, 0 );
        if( (error = glGetError()) != GL_NO_ERROR )
        printf( "Error binding render target!\n" );

Example usage:

This->m_ogldrv->set_render_target( &rt );
This->reshape_func( width, height );
This->m_ogldrv->set_render_target( NULL );

Without the rendertarget stuff, it works fine.  But when I do use it, nothing renders afterwards, all I see is the colour of the screen I set it to be cleared to.  I've spent hours tweaking and googling, but no success so far.  Would it have to do with the size of my render target?  This sucks.  Any ideas?  Thanks.



Intuitive UI design articles?

24 August 2014 - 01:11 PM

I looked on google for some articles on intuitive game UI design practices, but honestly I didn't get many results. Probably wrong combination of keywords. As much as I like my game's UI, I know it could be better. Anyone have any links? I'd post screens, but I'm on an iPad.


This singleton keeps crashing.

24 July 2014 - 02:07 AM

I'm not an expert on singletons, and I only have one bit of code that uses it.  It's part of a debugging system from one of NVIDIA's SDKs, and I find  their code to be useful in my engine.  Now, this singleton class works fine in Windows, but not for UNIX based OSes like MacOSX.  This is what it looks like:

#include <cassert>

template <typename T> class Singleton
    static T* ms_Singleton;

    Singleton( void )
        assert( !ms_Singleton );
        int offset = *(int*)(T*)1 - *(int*)(Singleton <T>*)(T*)1;
        ms_Singleton = (T*)(*(int*)this + offset);
   virtual ~Singleton( void )
        {  assert( ms_Singleton );  ms_Singleton = 0;  }
    static T& GetSingleton( void )
        {  assert( ms_Singleton );  return ( *ms_Singleton );  }
    static T* GetSingletonPtr( void )
        {  return ( ms_Singleton );  }

template <typename T> T* Singleton <T>::ms_Singleton = 0;

So, it crashes in the constructor, starting at the second line.  The windows version had (int) instead of *(int*).  I just changed that so XCode would stop complaining about it.  It could be something simple.  Right now, I'm so tired, I can barely stay awake.  So, I was hoping someone who isn't as braindead as I am right now could point me in the right direction.  Thanks.