2D games are drawn in a two-dimensional space using two-dimensional objects. To represent its position, each game object will have an `x` and a `y` coordinate.

learn more… | top users | synonyms

0
votes
1answer
22 views

Would flipping a sprite depending on direction be too inhibitive for modders?

For a game I'm making (similar to games like Terraria, Starbound etc.) I want to ensure that the framework is as modder friendly as possible. This leads me to wonder if it would be too inhibitive to ...
0
votes
0answers
16 views

2D Physics library for C# [on hold]

I'm currently in a C# project where I need to simulate some 2D high school physics such as inclined plane with and without friction, projectile motion, pendulum, collisions, etc. The user should be ...
1
vote
1answer
36 views

Proper way to divide a 2D climbing animation in Unity3D

I've got a 2D character that's going to climb up a 2D tile to his left or right and I've got a climbing animation consisting of three parts essentially: Animation for the character going from ...
0
votes
2answers
52 views

A 2D Camera Follow Script That Does Not Rotate?

I am attempting to make a 2D racing game. So far I have a player car (sprite) and a main camera. I would like to know how to make the main camera follow the player car while still showing signs of ...
0
votes
0answers
41 views

Reading an integer from an object input stream in JavaFX [on hold]

I am trying to create a simple networked game, right now the object is to get squares moving around and able to see the other square move in real-time over a TCP network in JavaFX. My main issue seems ...
2
votes
1answer
39 views

Multiple enemy collidiers

I currently have an enemy that upon collision kills the player with a kill script, I want to add another collider that acts as the visibility radius for said enemy. However, when adding another ...
0
votes
0answers
16 views

Using coordinates of a Face Cam in a 2D Game over the in game player object [closed]

I am sorry to post this like a n00b, but i have no other idea who to ask. I am simply trying to add my face (in a stream) on top of a character in a video game. IE my head on his head. The game is ...
-2
votes
0answers
12 views

how to make something move when you tap [closed]

I honestly have no idea how to do this i have the background and everything figured out but i need to know how to make a item or block move and if theres a possible way to speed up how fast it moves.
2
votes
2answers
26 views

Unity2D Sprite flips camera when moving left and right

I am using the Unity Engine and coding in C#. I have a sprite as a parent with a main camera as a child so that the main camera follows the sprite. However, when pressing 'A' and 'D' to move the ...
1
vote
2answers
61 views

How to detect collision of a wall with grid movement?

I have this little game, where my player is moving around a simple level, using a grid based movement script (See code below). My problem is that I have tried to implement a 2D raycast, which has to ...
-3
votes
0answers
35 views

How to create a 2D Platformer game using Direct3D? [closed]

I was able to scroll a repeated background and I need to know how to create the foreground i.e the ground where the player walks and jumps. Thanks in advance.
0
votes
1answer
61 views

Sharing Tiled Maps [closed]

Where can share my existing Tiled maps, as well as download and use other people's existing maps?
0
votes
0answers
33 views

2D animation customization based on 3D model

We're looking for a good pipeline to create animated assets for our 2D game. Characters are seen from isometric viewpoint, and there are several characters with the exact same animations (idle x 4 ...
2
votes
3answers
180 views

In a 2D top-down game, how can I create projectiles that have a height?

A 2D game called Deer Hunter has projectiles like this: Are the projectiles 2D or 3D models? How could I implement something similar?
0
votes
0answers
29 views

In Java swing, while handling a 2D top down game, how should I handle scaling for quality transformations (mainly screen rotation)

For my top down game, I plan to have screen rotation where entities don't rotate, but everything else does. I am using a raster array to store my image so I don't have to render things stacked on each ...
7
votes
2answers
285 views

In Unity, why is adding a Vector2 and a Vector3 ambiguous but assigning isn't?

Given the following two vectors: Vector3 v3 = Vector3.one; Vector2 v2 = Vector2.one; This line is ambiguous: v3 += v2; // Unity reports dimension ambiguity whilst this assignment isn't: v3 = ...
2
votes
1answer
85 views

Is creating a blend state like this possible?

I'm wanting to create a custom blend state that is similar to XNA's BlendState.Additive, but slightly different. I'm wanting something like the 'custom' output below: Is something like this ...
0
votes
2answers
62 views

