A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

6
votes
2answers
4k views

Rendering shadow sprites in cocos2d-x

I am writing a 2D game with cocos2d-x. I want to put a "shadow" sprite on a background sprite using the equation: MAX(0, Cd * 1 - Cs * S) where Cd is the destination color (that is, a background ...
4
votes
2answers
523 views

Jittery Movement, Uncontrollably Rotating + Front of Sprite?

So I've been looking around to try and figure out how I make my sprite face my mouse. So far the sprite moves to where my mouse is by some vector math. Now I'd like it to rotate and face the mouse as ...
1
vote
1answer
88 views

Android OpenGL Sprite Component Pattern

Ok so I have a 2D OpenGL project that was originally a class assignment, and now I am using it to experiment with and to broaden my knowledge. Originally, I had been using the Normalized Devices ...
2
votes
2answers
782 views

Card game - creating card Listener

I am making a card game where there are 21 cards on hand and 2 options from where user can draw cards to his hand and throw a card from hand. I am new on game development and I'm following the ...
0
votes
2answers
352 views

How to fix overly blurred texture / image in unity?

so, I'm not sure what caused this, let image below do the explanation : How to fix the overly blurred texture in unity? It's so frustrating, since I can't get it right, because when I tried it in ...
0
votes
1answer
33 views

How do I fix a delay between the first and second KeyEvent

I recently got really interested in making my own little game. As I have no real game development background I'm still figuring stuff out, but I encountered a little problem. While working on the ...
0
votes
2answers
91 views

Calculate ticks for animation delay

Hi guys I am trying to calculate the correct elapsedTime for each frame in my animation. Example I have a sprite called stance that has 20 frames I want to give each frame a tick delay property that ...
1
vote
1answer
385 views

Cocos2d/Cocos2d-x Attaching an arrow (sprite) to another body sprite (person)

I am trying to set up a simple bow and arrow game. When the arrow hits the enemy body, the arrow's body is deleted and the arrow sprite continues to update, keeping the position correct in relation to ...
1
vote
1answer
62 views

Polygons and actionlisteners Libgdx

I've been browsing these forums for a while now and I nearly always am able to find an answer without having to ask my own question! Such a great community! This is the first time I've been stumped ...
0
votes
1answer
67 views

Positioning partials of character sprite animations

I'm not entirely sure how to best explain what I'm doing. Maybe I'm going about this completely the wrong way. If any of you find that that is in fact the case, I would appreciate it if you told me ...
1
vote
1answer
237 views

How can I spawn a sprite based on a condition after the game starts?

How do I spawn a sprite anytime later in the game when the game starts? I'm using FlashDevelop with Flixel. I did try it in override public function create(): void. It works only in the beginning. I ...
1
vote
2answers
77 views

How can I add holes to a sprite? [duplicate]

I'd like to find a way to add holes caused by a 'bomb' to my floor sprite, a bit like what is in this game here. Basically there is a sprite (the green floor) and another sprite (the bomb) that ...
0
votes
1answer
161 views

Unity draw part of sprite sheet

Im working in Unity and im finding the animator isnt working for what im trying to do in my 2d game. What I want to do is build a specific animation using sprite sheets, then be able to reuses that ...
2
votes
1answer
1k views

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone. Here are pictures demonstrating the problem: http://brandonyuh.minus.com/mFpdTSgN17VUq On the desktop ...
1
vote
0answers
27 views

Creating a large amount of sprites and animations [closed]

For my AP U.S. Government and Politics class, I am making a spinoff of Mortal Kombat. Because of time constraints, I'm using an open source version of the game and want to create new characters. I ...
4
votes
1answer
31k views

Change the sprite of a Object in Unity

Inside the script code of the the hero(object) I want add the possibility to change its sprite. So the player hits the space button and the sprite changes into the other sprite already added to the ...
0
votes
1answer
128 views

Libgdx rotate sprite with collision

Im making a game where I have an object in the center of the screen and then balls come out from the sides of the screen. When you touch the screen the object rotates 90 degrees clockwise and it has ...
0
votes
1answer
33 views

Unity sprite renderer uses standard 2D sprite instead of custom loaded one

I have loaded a 2D sprite from the filesystem and created a sprite from it, which I then attach to a SpriteRenderer. The game object appears in the scene but for some reason it doesn't seem to be ...
1
vote
1answer
58 views

Unity3D (2D) - Make sure Item Dragged Is Top Item Visually

I am using Unity 5 and making a 2D game in which many sprites will be stacked on top of each other and can then be moved by dragging. Sometimes when the users goes to drag from a pile, ones that ...
0
votes
0answers
13 views

Unet 2D sync problems

I've studied Unet but I still can't get it to work right :( I have 3 problems. The first: I can't force player 1 to always spawn from a specific spawn point (and same with player 2). Therefore I've ...
2
votes
2answers
669 views

Unity 2D Alpha cutout layer for Sprites

I'm trying to make a simple Fog of War effect for my 2d game, similar to these: . I want to have a sprite layer of black and then have a sprite to cut out itself from the black layer, leaving a ...
1
vote
1answer
105 views

How do I make a 2D sprite flash green when tapped?

I have a sprite that is based on an image of a gray circle. When the user touches the sprite, I want the sprite to flash green, as in I want the circle to appear to turn green for 0.2 seconds. I tried ...
1
vote
1answer
52 views

2D Sprite batching in OpenGL: How to send transformation data to GPU

OpenGL newbie here. So I'm trying to implement sprite batching to draw ~100 sprites per draw call. I've created a VBO that contains texture coordinates, vertex coordinates, color data (for tinting), ...
0
votes
0answers
26 views

Splitting spritesheets and making the background transparent

Is there a quick way of splitting and removing the background of a spritesheet that's taken from the web? I'm fine with downloading software, using a website or making use of any commands that ...
0
votes
1answer
56 views

Sprite Sheet Texture not being rendered

I'm making space invaders (in OpenGL/SDL) and I've run into a problem when trying to draw the sprite for the spaceship from the spritesheet. In my entity class, I have a pointer for the sprite that ...
0
votes
1answer
71 views

Top down 2d orthogonal view with 3D elements (Unity)

I've decided to give Unity a go with my project. I want to create a 2d RPG perspective world, but with elements of 3D mixed in. So for instance, I think I might make trees and grass 3D, for this to ...
2
votes
2answers
490 views

Gamemaker Running Animation Flashing, showing single frame, and displaying jump and run sprites at same time

EDIT: I changed the origin of the run sprite to the center, and it is no longer hovering above the jumping sprite. It now flashes in the same location as the run sprite when moving to the side. ...
2
votes
0answers
35 views

How to store sprite data in a VBO?

I'm planning on rendering many sprites in my games, but I am not sure which method of storing their data to use. I haven't tried all of them yet, but I want to see if I also have anything important ...
0
votes
2answers
79 views

Positioning 2D (non-UI system) game objects

As an old Flash dev I'm slightly confused about how you position game objects on the screen in Unity since game objects have no width or height (only a scale). Let's say I have a container gameobject ...
1
vote
1answer
1k views

libgdx sprite position relative to body

Apologies if this is a reiteration, as I couldn't find another discussion of this over the past couple days. Issue: I'm using libgdx and box2d, and I'm currently updating the sprite's position to ...
1
vote
1answer
87 views

libGDX upload z-axis of sprite to graphics card

Background: I want to obtain each fragments position via vertex interpolation to then calculate the light vector for phong shading (L = [Fragment pos] - [light source pos]). Problem: At the moment I ...
0
votes
0answers
13 views

add physics to a group or container body in phaser

I'm developing a HTML5 Phaser game. In this game I do have a Group which I would like to behavior as a physics body (arcade-physics). It is a character with a lot of moving parts (sprites) inside ...
0
votes
1answer
22 views

libgdx sprite placement

Im making a soccer game where you basically have to shoot the ball to the goal and the ball goes to where you touch the screen. Im having an issue with the ball though, when the ball spawns on the ...
0
votes
2answers
280 views

How to properly give Image source for multiple sources?

I'm writing a script to change the image on the button based on previous selection. Another script is giving the CurrentAvatar variable once previous button is pressed. My problem is i can't seem to ...
3
votes
1answer
110 views

Scene2D Actor walking animation?

I used to extend my Player/Entity class with Sprite, that way I could create a walking animation using SetRegion and super(stilldown.getKeyFrame(0)); I've recently started porting everything over to ...
0
votes
1answer
31 views

How to “properly” display a 2d sprites in a 3d environment?

I would like to show "the classic" missile lock viewfinder (the target symbol) of a war aircraft. So the target symbol must follow the enemy, and became red when "lock" it. So i thought simply to ...
0
votes
0answers
28 views

Create a character from multiple sprites

I have multiple spritesheets for a character in my game. The user can decide which gender, which hair, which haircolor he wants. Some images have to be on a higher layer than others (hair > head > ...
0
votes
1answer
70 views

How to use collision masks and overlap_area in pygame?

So, I've been prototyping a game, and I've been using sprite collision, and it's not cutting it any more. I read up on the documentation about masks and overlap area: ...
3
votes
2answers
137 views

How to handle angles in an isometric game?

I am working on my first isometric game, and I am not sure how to go about angles and rotation. Basically, I want the player's forward movement and rotation to coincide with the isometric angles. I ...
1
vote
1answer
101 views

LibGDX - Rotating sprites and still keep the positioning between them

I've been struggling with a problem regarding rotations and relative positions between sprites (in this case, the sprites are just lines) - a bit off-topic, but should i be using the ShapeRenderer ...
0
votes
0answers
25 views

Whe are my sprites invisible in the animation preview?

I'm just starting in Unity and now this problem came I out: As you can see, there is no sprite in the animation preview. Why is this happening?
1
vote
3answers
731 views

In what size should i design sprites for unity iOS?

I am developing a 2D platform game in unity.I have conceptualised the game and have to design the art assets/sprites, but the problem is at what resolution or size do i design them? If I target the ...
0
votes
0answers
32 views

Dealing with floating point imprecisions in a 2D Tiled based game

I'm using unity3d to create a little horizontal tile based platformer game. My entities have a rectangle defining their collision volume. On the other hand I'm using a camera configured to 1 unit = ...
0
votes
0answers
7 views

make bigger touch space node using spritekit and objective c

I try to make simple game, but I have a problem, node is too small,for smaller iphone phones finger can't move it on ipad it can and on simulator too, so i know its not the code fault. Because I use ...
9
votes
1answer
2k views

Inline sprites in Unity's text?

How can I use different materials when using the tag for Unity's rich text syntax? I want to be able to have sprites that are inline with my text without having to create custom fonts. Here's what I ...
0
votes
1answer
128 views

Monogame - Sprite sheet animation

I have a sprite sheet that contains a character walk cycle, and I have made a player class that allows the player to move and cycle through the walk animation, however the animation only works whilst ...
0
votes
1answer
34 views

Libgdx + Box2d working with 2 cameras

Recently I have read that you can work with 2 cameras whenever you involve Box2d, which only works in meters. In my Renderer class, I receive all the entities in the game and then draw them. I work ...
0
votes
1answer
39 views

Libgdx Sprite rotation around specific point

I made complex dynamic body that rotates around other body that is static. It works perfectly, however I got messed up with sprite position on that body. Here's what I have now and here's what I ...
0
votes
1answer
62 views

Isometric scene in spritekit

I tried play with spritekit in isometric grid. But i can't understand how to fix level. import SpriteKit import XCPlayground let view:SKView = SKView(frame: CGRectMake(0, 0, 1024, 768)) ...
1
vote
0answers
40 views

Java Libgdx Attaching Sprite to Box2D Body

So I am working on programming a java 2D platformer for fun on the side and I have a rendered TMX level and a box2d body (just a circle shape) that I am currently using as my player. All the controls ...