sprite

CSS Sprites showing broken image icon over image, but hover still works

空扰寡人 提交于 2019-12-22 00:27:30
问题 I can't figure this out..hopefully someone else can. I have an image button . The hover effect works fine. However, I have the IE broken image icon over the button image. Lookie here: Funky Image Funky Image Hover As you can see...they both work except for that annoying broken image. Here's my CSS: .donate-btn{ background: transparent url(/custom/img/donate-btn.png) no-repeat; overflow:hidden; height:45px; width:210px; float:left; } .donate-btn:hover{ background: transparent url(/custom/img

Too slow switching for android in Unity3D

假如想象 提交于 2019-12-21 20:52:35
问题 My game has 1000+ frames and format of sprites is Crunch because of too many sprites in this project. when I want to switch it from windows to android it takes me almost 1 day to switch (actually I don't permit it to switch completely) but switching to windows is not that much, maybe just 15 minuets. Just I want to know is it sensible or not ? and if it doesn't, is there any solution ? 回答1: I have my projects in a version control system (like SVN or Git) and have a checkout per build platform

CSS image sprites

送分小仙女□ 提交于 2019-12-21 04:35:09
问题 Is the only benefit of using css image sprites that there is less http requests? Or is there other benefits? Also is there an easy way of detiming which area of a sprite to show? 回答1: Like you said, one of the main advantage is to reduce the number of requests to the server, improving the response time (especially if you're loading a large amount of small images). But this is not the only reasons people use sprites. If you don't use sprites for a "mouse over" display, the user will see the

Rotating sprite with finger in Cocos2d

余生颓废 提交于 2019-12-21 02:47:12
问题 I need help figuring out the rotation of a sprite with my finger. The sprite is rotating fine but on the initial touch of my finger it somehow rotates by a few degrees by itself. Also the rotations only work when the finger is rotated around the center of the sprite. I am trying to simulate the bicycle wheel and have a gear sprite and a pedal sprite as a child of the gear sprite. I want the bicycle wheel to rotate as I touch the pedal and rotate it. I haven't got that far yet. Right now I am

How to load and display image in OpenGL ES for iphone

妖精的绣舞 提交于 2019-12-20 12:32:21
问题 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. :( 回答1: Here is some code to load a png from bundle: UIImage* image = [UIImage imageNamed:@"PictureName.png"]; GLubyte* imageData = malloc(image.size.width * image.size.height * 4);

Recommended 2D Sprite engine for a Delphi board game? [closed]

浪子不回头ぞ 提交于 2019-12-20 10:55:47
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Which are the choices I should look into for a Delphi sprite engine. I am aware of GLScene Andorra 2D anything else I am missing? It is best if it relies on OpenGL. DirectX only solutions are not very welcome. 回答1: Take a look at Asphyre. It's a 2D/3D Delphi framework that can use OpenGL, DirectX 7, DirectX 9

Textures in OpenGL ES 2.0 for Android

筅森魡賤 提交于 2019-12-20 10:25:36
问题 I'm new to OpenGL and I'm teaching myself by making a 2D game for Android with ES 2.0. I am starting off by creating a "Sprite" class that creates a plane and renders a texture to it. To practice, I have two Sprite objects that are drawn alternating in the same place. I got this much working fine and well with ES 1.0, but now that I've switched to 2.0, I am getting a black screen with no errors . I'm exhausted trying to figure out what I'm doing wrong, but I have a strong feeling it has to do

Starling library - When I try and change cursor to image…it doesn't work (and a sprite element dissapears from stage)

こ雲淡風輕ζ 提交于 2019-12-20 06:38:12
问题 I am using Starling to make a really, really, really easy game - I am just trying to add a stationary sprite to the stage...and make it so that when the mouse touches the sprite...the game "stops" and a score is sent. I haven't tried implementing hitTest yet for the collision, but I have run into a sort of conflict problem where, when I comment out the line(s) that is supposed to change the cursor image (see Startup.as - stage.addEventListener(TouchEvent.TOUCH, touchHandler); and

Stuttering animation when spanning multiple sprite sheets in easeljs

这一生的挚爱 提交于 2019-12-20 05:24:27
问题 Using EaselJS, I have an animation that the user may scroll through with a custom slider. It uses 10 sprite sheets to display 152 frames of size 1924 x 1708. //images were declared above in style | var chromophoreAni0 = new Image(); | var data = { images: [chromophoreAniImage0, chromophoreAniImage1, chromophoreAniImage2, chromophoreAniImage3, chromophoreAniImage4, chromophoreAniImage5, chromophoreAniImage6, chromophoreAniImage7, chromophoreAniImage8, chromophoreAniImage9], frames: {count: 152

multiple key detection for KeyListener (java)

╄→尐↘猪︶ㄣ 提交于 2019-12-20 04:58:10
问题 How would one implement KeyListener so that I can create a two-player system where one person uses '.' and '/' to control a character, and the other person can use the arrow keys without them interrupting each other? The way I have it now is that when one person holds down the arrow key, their character moves, but the instant you use the other player's controls, the first person's character stops. 回答1: Create a HashMap<Int,Boolean> that marks which keys are currently pressed/depressed. Then