sprite

Cocos2d : Adding sprites in an array causes application to Terminate with uncaught exception

Hi, I'm getting an uncaught exception error when I try to add sprites to an array, and everything looks fine to me.. I'm using MonocleStudios Simplegame project for this monoclestudios dot com/static/simplegame.zip Code should be fairly self-explanatory: [code] @implementation GameScene (id) init { self = [super init]; if (self != ...

possible to display an arrayCollection of Sprites in a List component?

I have an arrayCollection of objects that extend Sprite, and have bitmaps within them. I want to display these in a list (or some other component that would allow a user to scroll through them, and see their associated data.) When I do: myList.dataProvider = myArrayCollection the list just shows a bunch of lines of [Object, Item] inst...

Loading Images in J2ME?

I'm not so new to the concepts present on J2ME, but I'm sort of lazy in ways I shouldn't: Lately my app has been loading images into memory as they were candy... Sprite example = new Sprite(Image.createImage("/images/example.png"), w, h); and I'm not really sure it's the best way, but it worked fine in my Motorola Z6, until last night...

Objective-C Sprite Class (iPhone SDK)

Okay, just for starters, I am very new to Objective-C, (C in general). I am not new to programming, and I've found the transition seamless so far, until now. I'm trying to implement a Sprite class I found online in order to develop a game on the iPhone, but I'm getting many errors. For example... size = CGSizeMake([image size].width , [...

Simplest sample with 2D sprites in directx 10

As in question, I'm trying to make sprites working but it's very hard and it doesn't display, so if anyone has a simple sample I'd be grateful. ...

Sprites in directx10 and texture filtering

Hi Is it possible to set different texture filtering when working with sprites? ...

Refrencing sprites from an array cocos2d

Normally when adding sprites to a layer in cocos2d I'd just add a pointer to the layer's interface for each sprite to allow it to be referenced in that layer. However, I'm now using for loops to create an array of sprites: -(void) make5Gobs { Sprite *gobs[5]; for(int i = 0; i < 3; i++) { gobs[i] = [Sprite spriteWithFil...

iPhone development using sprites

I want to create an iPhone/iPod game. I want it to be 3d, but I want to use sprites instead of OpenGL to do this (I assume this would be easier since I don't know OpenGL). I was thinking of simply layering sprites over top of each other and changing their size to give an illusion of 3d. It doesn't need to be too convincing since the gam...

FireFox 3.5 Fetches Image Sprite Repetitively - how to prevent?

EDIT: Mozilla fixed the bug. This thread is dead. EDIT: This is a Mozilla bug. See this thread: https://bugzilla.mozilla.org/show%5Fbug.cgi?id=501853 I have a sprite I use for my images here: http://www.trailbehind.com/site%5Fmedia/images/sprite.png In FireFox 3.5, the sprite seems to get fetched every time I render an icon on my map,...

cocos2d Sprite contentSize Problem

I've defined a sprite using the spriteWithFile method, providing a 120px by 30px .png Sprite *trampoline = [Sprite spriteWithFile:@"trampoline.png"]; [self addChild:trampoline]; When I add this to my Layer and position it, it is where I expect it to be on the screen. trampoline = [Trampoline node]; trampoline.position = ccp(160,15)...

Why can't I use colorkey for SDL textures?

I wrote up this simple C program to test basic SDL 1.3 functionality. Everything works, with one minor problem. The colorkey doesn't get converted. I'm loading an 8-bit PNG sprite file where palette index #0 is the background color. I'd expect to see only the sprites displayed, but what I get is the entire image, including the backgro...

Sprite/PNG graphics-heavy site, oh my!

I need to create a site that is very graphics-heavy (torn paper backgrounds with transparent shadows over textured graphics, etc.) One way that I was thinking of saving on file size was to drop all my background elements into one PNG. The issue is that this file is now 180k. If I break it up into various GIFs and a couple PNGs then it ...

OpenGL iPhone Sprite Sheet

I have a sprite sheet of images of differnet width and height, which i have the coordinates to. I need to render only a specific sprite and is wondering how to go about doing it. Can anyone help me? ...

Creating CSS sprites using msbuild?

Has anyone seen tooling, or even a process concept to generate css sprites from an existing website's images, and css during the build process? I should think the steps would be: walk an images directory create a single sprite file from all the images in that directory for each image find any css classes using that image update the cs...

XNA SpriteBatch and BasicEffect not compatible?

I would like to control ambient lighting for a 2D SpriteBatch rendered set of graphics on a global scale. I realise I can do this by blending the color passed into SpriteBatch.Draw but I'd rather do this globally. The BasicEffect shader contols fixed function pipeline style lighting in XNA for simple scenes. Is the BasicEffect shader ...

Routing Mouse Events through a Sprite in Actionscript 3

In a pure Actionscript 3 project, I have a sprite that overlaps another sprite. The lower sprite normally handles mouse clicks. The lower sprite no longer processes mouse events when it is overlapped by the higher sprite. I understand that this is normal behavior. I would like the lower sprite to handle mouse events when it is over...

AS3 Sprite Sheets

I have an image mySprite.png. The image is a 5x5 grid of 32x32 px sprites. This image has been loaded into the project's library. Assuming I have a render() function inside a class, how would this class draw itself as a single sprite from this sprite sheet resource? ...

What is the best way to handle rotating sprites for a top-down view game

Hello all. I am working on a top-down view 2d game at the moment and I am learning a ton about sprites and sprite handling. My question is how to handle a set of sprites that can be rotated in as many as 32 directions. At the moment a given object has its sprite sheet with all of the animations oriented with the object pointing at 0 deg...

how to use cocos2d sprite collision?

how do i start to implement a class for sprite collision ...

Bounding box collision handling - not detection

I had this working a week ago, but then I ended up breaking it. I can't get it working again. I have some 2D sprites, they're just rectangles. No rotation involved. I'm not looking for a way to detect collisions between them, I have that, and there's thousands of articles out there about it. What I can't find is any resource about what t...