How to keep a shape inside a rectangle

So i'm making a game which is based on randomly generated rooms and i need a way to keep the player inside them and make the player glide when he collides with the room's bounds. I currently have a ...
0
votes
1answer
44 views

Unity 2D - scale sprite according to screen width

So I have a square sprite (width == height) and I want to scale it so that both width and height are exactly one fifth of the width screen. To find the desired pixel width I do: float ...
-1
votes
1answer
34 views

How do i load, render and trasnform 2D images using Direct3D 11 API? [closed]

In my small game project using DirectX 11 API, I created a Direct3D device, and can draw 3D meshes, using web tutorials and a book. But I cannot figure out how to load, transform (rotate, scale, ...
2
votes
1answer
724 views

What is AABBvsAABB Collision detection?

Currently studying Game Engineering at university and my lecturer has asked us to implement a collision manager. He asks us to use AABBvsAABB to build it, so then we can add the physics. My question ...
1
vote
1answer
18 views

Monogame - stopping a custom shader (drawable game component) when inside another drawable game component [closed]

I have run into a bit of trouble when using a custom shader (gaussian effect) within another drawable game component, as I cant figure out how to break out of the draw method, so the effect is applied ...
3
votes
1answer
75 views

How do I render an object's position trail of a constant length?

I want to show a trail of the last points that the object has been in, but I want that trail to always be a certain length, regardless of the object's speed. How can I do that? At the moment, I ...
1
vote
0answers
60 views

Create a 2D orbit trajectory like in angry birds space and a circular orbit

I am working on a 2D game, and I am working on adding some space physics : I need to find a way to create a circular orbit and an orbit like angry birds space ( the spiral trajectory ) . So there is 2 ...
1
vote
1answer
79 views

Unity 2D: Sprites/Diffuse is making my character weird, like an antialias

i'm trying to put light and shadows on my 2D character but when i set the material on it to Sprites/Diffuse, it's kinda putting a strange smooth on my pixels. Without diffuse: With diffuse: And ...
2
votes
1answer
31 views

Java Libgdx: How do you add cells to a TiledMap?

I'm trying to make a Side-Scrolling game that will allow you to place/remove tiles. I'm using the TileMap Editor to render the custom Tilemap but is there any way to add tiles? I have it where I can ...
0
votes
1answer
47 views

Any way to visualize how will game objects look on different screens?

After completing my game and sending it to a bunch of friends with different devices, they complained about how some game buttons were too small. (I have developped a touchscreen game but after ...
0
votes
1answer
49 views

Unity 2D: Change one instanced prefab then make all the others on the scene like it

I want to get this thing working: I have a prefab with coins, some obstacles and enemies, and i want it to be instantiated each time the player got to the right or left on the stage, to make the stage ...
0
votes
2answers
132 views

Is it possible to use one if statement for each level scene?

I'm working on a platform game where you as a player have to collect logs, to keep on all the fires in the level. Each campfire has a timer, which ensures that every x number of seconds the animation ...
0
votes
1answer
36 views

How to modify the Unity sprite renderer (or create a custom one) that can display the sprites on the X-Z plane?

Prefix: I am NOT trying to rotate a sprite 90 degrees by it's transform, this changes what is up/down and forward/backwards for the object. I need the sprite displayed on the X-Z plane in comparison ...
1
vote
0answers
27 views

2D Polygon Collision push direction with large polygons

I have a collision detection/resolution implementation that uses the Separating Axis Theorem. Detection and such works perfectly fine, as well as resolution for most objects/shapes in my game. ...
0
votes
0answers
52 views

Creating a 2D game on the X-Z plane instead of the X-Y plane in Unity, any adverse effects or challenges with this?

After coming to the realization that some things I wish to do in a 2D RTS are easier to do on the X-Z plane instead of the default X-Y plane, I'm considering moving my game over to the other plane. ...
1
vote
2answers
65 views

How can I detect a perfect passageway for collision detection?

The problem is when I move diagonal it moves fractions of units and therefore my coordinates might be a fraction of a unit say (40,400) might be actually (40.12,400.40) but another problem is my pink ...
0
votes
1answer
56 views

2d Collision detection response equation doesn't work

I am currently doing some game engine programming as a hobby. I have been working on getting the collision detection working for a while now, and I'm at my wits end with it. I started with this ...
0
votes
1answer
31 views

Why is each column being shifted down the X value of the column in my 2D Data Structure?

I have a two 2-dimensional arrays. One of which stores characters from a text file, and the other stores pointers to instances of Blocks. For some reason, in either of the arrays (I'm not sure which), ...
-2
votes
0answers
16 views

Search an artist with a comic style like Angry Birds [duplicate]

Hey im searching an artist for my new mobile game. The problem is i want this comic style like angry birds but i cant find anything like that on devianart and other sites. Most of the arts are in ...
0
votes
1answer
71 views

How to bounce the player away after attack by enemies?

I creating a 2d platform game. I would like to bounce the player away after hit by the enemy, so the user get another feedback beside the sound effect. How can I achieve my wish? Use the following ...
0
votes
1answer
47 views

Unity C# 2D Platformer Main Camera should stop on sides of level

I've been working on a 2D Platformer and i succeeded in setting up a script for my Main Camera to follow my Player gameobject using transform positions. Now when my character is near the sides (or ...
0
votes
0answers
18 views

C# Pathfinding in 2d array (procedural generation) [duplicate]

I have the following random example data in a 2d array 030 300 030 003 The 3 represents a room, the 0 represents its an empty block and 1 represents a corridor. Now i want for example the following ...
-2
votes
2answers
71 views

In Unity, how do I make the camera follow a character?

When my character moves, I want the camera to follow them, such that the character always stays in the middle of the view. How do I do that in Unity? Here's my code right now: using UnityEngine; ...
1
vote
1answer
55 views

How to change an int value in the Unity editor

The player of my game can collect logs and can use them for hold on the fires. Each fire has its own status. So one is off and the other one is for 50% on. I created a public int inside my script ...
1
vote
1answer
53 views

Move 2d tank with independently controlled treads

I have made a tank object that knows its position, speed, rotation, and a double value ranging from 1.0 to -1.0 for each tread. I want it to move base on those values. For example, if the value for ...
0
votes
1answer
45 views

Unity problems with OnTriggerStay and Input.GetKeyDown

Background information Some weeks ago, I start by creating my own platform game. You control a character, that can collect logs and should hold all the campfires on in the game. When the user has ...
0
votes
1answer
97 views

How to detect the edge of a platform?

I have create a enemy AI script. These enemies are animals in my game. What I want is that the enemy can detect the edges of a platform. using UnityEngine; using System.Collections; public class ...
0
votes
1answer
119 views

Rotate Object Towards Direction in 2D

For my RTS game's physics engine, I'm trying to find out a clever way to make a unit face the direction it's moving in. Given a Vector2d direction of movement (its normalized velocity), how can I ...
0
votes
0answers
20 views

PlatformEffector2D “Collision Pop” Avoidance?

I have noticed that when "One Way" is checked, and you have your character jump up through the platform, the character pops up to the top as a way to resolve the collision of the player and the top ...
0
votes
1answer
59 views

Sorting sprite's layers in isometric view

I'm making a strategy game with isometric view and I'm having some problems with deciding which sprite should be drawn first (I'm using SFML 2.2 as graphic library). I'm using std::sort to sort ...
0
votes
1answer
114 views

Using collectable items to change a gameobject Unity

I’ve been working on a 2D platform side scroller. I’m rather new to Unity and C#. Basically what I’ve achieved so far is a character which can collect Logs throughout the game and those logs are ...
3
votes
2answers
123 views

Can I use the HD Graphics 3000's quad list primitive type via D3D?

I was studying some technical documentation on the Intel HD Graphics 3000 GPU, which I'm using as a lower-end reference for my 2D game engine. I noticed the hardware supports a nice "Quad List" ...
1
vote
1answer
48 views

(Java) Trying to animate an arraylist of coins with a (working) animation class

I have a coin class which takes in an integer numOfCoinsand an enum LayoutType, which can be linear or curved. A linear layout displays the coins in a straight line one after the other - we'll work ...