0
votes
2answers
65 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
31 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
74 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
189 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
83 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
231 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
670 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
108 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
1k 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
234 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
189 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
131 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
4k 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
780 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
747 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
135 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
359 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
220 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
377 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
310 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
312 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
729 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 ...