Tagged Questions
1
vote
3answers
79 views
2D Side Scroller Game Without A TileMap
I want to create a 2D side scrolling game in a similar style as the game "Castle Crashers". (Go to: http://store.steampowered.com/app/204360/ to see some pics of the game).
I have experience ...
1
vote
1answer
82 views
Is game maker studio actually flexible enough to cater to an avid programmer? [closed]
After I got burned by RPGMaker which seemed fine what with the semi-open Ruby-like engine until you encountered some nasty surprises like the draconian resolution limitations etc., I've become more ...
2
votes
1answer
61 views
Where to implement textures for tiles?
So I just learned the basics of Java and was ready to try to create a protoype game in the style of Civ. So a tile&turn based game.
I created an enum for the different tiles:
public enum ...
0
votes
1answer
102 views
Smoothing Pathfinding on Tile-Based Terrain but Free-Roaming Player
I'm sorry if this is a long post, but I feel as though the details should help clarify gray areas. I'll try and provide a detailed layout of what I'm trying to achieve, what I have so far, and where ...
1
vote
1answer
72 views
Tiles touching all of same color check
I'm currently having a problem that has stopped my productivity for quite a while. I need to check if all tiles of a color is touching each other for each color like this:
I have all my code for ...
1
vote
1answer
65 views
Electronic circuit simulator four-way flood-filling issues
I've made an electronic circuit board simulator which has simply 3 types of tiles: wires, power sources, and inverters. Wires connect to anything they touch, other than the sides of inverters; ...
4
votes
2answers
218 views
How would I go about updating my electronic circuit simulator's 'electricity'?
I have made an application which allows the user to place down wires, power sources, and inverters on a virtual circuit board. All connections between tiles are automatic, as shown here:
As you ...
0
votes
0answers
52 views
SurfaceView.Callback.surfaceDestroyed is called too early in Android
I'm making a simple animation application. Everything works as planned, except one little detail:
About 50% of the time, exiting the application (Home or Lock button), makes the Logic throw a ...
0
votes
1answer
47 views
TiledMap resizing and aspect ratio with LibGDX
I'm making a game and I don't know how to resize my TiledMap when the window is bigger but keeping its squared shape.
Here is a screen:
When I change window size, here's what happens:
I want ...
0
votes
2answers
144 views
Wall jumping collision detection anomaly
I'm creating a game where the player ascends a tower by wall jumping his way to the top. When the player has collided with the right wall they can only jump left and vice versa. Here is my current ...
1
vote
2answers
77 views
libgdx: How do you remove a cell from TiledMap?
I am making a Terraria-style sidescrolling game with an open world. I am using a TiledMap to render all of the tiles. If I want to remove a tile, like if it is broken, how would I stop it from being ...
0
votes
0answers
144 views
Adding 2d hud/gui to a 3d game engine which has no 2d features
I have been following the 3d game engine tutorial series made by theBennyBox for a few months now, and have finally decided to create a game with it. My problem is that it is a 3d only engine which ...
0
votes
2answers
85 views
Smooth input handling in Java [closed]
I am writing a Java game.
My problem is to get a really smooth input. If I hit the key W the character has to go forwards, but if I hit A and release the W key, the character doesn't go left ways :( ...
0
votes
0answers
47 views
Rendering bug in java
I'm using a simple rendering method in java to render tiles. Everything looks fine, but I notice that some rows grow 1 pixel when I move, and dhen shrink back, but I have no idea why.
Infos:
I'm ...
0
votes
2answers
150 views
How do I add an image inside a rectangle or a circle in JavaFX?
Suppose we have a rectangle called r
Rectangle r = new Rectangle(40, 20);
and an image called image
Image image = new Image("...src for image");
How do I fit the image inside the rectangle? ...
1
vote
1answer
243 views
Java : 2D Sidescroller Terrain [closed]
Okay so After all this Edits here is the main question. How I can generate Terrain with a 2d Simplex Noise Algorithm, I am deletng old info so the post its more readble. I´ve been doing some tests and ...
0
votes
1answer
225 views
Java 2D World: Convert from mouse screen co-ords to screen co-ordinates?
I have a 2D world background made up of a Grid of graphics, which I display on screen with a viewport (800x600) and it all works.
My question is I have the following code to
convert the mouse ...
0
votes
0answers
55 views
how to do picking in 2d lwjgl
I searched the whole internet, but I couldn't find something useful.
How to do picking (like ray picking) in lwjgl in orthographic mode (2d)?
I think this is less confusing than picking in 3d, but I ...
0
votes
1answer
105 views
Java Scrolling 2d Block game - Optimise my code?
I have a 2d game where you look down from above and can scroll up, down, left and right using a viewport and a much bigger map.
I have been having trouble drawing a rectangle around the block under ...
0
votes
0answers
108 views
Polygon Collision Response
I'm working on a game engine that has a built in custom physics engine (I know it's a waste of time, but I have years to make this, so why not make it good?).
Currently, with any number of polygons, ...
2
votes
3answers
158 views
How do I implement Breakout's “multiball” powerup?
I'm just starting out and making a breakout clone as my first game. I'm implementing all kinds of powerups, but I'm stuck on multiball. The powerup adds additional bouncing balls to the game.
So far, ...
2
votes
2answers
205 views
Expandable 2d environment by spawning and controlling individual tiles
what is the best way to implement an environment that is "expandable" in every direction so that when the player moves in any direction a new row or column of tiles that can be manipulated ...
0
votes
0answers
73 views
LWJGL Rotating is moving
I am trying to rotate my QUAD even just a little bit.
I have read pages like http://www.java-gaming.org/topics/lwjgl-tutorial-series-moving-and-rotating-triangle/30679/view.html
In my render() ...
1
vote
2answers
250 views
Should game objects draw themselves? [duplicate]
Assuming you have classes like Player, Enemy, Map and Tile.
The first approach to structuring rendering code would be to give each a render() method and let it draw itself:
void render(){
...
0
votes
1answer
113 views
Grid collision - finding the location of an entity in each box
I am trying to implement grid-based collision in a 2d game with moving circles. The canvas is 400x400 pixels. Below you can see the code for my Grid class. What I want it to do is check inside which ...
-2
votes
2answers
88 views
How to calculate a bounding rectangle of a polygon?
Polygon poly = new Polygon();
poly.getPoints().setAll(5d, 15d, 15d, 25d, 5d, 30d);
How do I calculate the Polygon's height and width? There is no poly.getWidth() or poly.getHeight() method in ...
-2
votes
1answer
59 views
What do the 6 points stand for in Polygon().getPoints().setAll?
I have the following code to create a polygon:
Polygon poly = new Polygon();
poly.getPoints().setAll(14d, 17d, 26d, 17d, 20d, 27d); // What do these mean?
What do these 6 points stand for?
0
votes
3answers
77 views
Getting entity type object [closed]
I have a custom entity class and what it does is create a SQUARE object.
public class Entity {
Rectangle rect;
public Entity() {
this.rect = new Rectangle(20,20);
rect.relocate(200,200);
...
2
votes
0answers
52 views
How should I model rotation caused by bounce friction? [duplicate]
In my Java2D simulation, I have a disc which, when it bounces off the boundary of a 2D region, begins to rotate, as if it had gotten some spin from the wall.
I'm having trouble relating the ...
-1
votes
1answer
139 views
Grid based Collision Detection between circles [duplicate]
I am working on a 2d arcade game where I have 5 types of circles with different sizes: The ship, the missiles, and 3 types of monsters.
This is what it looks like:
Currently I'm using brute force ...
0
votes
0answers
47 views
Space invaders 2d array to represent scene [duplicate]
For code optimization purposes, I want to create a 2d array that contains 40 equal squares (10x10px). Each square represents 1\40 of the displayed window (400x400px).
I populate the 2d array with the ...
11
votes
2answers
852 views
How do I create a World Healing Wave effect?
I want to change my dark and depressing background to a happy grassy background, in real-time, such that the happy background is shown in a radius around a game character.
A forcefield of happiness, ...
0
votes
1answer
110 views
Game states vs calling new activities
I am trying to decide what the best method is to call "level complete-screen" and "game over-screen" in my real-time android 2d game. Currently I am using game-states and only updating my game when ...
0
votes
2answers
273 views
translating canvas for rotating sprites that shoot
I am trying to align bullets to my different sprites guns (top down 2D for android). Right now Im using this method to draw my bullets:
public void draw(Canvas canvas){
update();
...
0
votes
1answer
115 views
Load all bitmaps at once or only when needed?
I am starting to get a pretty hefty amount of bitmaps in my 2d game for android. I load them all in 3 colors to save some memory but the thing is, I load all of them when "Start game" is pressed, even ...
1
vote
1answer
133 views
Is the Key Bindings delay unavoidable in Java when pressing different directional keys quickly?
I've read just about every tutorial I can on why to use Key Bindings instead of implementing the KeyListener interface, including all the examples that show using a field to track the key event ...
0
votes
1answer
113 views
Java 2d game cross-platform compatability
I need to make a few small, simple 2d educational games primarily to help kids improve their reading. Drag & drop/matching words with pictures, spelling out words as well as maybe a scrolling ...
0
votes
0answers
201 views
2D Sidescroller camera
I'm using OpenGL. For my tiles, I'm using a display list and I'm just using immediate more for my player (for now). When I move the player, I want to center him in the center of the window, but allow ...
0
votes
1answer
212 views
Creating a knockback effect
I'm fairly new to creating a 2D game in java and I'd love some help. I'm trying to create a sort of knock back effect the enemies have on you. So when you are touched by a enemy you will:
lose life
...
0
votes
1answer
174 views
Circle-Rectangle collision velocity adjustment
I created my circle vs. rectangle method based on this algorithm:
http://stackoverflow.com/questions/401847/circle-rectangle-collision-detection-intersection
Currently, I have a dynamic ball with ...
0
votes
1answer
284 views
Circle vs. Rect Collision accuracy problem
The blue ball is dynamic and is supposed to bounce off the walls, as well as the rectangle. Currently, the green rectangle is adding an invisible line to the scene, which doesn't let my ball go where ...
0
votes
1answer
141 views
Collision method for multiple circles
This is a bouncing ball program. There is 1 dynamic circle and 3 static ones. The static ones are obstacles for the dynamic circle, and the dynamic circle is supposed to bounce off of the static ...
0
votes
2answers
405 views
How to make different layers in a 2d game map
My question is this: How do I make a gamemap from the drawings on my spritesheet?
The tutorial I have followed for making a java 2D game uses this technique to make a gamemap: in photoshop I create ...
2
votes
1answer
225 views
Circle to Circle collision - bad accuracy
Circle1 (blue) is moving and its X and Y bounds are the screen (meaning it bounces off the walls).
Circle2 (black) is stationary. Circle1(blue) is supposed to bounce off of Circle2 without ...
0
votes
1answer
277 views
Bounce off of objects
How do I make my ball bounce off objects on the screen? I'm having trouble detecting the collision, as well as calculating the response.
The picture below is a good example of how the program should ...
0
votes
1answer
232 views
Feasability of mobile 2D multiplayer RPG game with interactive bitmap background
I'm looking to develop a 2D multiplayer RPG game for Android, with a bird's eye view similar to that of zelda/pokemon. The game is very simple in all ways since my intent is for thousands of players ...
1
vote
1answer
299 views
What's the most memory efficient way to load a tiled map?
Currently I am working on a simple 2D platformer and I want to load a tiled map.
What I've started working on is loading the tiles using a text file. My first question is simple: is a text file the ...
0
votes
1answer
349 views
How can I get animated bone's transformation in LibGDX?
I am trying to get transformation from a bone, but i can't, I exported just a animated armature with just a bone from blender, then I converted to .g3dj, so I just need the bone transformations so ...
-1
votes
1answer
93 views
Render white background with Graphics in Canvas
I am developing a game that I would like the background to be white, and it just sticks to being black. Here is my render method:
private BufferedImage image = new BufferedImage(WIDTH, HEIGHT, ...
0
votes
1answer
264 views
Trouble with a modified parallax scrolling concept
I have a set of layers (each of them being a list of items) moving with different speeds as I mentioned here: http://stackoverflow.com/a/18962019/270197. Layers back in the scene move with slower ...