sprites

What's the idea behind image sprites, how to approach it?

How do you approach the use of image sprites in css? Should I take all the images in my website and combine them to one image sprite? Is it really that beneficial? How hard is it to maintain those images and change them later on? ...

How to stretch a bitmap in C and SDL?

I am making a game for my CS class and the sprites I have found online are too small. How do you 'stretch' a bitmap... make them bigger using SDL? (I need to increase there size 50%, there all the same size.) A snippet of example code would be appreciated. ...

Does Flex/Actionsctipt/Flash implements a mechanism for reusing Sprites?

I'm creating a game and I create sprites(enemies). I keep creating and destroying sprites. Flash/Flex has a garbage collector which handles the destruction of unused resources. Should I create an object pool to reuse them, or should I leave flash/flex to handle the creation/destruction of objects? Which option is better from the perform...

How can we detect a touch of a sprite?

I have two sprites in my app. Both should have touches enabled and both touches are independent of one another. And if I touch the screen (not on sprites) it should have different touches. My problem is all three sprite1, sprite2, remaining screen should have independent touches. But my program is taking all the touches as same. How can ...

How do I repeat part of an image using background-position and CSS sprites?

I would like to create some buttons with dynamic width using CSS sprites and background-position but I'm not sure if what I want is possible.. I would like the button to have a left-side, middle, and right-side, with the middle repeating as required. Ideally I would like this to be made up of one image of 11px wide so the left and righ...

Prevent image cropping when making sprites from gif

Hey guys I've tried several tools (imagemagic, gif2png, Nconverter) to extract frames to make sprites from a .gif image that i have. I get the .pngs just fine, but they'r not the same size, some are 50x65 some 43x65 some 50x70, Which really screws any attempts at a descent animation. So is there a way to prevent this cropping or program...

Using Java how can I plot the path of a sprite in a straight line?

To illustrate I currently have something like int startX,endX,currX; int startY,endY,currY; public void updatePos(){ if(currX<=endX){ currX+=1; } //Same for y I can see that I dont want to move x and y the same amount each time but dont know how to work out what I should do to determine how much each should be adjusted. Any idea...

Animating sprites in Cocos2d

How do I avoid unneccesary deallocation? I'm running this code: CCSpriteFrameCache * cache = [CCSpriteFrameCache sharedSpriteFrameCache]; [cache addSpriteFramesWithFile:@"boosttexture.plist"]; CCAnimation * animation = [[CCAnimation alloc] initWithName:@"boosting" delay:1/24.0f]; [animation addFrame:[cache spriteFrameByNam...

Stuttering animation in iPhone OpenGL ES although fps is high

I am building a 2d OpenGL es application For iPad it displays a background texture and numerous textures on top of it which are always in motion. Every frame their location is recalculated based on time delta and speed and the entire thing is being rendered at 60 fps successfully, but still as the movement speed of the sprites raises, t...

Sprite array list never works! Need help understanding how to create arrays of class instances in JAVA

// Particle Stuct Instance private Sprite[] mParticles = new Sprite[10]; /// Particle emitter Properties private Context mContext; private int mPositionX, mPositionY, mWidth, mHeight, mNumParticles; private Rect srcRect, dstRect; /*** Constructor ! ***/ public ParticleEmitter(Context c, Sprite spriteImage, int num_particles) { ...

Why doesn't this image sprite menu display properly, and why aren't the links working?

The code validates. There should be two more images in the menu on the left, above the visible one of the silo. And each should be a link. http://www.briligg.com/agnosticism.html css is: external style sheet: .menu { position: relative; float: left; margin: 10px; padding: 0; width: 150px; } .menu li { margin: 0; padding: 0; list-styl...

Help on Removal of Dynamically Created sprites.

import flash.display.Sprite; import flash.net.URLLoader; var index:int = 0; var constY = 291; var constW = 2; var constH = 40; hydrogenBtn.label = "Hydrogen"; heliumBtn.label = "Helium"; lithiumBtn.label = "Lithium"; hydrogenBtn.addEventListener (MouseEvent.CLICK, loadHydrogen); heliumBtn.addEventListener (MouseEvent.C...

Automed CSSSprites -- csssprites.org

If this is a question that shouldn't be on SO, please let me know. Has anyone tried the website: http://csssprites.org/ To autogenerate and use CSS Sprites? What are your thoughts? I'm thinking about implementing (constantly looking for new ways to improve performance) ...

Emulating old-school sprite flickering (theory and concept)

I'm trying to develop an oldschool NES-style video game, with sprite flickering and graphical slowdown. I've been thinking of what type of logic I should use to enable such effects. I have to consider the following restrictions if I want to go old-school NES style: No more than 64 sprites on the screen at a time No more than 8 sprite...

Programming graphics and sound on PC - Total newbie questions, and lots of them!

Hello, This isn't exactly specifically a programming question (or is it?) but I was wondering: How are graphics and sound processed from code and output by the PC? My guess for graphics: There is some reserved memory space somewhere that holds exactly enough room for a frame of graphics output for your monitor. IE: 800 x 600, 24 bit...

Where can I buy game sprites and tiles?

Yes, I'd prefer to buy them instead of using "free" or "free" with some kind of weird license. Tried Google, but no luck and my fav RF graphics sites don't have any... :( ...

How do sprites work?

How do sprites work? I've seen sprites from old school games like Super Mario Brothers, and wondered how they're animated to make a game. They're always presented as one big image map, so how are they used? For Mario (as an example) are there precalculated image co-ordinates that outline mario, and are swapped between various mario sp...

resources for making a 2d sprite?

Hello everybody I am making a 2d game, can you post link- tutorials for making a 2d game sprites?, and tutorial for browser game development? I will be really helpfull Thanks to all ...

How can I create CSS sprites from images stored in the database?

I have an ASHX handler that I am using to display images that are stored in a database. I display the images as thumbnails and then full size if the user mouses over them. How can I combine the images at runtime to produce CSS sprites for use in this situation? If it can be done does anyone have suggestions on where to start? UPATE...

Do OpenGL Point Sprites work in Android?

I'm developing on a Droid, version 2.1-update1. My supported GL extensions include GL_OES_point_sprite and GL_OES_point_size_array. I am unable to get point sprites to render. The code below throws UnsupportedOperationException from GLWrapperBase at the glTexEnvi call. If I disable textures and comment out the glTexEnvi all, it t...