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

-1
votes
0answers
4 views

Android: Creating a simple 2D game (similar to pokemon) [on hold]

I am hoping to make a game where a user can move up down left and right, similar to the physics of pokemon. Here is what I was planning on doing so far: •Have methods for playerUp(), playerRight(), ...
0
votes
0answers
52 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 ...
-2
votes
0answers
25 views

how to write a player control script in C# or C++ in Unity? [on hold]

i am new to this kind of programming ,however i do have C# and mobile app development background but i have no idea where to start .. I want ot make a 2d player controll in C# or C++ or even java ...
0
votes
1answer
36 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
12 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
0answers
36 views

Free 2d Game Art Program Needed [on hold]

So, basically, I am making a 2d game, and I need a free program to make the sprites and textures, and cannot find a good program to do it. I can't use Gimp, as the interface is crappy in my opinion, ...
0
votes
1answer
39 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
0answers
52 views

I'm looking for an outline of a simple 2D game architecture, as my projects always get overcomplicated [closed]

So quick backstory: I'm currently getting into game development with C++ and SFML for graphics. I have a pretty solid grasp of C++ so my question is not really language related. What I've been ...
0
votes
1answer
88 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
104 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
37 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 ...
1
vote
1answer
51 views

How to create a ladder script in Unity [closed]

I tried to create a climb script and found some similar code. I would like to climb with my player on a ladder. I came up with the following: bool canClimb = false; float speed = 1; GameObject ...
1
vote
1answer
106 views

Unity - Basic AI Enemy Follows Player - Prevent Flocking Of Enemies Together

I'm in the process of implementing a 2D top-down shooter game. I have a basic AI script that allows enemies to follow the player around. Currently it works fine for one enemy, but as soon as there are ...
1
vote
1answer
88 views

How to add a UI Text for keeping Score in Unity 5

My Problem is simple I want to show scores on my game. The examples on internet are good but in Unity 5 there are no GUI elements but instead these are now UI elements. I was following this example: ...
-1
votes
1answer
67 views

How to attach 2D object to a rope?

I was wondering, how I can attach a game object (player) to another object (a rope) when both came in contact in Unity. I think it should be done with a OnTriggerEnter2D, but doesn't know how I should ...
-4
votes
0answers
86 views

What is the best game engine for indie game development? [closed]

I always wanted to create a game, nowadays it seems to be possible with no budget/a small budget and all by yourself. With the news of Epic Games releasing Unreal 4 for free, Unity releasing Unity 5 ...
1
vote
3answers
97 views

Calculate intersect point / aim point

I'm working on a simple game, and I need to calculate the position to aim. Since my math days are a bit behind me, I put together a simple example to illustrate: So given that I know the position ...
0
votes
0answers
52 views

How to design this kind of images [closed]

I am new here and I hope I do things right. I am a C++ programmer who wants to learn new things, and I am now trying to learn how to illustrate in 2D for games. I don't know if this question belongs ...
0
votes
2answers
36 views

onCollisionEnter2D not behaving as expected

I have two game objects. They both have a Rigid Body 2D and a Box Collider 2D components. One of them also has script component. Below is the full script using UnityEngine; using System.Collections; ...
1
vote
1answer
93 views

Does game engines (like Unreal, Unity, Crafty) add value compared to pure js frameworks (react, ember..) for my isometric tile-based games [closed]

I'd like to create a huge tile-based board (say 100K tile). The game does not have any advanced graphics (you don't see the players or landscapes), the main difficulty is that it has 100K tiles to ...
-1
votes
0answers
20 views

What size sprites should I use for developing a 2D game for iPad Air and iPad mini? [duplicate]

I am developing a side-scrolling platformer that will run on an iPad Air and iPad mini. I am not sure how big to make my sprites/textures to ensure everything looks good on the retina screens. 1) How ...
0
votes
0answers
28 views

Collision Detection acting weird

I started learning programming in java. and I've decided to make a simple game but, got a problem in collision detection. The problem here is that the collision detection is sometimes not working. ...
0
votes
0answers
23 views

Efficient point-in test on static Polygons

I have some convex 2D polygons that are static and I would like to create an efficient point in test for them. I'm pretty new to this area of study so I just want to make sure I haven't made an error ...
0
votes
1answer
41 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 : ...
1
vote
1answer
46 views

Position and rotate a 2D point array into a 3D world

I have a set of 2D points (defining a flat 2D 'connect the dots' shape). I want to calculate the 3D positions for these 2D points at a specific 3D position and rotation. For example, say I have five ...
1
vote
0answers
23 views

PRNG/Encripting Algorithum that returns the same number if given the same input?

I've been trying to find an algorithm that will take in an x value, a y value, and a seed value and then spit out a number between 0 and 255 (or an int that I can cut up into bytes). I want to be able ...
0
votes
1answer
57 views

Math for 2d movement with max speed?

I need some help with math in a 2d environment. I have a joystick that controls the acceleration vetor for the player figure. Its suppose to look like the ground is slippery which makes the figure ...
0
votes
1answer
52 views

My Raycast will not detect collisions in my Unity 2D project. What am I doing wrong?

I appreciate any help you can offer me. I created a script for a character controller that casts two rays below the player's gameobject. The rays extend infinitely and should collide with another ...
0
votes
0answers
24 views

