Tagged Questions
0
votes
0answers
8 views
Slick2D and TileD
I've been learning Java for a while, and with my aims of being a game developer later in life, I've came across Slick2D+lwjgl and following tutorials and making some little things. However; I don't ...
0
votes
0answers
62 views
Why does Slick import Tiled object rectangles without width, height, and name tags?
I tried using Tiled rectangle objects as walls with Slick's TiledMapPlus class, but as I soon realized that each GroupObject would return 0 for width and height. The code I used looks like this:
...
0
votes
1answer
104 views
Creating a BufferedImage with several smaller images?
I am making a 2D tile based game. The tiles render fine from a spritesheet and a text file. However, I am using a for loop to draw the map to the screen. When it refreshes, it slows down the loop, and ...
1
vote
1answer
279 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, ...
-2
votes
2answers
200 views
How can I draw a map that is stored in arrays [closed]
I have spent over 12 hours with no avail trying to successfully draw my map.
The map is stored in an array called Tiles[]. Each value in Tiles can either be 4 numbers:
Grass
Stone
Water
Void (EMPTY ...
0
votes
1answer
48 views
Saving an arbitrary sized 2d array
I'm trying to create an arbitrary sized(but not infinite) 2d tilebased world. My question is, how do i save a world like this?
My idea was to split up the tiles into bigger chunks and then save those ...
0
votes
1answer
277 views
Please help me with my 2D isometric tile picking [duplicate]
Possible Duplicate:
How to convert mouse coordinates to isometric indexes?
Okay, I apologise in advance if I make no sense here.
Basically, I've got a simple application that takes in a ...
-3
votes
1answer
341 views
Slick2D TileD Map Editor Properties [closed]
So I used the following post to help me render my isometric map in Slick2D:
Slick2D Isometric TiledMap Rendering Problem
Big thanks and credit to arminb for the code supplied and for the fix to be ...
3
votes
2answers
437 views
Slick2D Isometric TiledMap Rendering Problem
I created a Tiled Map using the Tiled Map Editor. In the Editor it looks like this:
Desired State
In my java program it looks like this:
Actual State
My java code is:
public class Game extends ...
2
votes
2answers
180 views
How to stack units in a tile based game?
I'm trying to make it so that no more than 5 units can be stacked on a tile. I have a Tile class that creates each tile's preferences. Should I store the units in an array or arraylist in this class?
1
vote
2answers
313 views
Collision checking problem on a Tiled map
I'm working on a pacman styled dungeon crawler, using the free oryx sprites. I've created the map using Tiled, separating the floor, walls and treasure in three different layers. After importing the ...
1
vote
1answer
241 views
Saving a list of points into a text file
I recently posted a question about this, but was not really sure where to go. I've gotten some progress, and have generated some simple noise here:
http://pastie.org/5408655
That works well enough ...
1
vote
0answers
704 views
TileMapRenderer in libGDX not drawing anything
So I followed the tutorial on the libGDX wiki to draw Tiled maps but it doesn't seem to render anything.
Here's how I setup my OrthographicCamera and load the map:
camera = new ...
-1
votes
1answer
163 views
Get coordinates of arraylist
Here's my map class:
public class map{ public static final int CLEAR = 0;
public static final ArrayList<Integer> STONE = new ArrayList<Integer>();
public static final int GRASS = 2;
...
1
vote
3answers
275 views
(int) Math.floor(x / TILESIZE) or just (int) (x / TILESIZE)
I have a Array that stores my map data and my Tiles are 64X64. Sometimes I need to convert from pixels to units of tiles. So I was doing:
int x
int y
public void myFunction()
{
getTile((int) ...
0
votes
2answers
1k 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 ...
1
vote
2answers
536 views
Java: Tile-based Collision Detection with Rectangles
There are a few tile-based collision detection questions out there, but none seemed to suit my need.
I guess I really would like to know why this method for collision detection isn't working.
It ...
1
vote
3answers
415 views
Compressing 2D level data
So, I'm developing a 2D, tile based game and a map maker thingy - all in Java.
The problem is that recently I've been having some memory issues when about 4 maps are loaded. Each one of these maps ...
-2
votes
1answer
203 views
Tile engine Texture not updating when numbers in array change
I draw my map from a txt file. I am using java with slick2d library. When I print the array the number changes in the array, but the texture doesn't change.
public class Tiles {
public Image[] tiles ...
0
votes
1answer
288 views
Java - Finding distance between player and tile in array
What is the best way performance wise to do this? When I click a tile I want it to get the distance and if I am close enough I can interact with the tile. One way would be to find the tile by doing ...
2
votes
1answer
2k views
Java - 2d Array Tile Map Collision
How would I go about making certain tiles in my array collide with my player? Like say I want every number 2 in the array to collide. I am reading my array from a txt file if that matters and I am ...
1
vote
3answers
307 views
For the handling of buildings on a tile-based strategy game, what aproach should I use?
On a tile-based game of the strategy genre, which allows the player to place buildings over the terrain tiles, there are multiple approaches that can be taken for handling such situation.
The ones ...
1
vote
1answer
1k views
Drawing hexagonal grid on Android
I'm trying to draw a hexagon grid in my Android application. I don't want to reinvent the wheel here so I'm looking for some frameworks/libraries or just some basic ideas about how should one do this. ...
1
vote
2answers
354 views
How can I create tiles that scale to multiple resolutions?
I am trying to create a multiplayer version of the popular Flash game N in Java. However, I'm not sure how to create a tileset that will scale up. Are the tiles for N pre-drawn or are they defined ...
9
votes
5answers
512 views
Increasing the probability for similar tiles to generate next to each other
I'm working on a tile map system, which insofar looks like this (green is grass, air is white, stone is grey, and blue is water):
It uses a simple random number generator so that there's a 45% ...
2
votes
1answer
515 views
Slick2D Tile Based 'Fog of War' Blurring Problem
I'm working on my first Java Game and I have run into a little problem I'm hoping to get some help with. I'm using Slick2D displaying a tile based map, and I'd like to know how I can created a ...
1
vote
1answer
250 views
How do I determine if a tile is a slope based on the tile image?
In my game, every tile is a 32x32 texture. All the slopes are a 0 - 45 degree angle. I would like to determine, at the time I load the tile, if the is sloped by examining its texture/bitmap data. How ...
2
votes
0answers
611 views
Collision Detection on floor tiles Isometric game
I am having a very hard to time figuring out a bug in my code. It should have taken me 20 minutes but instead I've been working on it for over 12 hours. I am writing a isometric tile based game where ...
1
vote
2answers
658 views
2d very large tile based game, zoom and pan considerations
what's a sensible way of implementing zoom and panning for my game?
each tile is very large, 100,000 x 100,000 pixels, with some objects possibly being only a single pixel at maximum zoom (small ...
3
votes
1answer
2k views
Scrolling tile system
I know this is a common question, but I can't find an answer to it that isn't written using a huge game library sadly.
I'm trying to write a scrollable tile system, which allows the user to move ...
12
votes
2answers
652 views
How do you handle uneven tiles while rendering a tile map?
Here is what I want to do with my tile map that I am unsure of. As you can see the top walls are way larger then the bottom and side ones (this is also an issue with my corners which are odd shapes ...
2
votes
3answers
823 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, ...
2
votes
2answers
812 views
Tile based map and collision; getting stuck
I'm trying to make my character move around a tile map with collisions. Everything works fine except for one thing. I show you a picture with the problem:
http://i.stack.imgur.com/ZWI7x.jpg
That is, ...
1
vote
2answers
402 views
Level Creating Help
I am making a little 2d overhead RPG type game just for fun. I have almost all the basic stuff set up, but I just need a little help on level creation. I can already make a level and place each tile ...
6
votes
2answers
2k views
Tiled based map collision detection problem
I'm working on a tile-based Mario clone. I have implemented the tile based collision method from the tutorial http://www.tonypa.pri.ee/tbw/tut05.html.
This works all fine when walking and falling. ...
3
votes
1answer
339 views
More smaller maps among which player can travel
I am developing 2d game, where maps are tile based, small about 20x20 tiles and player can travel between a lot of maps (in my game rooms) like this. The maps are connected sometimes verticaly and ...
5
votes
1answer
781 views
Method of terrain in a 3d RPG
I am working on a RPG using the JMonkey engine. While I was conceptualizing the map, I realized I would have a problem with the terrain.
My problem is this: I want to have a click to move interface, ...
2
votes
1answer
584 views
Storing Tiled Level Data in J2ME game
I'm developing a J2ME game which uses tiled backgrounds for the levels. My question is how do I store this tile information in my game. At the moment it is stored as an array; with each number ...
8
votes
2answers
2k views
How do I tackle top down RPG movement?
I have a game that I am writing in Java. It is a top down RPG and I am trying to handle movement in the world. The world is largely procedural and I am having a difficult time tackling how to handle ...


