0
votes
0answers
40 views

2D Game with a big block-based Map - Create for each block one block-object? [duplicate]

I'm working on a 2D game in Java which will be similar to Terraria (Mincecraft 2D). I want to generae the world-map random. The world (the ground) consists of 32x32 blocks. How I should handle all ...
0
votes
0answers
37 views

Map rendering Libgdx Java [closed]

Ok, so I am trying to create a 2D non-movable random tiled map. This is what I have so far: private void generateTile(){ System.out.print("tiletry1"); while(loadedTiles != 8100){ ...
0
votes
1answer
39 views

TileEntitySpecialRenderer only renders from certain angle

I'm developing a Minecraft mod with Forge. I've added a tileentity and a custom renderer for it. The problem is: The block is only visible from sertain angles. I've compaed my code to other peoples ...
0
votes
1answer
31 views

LibGDX ShapeRenderer rotated

I'm having a weird problem with the LibGDX ShapeRenderer where it draws everything rotated. Here are some images to show you what i mean: This is what it looks like in Tiled(Map Editor): This is ...
0
votes
1answer
59 views

2D Lighting Glitch

I've been working on a game in Java, and recently I decided to try out my game on a netbook just to see how it would run. While I do get a constant and decent FPS, it appears that my lighting ...
0
votes
2answers
252 views

terrain not properly rendering

I'm extending the terrain quad with resources from various tutorials and have the following code: public class WorldTerrain extends TerrainQuad { public static final String NAME = "terrain"; ...
0
votes
1answer
42 views

When and how to apply affine translations to vertices of a mesh with LWJGL

So, I have a rigid body class, containing a list of vertices and a 4x4 transformation matrix. At the moment, I'm applying the transformation matrix to each vertex individually, and am unable to revert ...
0
votes
2answers
59 views

LibGDX Images not loading

Now my Image isn't loading to the screen. I tried to be decorative with the code but since it isn't working I made it just like the video I'm whatching. I don't get any exceptions, but the image ...
0
votes
0answers
13 views

Using Graphics from my Frame's paint() gives cutting effect every call to repaint()

Every frame the run() method of my thread calls the repaint() of the frame subclass, in this frame subclass I override the paint(Graphics) and since I want to have different screens from my game I ...
0
votes
0answers
31 views

Java Graphics Rendering Bug

So I've been playing around with moving objects using KeyListeners and active rendering via while(true) loop. CANVAS.createBufferStrategy(3); BufferStrategy buffer = CANVAS.getBufferStrategy(); ...
2
votes
1answer
72 views

Failing Screen Resize Method

So I want my game to draw to a specific "optimal" size and then be stretched to fit screens that are a different size. I'm using LibGDX and figured that I could just draw everything to a FrameBuffer ...
7
votes
2answers
400 views

Java single Array best choice for accessing pixels for manipulation?

I am just watching this tutorial https://www.youtube.com/watch?v=HwUnMy_pR6A and the guy (who seems to be pretty competent) is using a single array to store and access the pixels of his to-be-rendered ...
0
votes
2answers
152 views

Java: Camera Rendering

Which is the best way to detect whenever an object or tile is inside the Camera Range so I can draw it? With "best" I mean more efficient, and quicker. Thanks
0
votes
0answers
53 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
1answer
111 views

How do I double-buffer renders to a JPanel?

I'm trying to make a little breakout game with Java and Swing. The only issue so far is that drawing on the JPanel causes lots of flickering! The relevant code: JFrame frame = new ...
1
vote
2answers
289 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
2answers
99 views

Algorithmic error in tile engine? [closed]

I'm toying with creating a tile-based 2D java game engine. I can render the "local" area without issues(I.E. deciding which local tiles to render). The problem came when I introduced floating point ...
1
vote
2answers
287 views

Full map image loading, vs individual tile loading

I want to make a isometric tile game in java, like a lot of strategy games out there. What is the best approach to loading the map for this game? Would it be better practice to load one single image ...
0
votes
1answer
1k views

Side Menu using Libgdx

I want to make it so that when the player presses start, a side menu slides out and gives a player some option on one side of the screen, similar to Angry Birds or Pokemon. I'm not sure how to go ...
-1
votes
1answer
111 views

Anti-Aliasing in Java

In my game I want to have the different anti-aliasing option like: none, x2, x4, x8 and x16. I know that you can use anti-aliasing with Graphics2D in the way below bu is there any way that I can use ...
1
vote
1answer
2k views

How to render a tilemap efficiently? [duplicate]

I'm using this code to load a tiled map, composed of 1000x1000 32x32px tiles: map = new TmxMapLoader().load("levels/xyz.tmx"); camera = new OrthographicCamera(); camera.setToOrtho(false, ...
3
votes
1answer
241 views

Where should I put my mob rendering code?

I'm making a simple LWJGL game. However, I'm a bit confused about rendering. So I have a Mob class and a TriangleMob is a basic enemy. package daniel.entity.Mob; public class TriangleMob { ...
1
vote
1answer
206 views

Mapped texture to a gluSphere not wrapping correctly

I have a 3D sphere rendered using JOGL by means of GLUquadric. I'm trying to add a texture but it is not rendering as correctly. Does anyone understand why the texture (upper-right of sphere) isnt ...
0
votes
1answer
156 views

Render graphics using Doubles in Graphics2D

Currently, I have a JFrame for my game to render in, and I'm using Graphics2D for drawing (The games graphics are fairly simple 2D sprites). However, my delta variable is a double, and all of the ...
8
votes
2answers
5k views

How do I render terrain in a 2.5D perspective, like in the game Don't Starve?

I have experience in making 2D side scroller games such as Terraria, but now I want to challenge myself and make a game that has a 2.5D perspective. The game I am trying to mimic is Don't Starve. ...
0
votes
2answers
898 views

Rendering another screen on top of main game screen in fullscreen mode

my game runs in fullscreen mode and uses active rendering. The graphics are drawn on the fullscreen window in each game loop: public void render() { Window w = ...
2
votes
3answers
1k views

Drawing graphics in Java game

I am quite new to game development, so here is a question (maybe a stupid one): In my sidescroller i have a bunch of different graphics objects that i need to draw (player, background tiles, ...
1
vote
2answers
140 views

Back to front drawing in an Unorginized array of tiles

I have an Array of tiles in no particular order. How would I do a isometric back to front rendering on it? Do I HAVE to order it?
0
votes
2answers
2k views

Efficient way to render tile-based map in Java

Some time ago I posted here because I was having some memory issues with a game I'm working on. That has been pretty much solved thanks to some suggestions here, so I decided to come back with another ...
2
votes
1answer
380 views

How to draw Isometric game Back to front

What is the for loop or algorytm for a 2D array of tiles that I would render the tiles back to front like this:
1
vote
1answer
230 views

Invert colors Java rendering

I am making a 2d platformer in java using the slick2d engine. I only use 2 colors: black and white. I want to implement a feature were i invert the colors of certain entities. However i can't find a ...
0
votes
1answer
425 views

Rendering Loop Problem (Java)

I'm not new to programming, but I am relatively new to game programming. I am trying to create a version of Breakout, as a good basic game to get myself introduced to 2d game programming. I currently ...
0
votes
1answer
338 views

Effectively implementing a game view using java

I am writing a 2d game in java. The game mechanics are similar to the Pokémon game boy advance series e.g. fire red, ruby, diamond and so on. I need a way to draw a huge map maybe 5000 by 5000 pixels ...
0
votes
1answer
395 views

Can't remove JPanel from JFrame while adding new class into it

Basically, I have my Frame class, which instantiates all the properties for the JFrame, and draws a JLabel with an image (my title screen). Then I made a separate JPanel with a start button on it, and ...
2
votes
3answers
1k views

Java tilemap not working, Think it has something to do with my image rendering

Hey can someone help me out, I've been trying to fix this for about 2 hours now, and I'm a noob when it comes to game programming and Java(only been reading and programming with it for a week now, ...
5
votes
1answer
782 views

Java rendering performance bottlenecks

I've read a lot of forums about making 3D games in Java but I was unable to build a full picture of how it performs in video games. I know that it works smoothly for small and average size games, but ...