Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 06 May 2003
Offline Last Active Jun 05 2015 09:57 AM

Posts I've Made

In Topic: Following a path saved in svg format

07 April 2015 - 07:39 AM

Thanks for both the answers. I'm using Xamarin for ios/android so reading the xml is pretty easy and I would assume I only ever need d. I plan on using the data to create my path and load these in at start up. Only about 10-20 will exist.


I wanted a path so I can use a time formula to see where in the path the monster should be and place him there based on the total time the path should take when updating sprites.


I also chose SVG, because I can use adobe illustrator to see the path visually until I have time to create my own, or search for a premade app.


If you can recommend a product that will produce a path of bezier curves visually and I can get points and control points from that to build a path in my code, that would be great also.

In Topic: Looking for source code for a tiled 2d scroller

10 July 2014 - 03:46 PM

Actually I found this which uses a sprite sheet, so I can just modify the code and run with it. http://codecanyon.net/item/openglesopenal-sliding-puzzle-game-starter-kit/577119

In Topic: Looking for source code for a tiled 2d scroller

10 July 2014 - 01:13 PM

Here's what I have. The sprite sheet is 1024x1024 with 64x64 sprite squares.

- (void)setSprite:(NSString *)fileName effect:(GLKBaseEffect *)newEffect {

    // 1
    self.effect = newEffect;
    // 2
    NSDictionary * options = [NSDictionary dictionaryWithObjectsAndKeys:
                                  [NSNumber numberWithBool:YES],
    // 3
    NSError * error;
    NSString *path = [[NSBundle mainBundle] pathForResource:fileName ofType:nil];
    // 4
    self.textureInfo = [GLKTextureLoader textureWithContentsOfFile:path options:options error:&error];
    if (self.textureInfo == nil) {
        NSLog(@"Error loading file: %@", [error localizedDescription]);
            return ;
    NSLog(@"Value of %f", 64.0f/1024.0f);

    TexturedQuad newQuad;
    newQuad.bl.geometryVertex = CGPointMake(0, 0);
    newQuad.br.geometryVertex = CGPointMake(64.0f/self.textureInfo.width, 0);
    newQuad.tl.geometryVertex = CGPointMake(0, self.textureInfo.height);
    newQuad.tr.geometryVertex = CGPointMake(64.0f/self.textureInfo.width, self.textureInfo.height);

    newQuad.bl.textureVertex = CGPointMake(0, 1);
    newQuad.br.textureVertex = CGPointMake(64.0f/1024.0f, 1);
    newQuad.tl.textureVertex = CGPointMake(0, 0);
    newQuad.tr.textureVertex = CGPointMake(64.0f/1024.0f, 0);
    self.quad = newQuad;


My problem is just displaying 2 frames ( square(0,0) - tile 1 and tile 2(0,0) )

In Topic: Looking for source code for a tiled 2d scroller

10 July 2014 - 08:34 AM

I had the problem of displaying the tiles correctly. I could display one, but my buffer arrays were incorrect. I'll try and find the source code and post it.

In Topic: Creating 2d chars with photoshop vs illustrator

22 March 2013 - 08:49 AM

Thanks everyone!