nick5454

Members
  • Content count

    313
  • Joined

  • Last visited

Community Reputation

142 Neutral

About nick5454

  • Rank
    Member
  1. My questions is I have a female girl character, on the sprite sheet should be be full frame or manually rotate arms and leg   I plan on having several interchangeable shirts and shorts. Is it best to have the items split into torso, legs, arms, and head. or just have full frames of the character? 
  2. Did you turn on debugging on the phone? 
  3. Personally if it were me:   I'd go mongo to keep it light on the server side (linux, unubtu, mac) and you can either host your own server in the beginning which is easy with a macminivault.com with your own max. I use Fusion and point ip's to my node.js, mongo, and windows server.   Development:   PhoneGap is slow, has so many security flaws and in my opinion, sucks. In my previous company we did a test on all the major hybrid SDK's and found Xamarin was the best option as far as speed, development, and security. It was for a major bank.   If you're targeting multiple platforms web, hybrid, or both I would use Xamarin. It's c#, you can keep your web code in the same solution and you have Core function ( app code ) and then UI specific ( Web Views or native ). I have a game i'm working on which keeps all game logic in the core and I have openGL running on ios and Android using mostly the same libraries.   Xamarin converts both platforms to native code, adds 9mb to the deployment. For game game that's not much. You can also use side loading, not to be confused with a flash card.   I prefer mongo for object databases. For the BackEnd I would use "Service Stack". It rights all the plumbing code for retrieving data from a web service, so you can focus on your core and not write tons of communications layers.   I would also check out "CouchBase" as you can query from any language and platform and they manage all of the data for yo. It's used by world-wide companies so they are stable.
  4. I need to draw stars. I currently have a game in ortho 2d much like galaga, but now I want to know how to draw stars that are maybe 3 pixel diameter at most like the background in galaga.   Are these point sprites? or is there another type to keep the processing low?
  5. 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.
  6. I want to create a path in Adobe Illustrator, save it as svg format.   I want my game object ( monster ) to follow this pattern. To accomplish this I need to be able to read the SVG element (path) and calculate the point on the path based on time. This will be used in both android and iOS, so the libraries are limited.   Does anyone know how to read the path element below and calculate the spline. I figured I should create the spline object and grab a point from there.   But reading the SVG path is odd, wasn't sure if someone has done this before. I have seen one game example where they created a spline and had the object follow the path, so I assume all I need to know how to do is to create my own path objects from the svg element.   Any ideas, suggestions, or links is appreciated.   svg file text <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1024 768" enable-background="new 0 0 1024 768" xml:space="preserve"> <path fill="#FFFFFF" stroke="#000000" stroke-miterlimit="10" d="M223.6,308.9c159.6,11.7,136.2,111.7,159.6,11.7 c23.4-100,169.1,5.3,169.1,5.3"/> </svg>
  7. 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
  8. 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], GLKTextureLoaderOriginBottomLeft, nil]; // 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) )
  9. 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.
  10. Hi,   I'm looking for source code for a simple 2d scroller like mario brothers. Does anyone know of link where I can purchase the code? I don't need a complete game, just the basic engine to side scroll. I checked code canyon, but all they have is UIKit scrollers.   I want to use it on iOS iPhone and would rather purchase source code to move fast. I understand opengl for the most part, but am not sure how to draw tile maps in opengl. Just looking for starter code and I am willing to buy the source.   Thanks, Nick
  11. I have a texture atlas with 3 sprite images horizontally.   What I am trying to do is only display the first sprite ( 1/3 of the x axis )   I assume that when I load the texture I specify the quad for the entire and then I can define an additional quad that is 1/3. I am guessing that is wrong and I just load the texture and specify the quad at 1/3.   I am using GHLKit for iphone ( wrapper for openGL ). Can anyone tell me why I can't just show the first sprite and it always shows my entire atlas?   Here is my quad defined:     TexturedQuad newQuad;     newQuad.bl.geometryVertex = CGPointMake(0, 0);     newQuad.br.geometryVertex = CGPointMake(self.textureInfo.width, 0);     newQuad.tl.geometryVertex = CGPointMake(0, self.textureInfo.height);     newQuad.tr.geometryVertex = CGPointMake(self.textureInfo.width, self.textureInfo.height);     newQuad.bl.textureVertex = CGPointMake(0, 1);     newQuad.br.textureVertex = CGPointMake(.3, 1);     newQuad.tl.textureVertex = CGPointMake(0, 0);     newQuad.tr.textureVertex = CGPointMake(.3, 0);          self.quad = newQuad;   The problem is this just shows the image stretched and not cropped   Here is the sprite code: - (void)setSprite:(NSString *)fileName effect:(GLKBaseEffect *)newEffect {     // 1     self.effect = newEffect;              // 2     NSDictionary * options = [NSDictionary dictionaryWithObjectsAndKeys:                                   [NSNumber numberWithBool:YES],                                   GLKTextureLoaderOriginBottomLeft,                                   nil];              // 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 ;     }     TexturedQuad newQuad;     newQuad.bl.geometryVertex = CGPointMake(0, 0);     newQuad.br.geometryVertex = CGPointMake(self.textureInfo.width/3, 0);     newQuad.tl.geometryVertex = CGPointMake(0, self.textureInfo.height);     newQuad.tr.geometryVertex = CGPointMake(self.textureInfo.width/3, self.textureInfo.height);     newQuad.bl.textureVertex = CGPointMake(0, 1);     newQuad.br.textureVertex = CGPointMake(.3, 1);     newQuad.tl.textureVertex = CGPointMake(0, 0);     newQuad.tr.textureVertex = CGPointMake(.3, 0);          self.quad = newQuad; }   the render method: - (void)render {          // 1     self.effect.texture2d0.name = self.textureInfo.name;     self.effect.texture2d0.enabled = YES;          // 2     y++;     self.effect.transform.modelviewMatrix = self.modelMatrix;     [self.effect prepareToDraw];          // 3     glEnableVertexAttribArray(GLKVertexAttribPosition);     glEnableVertexAttribArray(GLKVertexAttribTexCoord0);          // 4     long offset = (long)&_quad;     glVertexAttribPointer(GLKVertexAttribPosition, 2, GL_FLOAT, GL_FALSE, sizeof(TexturedVertex), (void *) (offset + offsetof(TexturedVertex, geometryVertex)));     glVertexAttribPointer(GLKVertexAttribTexCoord0, 2, GL_FLOAT, GL_FALSE, sizeof(TexturedVertex), (void *) (offset + offsetof(TexturedVertex, textureVertex)));          // 5     glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);      }   setup projection - (void)setupGL {     [EAGLContext setCurrentContext:self.context];          self.effect = [[GLKBaseEffect alloc] init];          GLKMatrix4 projectionMatrix = GLKMatrix4MakeOrtho(0, 480, 320, 0, -1, 1);     self.effect.transform.projectionMatrix = projectionMatrix;          [self setSprite:@"NinjaSpriteSheet.png" effect:self.effect ]; }
  12. Sprite Sheet maker

    I have a project called iSprite at http://iSprite.codeplex.com   In a jist it allows you to create a grid and place images in that grid through drag&drop, or inserting multiple files. When you click save it produces a sheet with all drawings centered exactly based on the original size image. Each square has attributes that can be modified   I'm working on adding save folders, so multiple sheets can be stored with an xml definition file.   If anyone wants to use it, help code it, etc..., I would greatly appreciate it. Currently I make improvements as I need them. After all the features are flashed out I plan on adding a multi layer level editor.   The app is developed in .net (PC).   Thanks, Nick
  13. Creating 2d chars with photoshop vs illustrator

    Thanks everyone!
  14. Would anyone recommend making 2d chars for my game Photoshop over Illustrator or vice versa.   I read that Illustrator does vector graphics which I assume is better for rendering, but I also read that Photoshop is pixel based which is what a 2d character will render as.   These are 2d characters with detailed drawings and have accessories like guns and clothes.   Any advice is appreciated. Nick
  15. Using Sonic pictures

    To add insult to injury, it appears that Sega as of 2011 no longer owns Sonic the hedgehog. It's owned by Panders who created Archie and is currently suing Sega...Odd story, still shady http://www.iptrademarkattorney.com/2011/06/copyright-video-game-sonic-hedgehog-infringement-lawsuit-sega-electronic-arts.html I'd link but the site still has php errors