2D refers to two dimensional space where coordinates are represented with X and Y values.

learn more… | top users | synonyms

0
votes
2answers
53 views

Limiting framerate with a fixed timestep

Hi I'm learning how to create a 2d platformer in C++ using the SFML2 library. My current goal is limiting the game's framerate. SFML2 has a window.setFramerateLimit(unsigned int limit) function for ...
6
votes
5answers
238 views

How can I implement smooth tile-based lighting?

I have been working on a 2D tile game and I have implemented hard-edged lighting: I want it to be smoothed out a bit. I don't need shadows or anything, just simple lighting. I'd like it to look ...
0
votes
1answer
48 views

Create a map without using too much of memory

EDIT : My Tile is a little graphic sprite shows a village or free space... I'm Creating a strategy online game on Xamarin. I want to create a static 2D 1000*1000 Map and put each player in one of ...
0
votes
0answers
43 views

Sprite always starts flipped

Everytime I start the game, or I swap animator controllers in the inspector (in runtime), the character is flipped in X axis until I start moving him. How do I prevent this to happen? This happens to ...
0
votes
1answer
110 views

How can I avoid “Moonwalking”

Let me explain my question: I have a sprite sheet with the different frames of the animations. Each animation has 8 frames. Based on the player's input, I modify the character's coordinates, thus I ...
1
vote
2answers
35 views

Why is my zooming-in + changing scenes not woking in Unity?

I'm zooming on a map using Math.Lerp and then I use the scene manager to change the scene. Here is my attempt but it doesn't work on the map. I have attached it to the main camera, in the worldView: ...
1
vote
1answer
71 views

Hybrid App - Game Encyclopedia Image Asset

An in-game encyclopedia usually consists of entries and images for things related to the game. For example, pokemon's pokedex. Image of Pokemon, text description and so on. I've happen to encounter a ...
1
vote
1answer
103 views

C# OpenTK Text rendering

I've been looking everywhere for a solution on how to render/draw text for my 2D OpenTK-based game. Been trying quite a few QuickFont ones without success (either a AccessViolation exception or text ...
2
votes
1answer
41 views

Correct way of managing player states?

I'm a relatively new programmer attempting to create a simple 2d fighter for fun using the SFML 2 library. As a game with interaction dependent on what the character is doing, using a state system ...
3
votes
1answer
101 views

Generate camera shakes in Java

How would one of these work? (If you don't know what I'm talking about, think like in a game where you shoot a big gun, and your screen bounces in the opposite direction.) I've been experimenting ...
-1
votes
1answer
69 views

How to fill a canvas with triangles that are seemingly random?

Given a canvas say, 1000 X 1000 unit. I would like to fill the canvas with triangles. The triangles can be of any type right angle, equilateral...etc. To avoid big chunks of triangles lets say all ...
1
vote
0answers
12 views

LibGDX TexturePacker line problem

I'm trying to use a TextureAtlas for all my textures for better performance. Every time my game starts all my tiles are packed into one texture atlas. I have put following code into my DesktopLauncher ...
-2
votes
0answers
35 views

Faster way of creating character animations [on hold]

We need to create a computer game for our Artificial Intelligence subject. I decided to choose 2D Fighting games because I thought it would be easy. As I continued researching about this game I found ...
2
votes
1answer
227 views

2D lighting causes black rings to appear

A year ago I implemented 2d lighting in XNA using sprites. The sprites I used were created by placing a soft white photoshop brush on a transparant background. The result was this: (lights only) ...
3
votes
3answers
387 views

Adding a small slide when player releases left/right key

The aim is for the player object to slow down and stop instead of just stopping dead. The following codes works ok when the player is not jumping, but gets stuck in an object if the player is in the ...
-1
votes
0answers
46 views

2D Strategy Static Game [on hold]

I want to create a 2D strategy online game and nothing moves but map(With scroll)... All other units are static. 1- Is it necessary to use a game engine ? 2- And I'm single handed and we are not a ...
1
vote
2answers
86 views

Collider not working

I have a 2D object (without a parent) with a 2d box collider (dimensions are not small) added to it and set as trigger when I place it in the scene it works just fine however when I instantiate its ...
0
votes
1answer
68 views

Zoom in and switch scenes in unity

I'm trying to zoom in as my game is like a map and I have to click on a certain country to zoom in and change the scene to this country. So I want to zoom the camera slowly and then change the scene ...
3
votes
2answers
825 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
3answers
71 views

How do I flip Player in 2D Touch Movement?

How do i flip my Player in 2D when i got touch movement? I got Buttons to move but how do I flip the player now if i walk to the right cause my player faces to the left..? here is my Player Script: ...
1
vote
2answers
42 views

how to handle the virtual Z axis in 2D games?

I'm using this paper 2d framework of UE4 where a plane mapped with sprite texture is put in 3d world and therefore appears as 2D when viewed from sideways. Its all good for games like NES mario where ...
1
vote
0answers
22 views

Unity 2D animation running partially

