sprite

Animate Sprite Along a Curve path in XNA

I would like to implement a ballistic trajectory in an XNA game and was trying to figure out the best way to make the projectile follow a gravitational curve. Best thing I can think of is to just calculate the curve first and store in a "Curve" class. Then get the sprite to move along that curve. But I can't really figure out how to a...

How to scale on-screen pixels?

I have written a 2D Jump&Run Engine resulting in a 320x224 (320x240) image. To maintain the old school "pixely"-feel to it, I would like to scale the resulting image by 2 or 3 or 4, according to the resolution of the user. I don't want to scale each and every sprite, but the resulting image! Thanks in advance :) ...

How would you store complex NES sprites, such as from the original Final Fantasy?

I know that NES had 4-color sprites (with 1 usually being transparent Edit: according to zneak, 1 color is always transparent). How then did the original Final Fantasy have so many sprites with 4 colors + transparent? (Example sprite sheet -- especially look at the large ones near the bottom.) I understand that you can layer sprites to...

How to differentiate between iphone4 and iphone 3

Hi All, I am trying to build a game for the iphone using cocos2d engine. I wanted to know how can I tell a difference whether the user is using iphone 4 or iphone 3 as I wanted to load hi-resolution graphics for the iphone4 and low-resolution for iphone 3. I know if I use @2x.png at the end of the image file name UIImage loads the hi-re...

Apply Post Render Effect to SpriteBatch in XNA

Is there a way, in the XNA framework, to render your 2D scene using the typical SpriteBatch method and then, after that frame is rendered, apply effect to the whole image? For example, blurring, sepia or even making the whole thing look like an old time movie film, with grain, dust, lines, etc? ...

movieclip.graphics disappear when using .draw() function

I'm making a drawing interface and using the Graffiti Canvas Library, on my stage I have a bezier point drawing tool, which is drawing graphics to a movieclip/sprite (I've tried both) and in using the drawToCanvas method which just passes data to the.draw() interface, the graphics immediately disappear. Any body have any ideas?? ...

Nearest Neighbor rendering in Canvas

I have a sprite that animates using a sprite sheet. He is only 16x16, but I want to scale him up to around 64x64 in all its pixel-y goodness! The results are terrible, of course the browser is anti aliasing it. :/ Thanks! ...

Any recomendation how to find icon position on a sprite image

Hi I'm new to sprite, I think i understand the concept of changing the background position to replace the image. so i have this big sprite png that I downloaded but how do I know the position of the icons? I don't have photo shop, is there any other recommended tool(free) to find the position? ...

Cocos2d Sprite not beeing added from another class

Hi, i'm having a little problem here and i cant figure out whats wrong. I have a simple setup. A CCLayer-subclass, in it's init-method I initialize a CCSpriteSheet and add it as child to the layer. - (id)init { ... enemySprites = [CCSpriteSheet spriteSheetWithFile:@"rock1.png"]; enemies = [[NSMutableDictionary alloc] init]; [self ad...

How can I use more than one sprite sheet? cocos2d/iPhone

Hi all. I'm trying to use more than one sprite sheet because I can't fit them all on one and having two makes my ordering them easier (sprite sheet one sprites are in the back and have a lower zOrder). I'm currently doing: spriteSheet1 = [[CCSpriteSheet spriteSheetWithFile:@"spriteSheet1.png" capacity:3] retain]; [[CCSpriteFrameCache sh...

iPhone Cocos2D CCColorLayers

Hello, I am currently building a simple game in cocos2d. I wish to have a CCColorLayer which has a transparent background, but has visible children CCSprites. Is this possible, and if so how? Many Thanks, nonono ...

Why is glClear() so slow with point sprites on iPhone?

I am trying to draw point sprites with OpenGL ES on iPhone. It's possible there could be very many of them (1000) and up to 64 pixels wide (maybe that's my problem right there - is there a limit or could I be using too much memory?) I am using CADisplayLink to time the frames. What happens is that the first gl drawing function tends to ...

How to make a sprite point at the mouse. XNA C#

Hi, If you would look at this diagram link text, I need to find angle A by only knowing the length of all sides of a right triangle. I don't know trig and need some help. ...

How to load and display image in OpenGL ES for iphone

Hi, I'm a newbie and trying to display a sprite on my iPhone screen using OpenGL ES. I know its far simpler and easier to do it with cocos2d but now I'm trying to code directly on OpenGL. Is there any simple yet efficient way to load and display sprites in OpenGL ES. What I've found until now is much much complex. :( ...

C# directx sprite origin

Hello, i have this problem when my Sprite rotation origin is fixed at top left corner of window (same with sprite.Draw and sprite.Draw2D) Either way if i change rotation center it's still at top left. I need sprite to rotate around its Z axis. Thank you. Edit: I have tried this: hereMatrix pm = Matrix.Translation(_playerPos.X + 8,...

Cocos2d touches snap sprites if move one over another

Hi I'm having problem with touch events. I have a class (Inheritance from CCLayer) that return some sprites with touches events. I have around 10 of this same class with different sprites. Kind like a domino. The problem is that if I move the sprites I have defined on this class over another, they snap to each other. My .h file: @...

Sprite scaling children even though stage.scaleMode = "noScale" and stage.align = "TL"

I am creating an AIR nativeWindow. I am adding two children, an HTMLLoader and a Sprite. The child Sprite has two children, a TextField and a Sprite that will be used to draw. I have set stage.scaleMode = "noScale" and stage.align = "TL", which the HTMLLoader seems to respect. However, the child Sprite scales its children whenever I set ...

jQuery controlled interactive "game" with CSS sprites

Hey, I was wondering if I could make the header on my page (http://marioplanet.com/images/logo/logo.png) interactive by having a little mini-game of sorts occur upon clicking on a part of the image. It would have Mario, only Mario, on top of the text, making the rest of the characters vanish upon the start of the "mini-game". Then, the...

How to do smooth movement with Accelerometer in Android?

How to move sprite objects smoothly on x-axis on change of Accelerometer in Android using Cococ2d? ...

Textured points in OpenGL ES 2.0?

I'm trying to implement textured points (e.g. point sprites) in OpenGL ES 2.0 for a particle system. Problem I'm having is the points all render as solid black squares, rather than having the texture properly mapped. I have verified that gl_PointCoord is in fact returning x/y values from 0.0 to 1.0, which would map across the entir...