A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

0
votes
2answers
107 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 ...
3
votes
2answers
824 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
858 views

Gradient fill color on circular sprite

I have a white circle sprite. I know how to change its color to a solid fill color. using GetComponent<Renderer>().material.color. But how would I give it a gradient fill color. I've been ...
3
votes
1answer
55 views

How to save one color channel, taking only 1 byte per pixel?

How can I save only one color channel, such that it would only take 1 byte per pixel? I only want to save the alpha channel and apply colors later using a custom shader. But all the formats I tried ...
3
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
1answer
245 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
1answer
182 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 ...
0
votes
2answers
46 views

Black lines on sprites

I am having the issue as seen below while using a textureAtlas with libgdx. I haven't found anyone else with the issue so I decided to ask here. Here is an image of the textures in the game screen: ...
0
votes
1answer
21 views

Transition the scale of a sprite

I'm new to this engine but I am making a menu with some basic animation, I would like to start with a sprite scaled up and then it would transition to the normal size. Is it possible with LibGDX or do ...
1
vote
1answer
98 views

Programmatically change combination of sprites

I am a total newby to unity and cannot figure out how to achieve the following: I want to show a picture composed of different sprites. E.g., a pen with four binary features: the pencolor (black or ...
-3
votes
1answer
37 views

Repeating an anim at various positions in unity 2d

I never worked in unity 2d before. I just started developing a 2d game couple of days back. The gameplay of my game is almost similar to flappy bird. I successfully imported an animation file (.anim ...
5
votes
4answers
4k views

How can I ease the work of getting pixel coordinates from a spritesheet?

When it comes to spritesheets they're usually easier to use, and they're very efficient memory-wise, but the problem that I'm always having is getting the actual position of a sprite from a sheet. ...
2
votes
1answer
68 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 aren'...
1
vote
1answer
65 views

How do I use Sprite in libgdx ashley ecs framework?

In the libgdx ashley wiki there's an example of Position and Velocity components, which is pretty easy to understand. My problem now is I don't know how do I integrate Sprite class as Component. In ...
1
vote
1answer
44 views

Which is the most efficient way to make the screen follow a sprite?

This is my first non-board game and I'm trying to learn a bit about 2D graphics in Java. But I don't know, how should I efficiently implement a camera to make the screen follow the main character. I ...
1
vote
1answer
51 views

Multiple Sprite animation layers overlayed in Unity Animator

I have an animator with two layers, an axe layer and a body layer. I would like to animate the two in sync with each other. They are both 64x64 sprite animations, frame-by-frame bitmaps. The ...
1
vote
1answer
77 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 ...
1
vote
2answers
427 views

Animating isometric sprites

I'm having trouble coming up with a way to animate these 2D isometric sprites. The sprites are stored like this: (Game Folder Root)/Assets/Sprites/(Sprite Name)/(Sprite Animation)/(Sprite Direction)/(...
1
vote
1answer
72 views

How can I make my character 'flip' in Game Maker?

I want my character to 'flip' or 'mirror' when I press 'A' or 'S'. Thing is, I've placed the origin everywhere on the character and he seems to only face one direction. Video showing what I see: ...
2
votes
2answers
555 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. ...
0
votes
0answers
42 views

Sprites Positons

I create my sprites for 800x480 and position them accroding to this On dealing with multiple resolutions I use a method that set sprite size and position according to the current resolution instead ...
0
votes
1answer
67 views

Unity 2d sprite repeated as background

I'm a web developer with over 12 years of experience and I'm moving my first steps in game development in the latest days. Specifically I'm playing with Unity and trying to understand how it works and ...
0
votes
1answer
46 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
2answers
106 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
116 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
2answers
43 views

Sprite with shadows in both sides

I have a gameobject with a SpriteRenderer, and I want it to cast (and receive) shadows like a 3D model. The sprite will turn around depending of his direction, so all faces must cast shadows. I ...
1
vote
2answers
301 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
150 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 ...
1
vote
1answer
85 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: https://www.pygame.org/docs/ref/...
4
votes
2answers
537 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 ...
2
votes
3answers
898 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 ...
2
votes
1answer
88 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
51 views

Did they remove Sprite sorting layers from Unity?

I can't figure out how to set it. I thought it was a setting on the sprite renderer but it doesn't seem to be there? Google isn't turning up any results.
0
votes
2answers
454 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 ...
3
votes
3answers
982 views

Frameskipping in Android gameloop causing choppy sprites (Open GL ES 2.0)

I have written a simple 2d platform game for Android and am wondering how one deals with frame-skipping? Are there any alternatives? Let me explain further. So, my game loop allows for the ...
1
vote
1answer
397 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
0answers
31 views

Renderable object abstraction

In my engine I have 2 types of 2D renderables: sprites and groups (and maybe primitives later). Sprites are just textured quads and groups are multiple renderables grouped in a single object. I have ...
0
votes
1answer
49 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 ...
2
votes
2answers
81 views

object smooth orbital limit around another object depending on mouse drag

I am working in Unity. I have special objects that can each be dragged freely around in 2d. The objects cannot get too close to other objects (minimal Vector3.distance allowed is 1.5f). I also have ...
0
votes
1answer
110 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)) ...
0
votes
1answer
84 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 ...
0
votes
2answers
97 views

2D top down RPG animation architecture problem

I have a problem with my sprite animations right now. I have different animations and sequences for each character so an specific archer might do a ranged attack in which he just plays one animation ...
1
vote
1answer
52 views

Basic Animation Concept - Stuttering Sprites (Java)

The Problem I have some sprites animating across my screen (some spaceships). I alter their X coordinates (like -5, for animation) in my game loop. I want the animation to happen faster, however ...
1
vote
0answers
13 views

Setting useImmersiveMode to true makes a moving sprite blink in a LibGDX game

I'm developing a simple game where i have gravity and a body which jumps when i touch the screen and a sprite displaying in its position. All is good until i set useImmersiveMode to true on ...
0
votes
1answer
26 views

Sprite update issue

I'm currently implementing Box2D with LIBGdx and i'm having issue on update, as you can see on this video : https://www.youtube.com/watch?v=D3Nph6yftTQ whenever my player move or the camera move the ...
1
vote
1answer
100 views

How should I animate sprites with separate body parts?

I am not an artist. I have a 2D Sprite broken up into different body parts that I want to animate. I know how to do it in Unity, but every artist I know would prefer to use Flash. I am trying to ...
0
votes
1answer
31 views

Gaussian blur spritesheet/texture atlas without clipping edges

I'm trying to apply a Gaussian blur to a shadow to soften them a bit. I can apply the blur fine, but the problem is that I end up with this: Instead of this: Which isn't great. The image is part ...
0
votes
0answers
29 views

Unity3d how to correctly using tilesets

currently I am using external tilesets like this: Load texture from file to Texture2D Texture2D tx2 = new Texture2D(2, 2); tx2.filterMode = FilterMode.Point; tx2.wrapMode = TextureWrapMode.Clamp; ...
0
votes
0answers
62 views

How can I export Flash XML that includes the symbol name used each frame?

After creating animations in Flash, I use Export Motion XML to get the animation data I need, which includes things like the xy movement, rotation, scale, etc. It includes everything I need EXCEPT ...
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 ...