Are there conventional 2D isometric axis directions?

I'm making a 2D isometric game, but now that I gotta decide which direction X and Y increase, I think it would be best to consider the common practice. In which directions do each of the axes usually ...
0
votes
0answers
24 views

How to use Android Sensor, only in x axis

I have seen some tutorials but they are very complicated and they are about the three axes (x,y,z). So I want a code that moves an object or more (for example) to the right or the left when the ...
2
votes
2answers
67 views

How to select random points within grid meeting min/max distance requirements from each other?

I have a 2D grid map that is relatively large. I'd like to pick some semi-random points all over it (say N points). The rule I want to ensure here, though, is that any selected points are at least M ...
0
votes
0answers
15 views

2D smooth Rotation Unexpected

I am trying to get a smooth 2D rotation and this semi works but only in (-x, +y) I have tried using a lerp but I still get the same result. So I believe, it has something to do with the rot_z value ...
1
vote
1answer
76 views

How To calculate camera boundaries

Is it possible to calculate the exact camera bounds? By this I mean the white lines that represent the camera area e.g the lines in the picture: I'm using Camera.main.screenToWolrdCoordinates to ...
1
vote
1answer
53 views

How do I make my main character move towards an object? LibGDX/Java

What I want to happen is for my player to bounce from spring to another. For example take the illustration below: Here's my code (what I've tried to do so far). This gets called in an ...
0
votes
2answers
136 views

Space invader barrier implementation algorithm

I've been struggling with implementing the space invader bullet to barriers. I wanted right now to blast a circle around, when the bullet hits the barrier and modifies the circle. As shown in the ...
0
votes
0answers
18 views

How to get camera to follow player, but stop when reaching end of screen? [duplicate]

I'm making a 2D game in Unity and I'm having issues with the camera. I need the camera to stay within the boundaries of the level (the background sprite), but then follow the player around the level. ...
0
votes
3answers
166 views

Collision between AABB and Circle

I'm programming collision systems for a 2D game engine. The idea is that different systems can interact with each other. So one of the cases would be check collisions between axis aligned bounding box ...
1
vote
1answer
103 views

Creating a 2d look sprite sheet and textures out of 3d models [duplicate]

I'm trying to make a 2d game (rpg top down), and I've got no 2d artists help me out making 2d characters and textures, but I have one who can make 3d stuff (using Blender and 3d Max), I was wondering ...
1
vote
1answer
38 views

LibGDX/Java - Trying to find the vector from one object to another

I want to add springs in my game that work like the ones in sonic - i.e. if you can't get over an obstacle you have to hit a spring which sends the main character flying towards another spring that ...
0
votes
0answers
33 views

Per pixel collision using marmalade bug

I'm trying to implement space invader, collision with barrier in which you blast some pixels, for the time I'm drawing a circle, right now I get correct collision but only on the bottom of the ...
0
votes
3answers
95 views

What would be a good way to implement a large 2d map? [duplicate]

I'm thinking of a way to implement a large 2d map which can be easy to handle a certain area of the map to update. I've seen many 2d map using double array like int[][] gameMap = { {#,#,#,#,#}, ...
1
vote
1answer
90 views

Dot based light mask with shader on sprites

So I have a scene, completely based on 2D sprites. I want to render "light sources" into a seperate frame buffer (so mostly dots around, for example, the centre of a flame) and then render that frame ...
0
votes
1answer
61 views

How do I make a time lapse in my code so it updates slower?

I have made some collision if statements, but they didn't work. birdbox3.X += 5; birdbox3.Y -= 5; if (birdbox3.Intersects(Banner1)) { birdbox3.Y ...
0
votes
1answer
31 views

Rotation and timer at the same time

I have a project where I flip a card after 5 seconds, then I want to start a countdown timer of x seconds. After x seconds the card flips again. I found a good example for the timer here, but that ...
0
votes
2answers
117 views

How to move dashes towards target?

Would you know how to create a dash line that moves towards the direction of the target, and if it collides with a wall, goes to the opposite angle? I have seen atan2 but I am not sure what it does, ...
3
votes
2answers
133 views

2D Physics: What happens with torque when center of mass changes?

Novice programmer and explorer of simple 2D physics, here. I have a simple 2D object made up of two rigid bodies connected at a fixed joint. The two rigid objects can rotate freely about that fixed ...
0
votes
0answers
20 views

possible way to bring canvas 2d animation in canvas webgl context

when added 2d animation canvas in 3d webgl canvas as texture, 2d animation and 3d animation both stopped working. Any reference for this.
2
votes
1answer
66 views

Replacing a sprite for another on runtime (Unity3D)

I need to replace the sprite of a face down card for another sprite (of a face up card). This is the C# script attached to the face down card: using UnityEngine; using System.Collections; public ...
0
votes
1answer
64 views

How can i calculate that normal lays in same part of plane with point?

I.e. n0 for A and n1 for B. Plane divided by plane CD.
0
votes
0answers
45 views

Calculating Bounding Rect

I'm trying to clone space invader of atari and I have problem with bounding rect calculations.. the rect is not correctly bounded.. maybe I have problem with the transformations void ...