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

1116 questions
-2
votes
2 answers

HTML Canvas doesn't update

When I call move() the "y" variable is changed but the box is still rendered in the same position. var c = document.getElementById("can"); //my canvas id is "can" var pen = c.getContext("2d"); var y = 200; setInterval(render(y), 1000/30);…
Bip901
  • 590
  • 6
  • 22
-2
votes
1 answer

How to develop multiplayer game using Bluetooth

Really I am new in game development. I have not any idea how to design the games for Android with Multiplayers. I searched a lot for that but did not get good tutorials. Kindly any expert suggest to me below things: 1) How to develop games in…
Rahul Rawat
  • 999
  • 2
  • 17
  • 40
-2
votes
1 answer

C++ SFML Button not working :/

I am trying to make a c++ sfml game but the button I have created doesn't seem to be working and I have it on good authority that it should. Please help me, the button by the way is, "if (mouseposx > 1366 / 2.0 && mouseposx < 1083)...". Main…
Joseph H
  • 15
  • 3
-2
votes
1 answer

How do you get your sprite to bounce of the screen edges on your screen?

I have a tester program which is used to build the start of a game. I am having issues with the velocity attributes in the if statements which are supposed to create the bounce effect off the sprite of the screen but I can't seem to get the correct…
-2
votes
1 answer

Why the character in my 2D game is not moving?

My program has 3 java files, namely Frame, Dude(which contains the character) and Board(which implements the actionListener). My program is not throwing any error and the images(background and character) are rendering good. But the character is not…
Amitabh
  • 1
  • 1
-2
votes
1 answer

Vectors and Scaler in games

How can we use vector and scalar in games? What benefit from that. Could someone please indicate precisely the difference between a scalar and a vector in games field ? I find no matter how many times I try to understand but I maybe need examples…
stephan
  • 37
  • 8
-2
votes
1 answer

Sound trouble in Java

Hello, i got some trouble with using Sounds in java. I just wanted to implement some fancy 8 bit sounds to my newest retro 2d game.... when i run it in java eclipse everything is fine and the sounds work.... but as soon as i run the finished…
Janik
  • 37
  • 6
-2
votes
1 answer

Defines a title using mouse cursor coordinates. Isometric social games

In the Social Isometric Games book, page 53, there is a description of the method, that defines a title using mouse cursor coordinates. It works well, but it is not clear what principles are used to make it work. Can someone explain this algorithm…
-2
votes
1 answer

game loop and method call

I'm making a 2d game with libgdx. To be be clear in the question My code looks as follows: public Class Game(){ public void Mainloop{ update();//to update some values render();//to render the values on the screen } …
user3521250
  • 115
  • 3
  • 14
-2
votes
1 answer

How to Remove element when reaches screen edge

I am using jquery to make a simple shooting game from the left side of screen to the right. When the bullet is shot it will travel forever to the right. How can i remove it when it reaches a certain coordinate at the end of the page? This makes the…
-2
votes
1 answer

How to remove virtual keypad from games/ apps

I have an galaxy smart s6830 touch Chinese Mobile (240x320) (myriad java platform) (esmertec jbed) and I need to remove keypad from apps . I have put the following into the jar file but, unfortunately, it doesn't work: LGE-MIDlet-Height:…
-2
votes
1 answer

How to make a card deck in XNA

I want to make a game a card game and I was thinking to make the cards as a int so I can make the game rules with if ifelse and else condition's but I don't know how to take an int and put texture and rectangle all together. So I make a research and…
-2
votes
1 answer

Artificial Intelligence in games

I am making a car racing game in THREE.js. I want to ask that how can I put Artificial Intelligence in enemies so that they can search for the player and hit the player. what sort of algorithms are used for AI in games and in what fashion.
Najam-us-Saqib
  • 526
  • 3
  • 10
  • 23
-2
votes
2 answers

Corona: how to capture a screen in corona?

Can anyone suggest how to capture a screen in corona both full screen and particular portion of it?
Arun jalota
  • 252
  • 2
  • 14
-3
votes
1 answer

Debug Assertion Failed in Visual Studio 2019 "string subscript out of range" C++

I'm making a game in C++ which I hope can successfully create a universe of its own procedurally, however, I've encountered an assertion error with the galaxy generation. I have a class for Stars with the following parameters for the…