Questions tagged [2d-games]

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.

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, but not a z coordinate unlike in 3D games.

This can range from top-down games, like dwarf fortress, to side-scrolling ones, like platformers. It would refer to any games where the character / objects can move freely in two dimensions (e.g. left-right & up-down).

Related tags:

Remember there is also a special StackExchange site: Game Development

1018 questions
-3
votes
1 answer

Looking for Kineticjs Resources

I am looking for Kineticjs Resources ( except the official kineticjs site) - books , blogs , sample projects with source. There are several projects published on the official kineticjs site but i wasn't able to find the source code of any of them.
-3
votes
1 answer

Programming Gravity

I'm programming a game (JAVA) and i would like to add some gravity in. I tried to find a formula or someting like this and there is so different way to do it. I'm looking for a formula who can simulate a realistique gravity and make some rebound…
user2065368
  • 3
  • 1
  • 2
-3
votes
2 answers

Java 2D game, Both of my rectangles are moving when only one should move

I have coded a simple Java game where there are two rectangles on the screen, one of the rectangles should move and the other should stays still, the moving Rectangle moves with keyboard arrow input and can move either up, down, left or right. The…
Rahul Khosla
  • 349
  • 8
  • 21
-3
votes
1 answer

Enemy following player in XNA and stop within 20 pixels

I'm trying to get my enemies to follow the player and stop within 20 pixels, I have tried a number of algorithms including the Vector2.Lerp(); method to try and fix this but it keeps breaking the build. Any help would be greatly appreciated. The…
Bradley
  • 607
  • 2
  • 9
  • 25
-4
votes
1 answer

How to solve pc gaming error is water game?

I'm trying to make a game in Python using PyGame, but I receive this traceback: Traceback (most recent call last): File "C:\Users\usuario\Documents\abscorp\232\232.py", line 150, in hits = pygame.sprite.groupcollide(drop, player,…
Scorp Y
  • 41
  • 1
  • 5
-4
votes
1 answer

Incorporating Levels into iOS Game?

I am a beginner developer and programmer and was wondering how to set up an iOS game so that there are levels which can be unlocked once you beat the previous one. Is it under the 'Game' and 'SpriteKit' settings to get started? Also, how is a…
E. Brez
  • 1
  • 3
-4
votes
1 answer

In Java can you create an unordered collection of objects that have multiple links?

I'm trying to make a game similar to Risk where each territory on the map is an object of a class I made, Territory. In order to create the game map I would like each Territory object to be linked to the other territories that would be adjacent on…
-5
votes
1 answer

Calculating the distance between two random points in a C++ Battleship game

So, my problem is how to calculate the distance between the two random points (x,y) so i can use the abs method (as i was starting to do in the Function bool CheckColpo) and tell the player if his shot was actually in range of the enemy ship's…
Protoman
  • 7
  • 3
-5
votes
1 answer

Asking for advice in further Java game development

I have watched many Java toturials, learned some basics Java. About 1month ago, I'm interested in Java game development, learned some basic stuff (control sprite, draw figures, basic collision and etc.). But something in me telling that I doing…
-7
votes
1 answer

EV function for 2048 video game

What is the best admissible heuristic function for 2048 video game? Please give example of initial state and next state and how to compute the value of the evaluation function?
-7
votes
2 answers

Reading data from text line by line in java

I'm making a game in Java, but can't figure out how to get information from a text file so that I can load the game. I have the saved files set up so that on every line there is the name of a method in my Main program. What I need to do is to look…
hubbardh
  • 41
  • 6
-8
votes
2 answers

Removing an object from a list and the game?

The problem I am having is that I have created a list with an object inside but when the player collides with the Object in question I can't remove it from the list. //This is where the issue is foreach (Objective seagull in seagulls) { if…
Adam
  • 1
  • 1
-10
votes
1 answer

Why can't I pass a int to a float in the same statement?

I am trying to get one off my int statements to take a float statement because in my game, the sprite uses a float to get the coords of where it is at. However the tilemap uses int to get the location of the tile. Why cant you use an int and float…
1 2 3
67
68