I have a 2D skeleton animation of human walk cycle - which is fine. I am trying hard to code that should STOP only hands animation but legs should not (on a player input - for example on space bar ...
5
votes
2answers
139 views

Level of detail for the map of stars

I have a large list of points (millions) in 2d. Let's say it's a star map. Each star has a radius and position in space. I want to render this map at different level of details. From a single star to ...
1
vote
0answers
38 views

Position values magically flipping signs

I'm trying to make a 2D sliding puzzle game (like 15 puzzle). My main problem is getting the squares to stop just before they touch. I don't want to use colliders because I'm scared they might pop out ...
0
votes
0answers
30 views

How can I develop a simple Andoid game with basic 2D physics? [closed]

I have a 2D game idea, and do not know how should I start. It is a simple game, where I should be able to stack up a lot of objects in a heap affected by gravity. Which framework (I have heard of ...
0
votes
0answers
37 views

I need a payment gateway for my game [closed]

I am a game dev. I am thinking to make a game with in app purchases. But receiving money feom google play isn’t available in my country. So i am searching for other ways. Please help me. I cant use ...
1
vote
1answer
41 views

Unity 2D animation issue

I have this weird animation bug in Unity that I believe is how Unity handles the frame. I dont know how to show the image so I'll do my best to explain it. So I put a bunch of 2D sprites in a ...
0
votes
2answers
55 views

Unity UI issue trying to make a button work while held down

Pretty simple, have a rotate up button and I ant it to rotate while held down. using UnityEngine; using System.Collections; using UnityEngine.UI; using UnityEngine.EventSystems; public class ...
3
votes
2answers
6k views

How move sprite in Java 2d (swing) with keyboard?

I'm practicing some simple techniques with Java swing games, to learn the basics. Right now I'm practicing how to move a sprite... but it's not working! whhyyyy Here is what I've come up with so far (...
-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 ...
1
vote
1answer
87 views

Vertexquads are not being drawn in 2D space

I started teaching myself DirectX a short time ago and have come across a problem which I can't figure out by myself unfortunately. I'm trying to build my own font system, so I can draw strings in 2D ...
3
votes
1answer
77 views

Earth-like acceleration seems slow

I wanted to make a kind of "fill the box" style game where you hold down to increase size of a ball that falls when you let go, end goal being covering a percentage of the screen. Anyway, I wanted to ...
1
vote
1answer
38 views

Skeletal animation with multiple animations running at the same time

I've spent a long time attempting to figure out how complex animations are done and wrote quite a few different skeletonish frameworks myself, but they've never really came out good enough to be ...
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
122 views

How to create 2D cameras in swing?

What is the best way to create a camera for a 2D platformer using swing, and I want to create a camera that moves instead of moving the background. This is because I'm going to have objects rotated by ...
1
vote
1answer
356 views

Player position on second player connection

I'm having some trouble trying to run my game for the multiplayer part. I'm creating a 2D game. I have followed this tutorial : http://www.paladinstudios.com/2013/07/10/how-to-create-an-online-...
3
votes
1answer
341 views

Cocos2d Sprite 3D position

When I set a position3D for a Sprite in cocos2dx, it render two times the same sprite, i took a screenshot: I set the position3D because i want to use the Z position the give an effect of distance, ...
1
vote
1answer
202 views

Draw GUI.Button on certain position on a scrollable background

Problem is in a 2D game I have a large background around 2 screens wide. And on there I got 4 buttons placed on top of background all over complete width. Now when I swipe of move my mouse around I ...
2
votes
2answers
33 views

How to access a prefab's boolean property through collision (with the same Prefab but different Instance)?

I am a trying to recreate the first stage of Super Mario Brothers, but I am having a bit of trouble with the collision system between Koopa Shells. I have written two different scripts in hopes to ...
1
vote
1answer
92 views

QT SFML Integration Trouble

I have been having trouble linking sfml to qt creator I have downloaded the pre-compiled libraries and headers for MINGW on the sfml website here : http://www.sfml-dev.org/download/sfml/2.3.2/ This ...
1
vote
1answer
77 views

2.5D overlapping

I started making a game, wich has a 3d engine under it, but achieves a 2d look by using ortographic camera and billbiards. Similar to how Don't starve, Realm of the mad god and (I think) the new ...
1
vote
0answers
33 views

Triggers are not detecting colliders from other game objects in Unity version 5.2.2f1? [closed]

I was working on a basic slots game, and I came across a hiccup with the 2D Physics engine. Currently I'm letting the reels spin for three seconds. Once it has finished spinning, it will go to the ...
1
vote
1answer
52 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
2answers
48 views

Tag for Moving platform

My character is not sticking on the platform when jumping on it but I don't know why. Here is the code: void OnCollisionEnter2D(Collision2D other){ if (other.transform.tag == "MovingPlatform") { ...
1
vote
2answers
84 views

PYGAME: When I release two directional keys together the player keep moving

I did the code this way to avoid the player to stop if a press two directional keys together making the movement more smooth. It works well but when I release two keys or more together the player keep ...
4
votes
1answer
114 views

2D Change Velocity Based on Distance XY While Moving Parabolic Arc

What I'm trying to achieve is that the entity moves in a parabolic curve, and no this has nothing to do with gravity before you ask. I give the entity a target position which it should move to, but ...
2
votes
1answer
66 views

How to correct this issue with a top-down aiming angle in Unity - 2D?

I'm trying to build my first project and I'd like some input for a math correction. The game is a top down 2D shooter, a bit like the iconic "chaos engine" from SNES. The issue is that either the ...
1
vote
1answer
37 views

Improving bouncing logic - Atari breakout clone

I'm creating an Arkanoid clone using Haxe and Openfl. I'm thinking the bouncing algorithms could be improved. But I'm not sure how to handle those. I was hoping you guys could help. private ...
1
vote
2answers
135 views

Positioning game object on a grid

I am learning how to code by programming easy, 2D games. Here I want to try to get only a map, like in strategy games (2D isometric) and put new objects (pictures) on it. In short: I want load a big ...
0
votes
2answers
1k views

How to make a gameobject Scale up from another GameObject script

I'm trying to make a GameObject grow in scale from touching this one, and when a set amount of scale is reached destroy this GameObject ( the one who scales up the other). My problem so far is that ...