Questions tagged [tiles-game]

Use "tiles-game" when referring to tiles based games and not "tiles".

Use "tiles-game" when referring to tiles based games and not "tiles" as the later is reserved for the Apache tiles framework.

29 questions
0
votes
1 answer

How do I update a specific portion of a bitmap image?

I'm back, and I've been making smooth progress over the last few weeks but this has stumped me for the last three days or so with no breakthroughs. This code is for reference. private void paintMap(int xToUpdate, int yToUpdate, int…
Silver
  • 100
  • 1
  • 10
0
votes
2 answers

How can I calculate the primary index of a tilemap chunk?

I have a 2D tilemap that is generated in chunks consisting of 2x2 cells each. I can reference the chunk itself and get the index of each particular cell within the chunk. However, I'd like to also store the index of the first tile within that chunk,…
Merlin
  • 929
  • 12
  • 33
0
votes
2 answers

Not getting exact result using the DrawImage function

Okay, so I have an Image which holds my tile set. Then I have my PictureBox used as my "game screen". All the code does is takes a snippet of my tile set (a tile) and place it on the game screen. Here's my code. private void picMap_Click(object…
Silver
  • 100
  • 1
  • 10
0
votes
2 answers

Encountering null pointer array when looping though object. How do I catch it?

I am encountering a null pointer when I loop through my array. Is there a test I can run to find out what might be causing this error... and maybe why there is no value when there should? The system stops at mapTiles[0][33]. Here's the code: import…
rushd
  • 273
  • 2
  • 10
0
votes
1 answer

Adding enemies from array

I have an Enemy Class(which holds all the movie clips that are enemies), a Level class(which lists the layout of the levels in an array) and my Main document class(which produces the layout of the levels in tiles). My goal is to have different…
0
votes
1 answer

Multiple levels

I was reading a tutorial about creating multiple levels, and the below really interested me on how i should go about this. It may seem natural to make one class per level, with each class extending AvoiderGame, and use events to switch between…
0
votes
2 answers

Tiled based pathfinding in a 1- or 2-dimensional array

As far as I know all tile based map editors export a JSON object containing one dimensional arrays. While most pathfinding libraries/tutorials are only provided for two dimensional arrays. Also if for example I would like to do pathfinding in this…
inControl
  • 2,215
  • 4
  • 24
  • 39
0
votes
1 answer

Placing 2d on a grid in Unity3d

I built a small MapEditor for my game in XNA. Now I want to build it in Unity3d, except I don't really understand how this works in Unity3d. So basically what I want is to create a 2d grid, where I can dynamically add tiles to the grid. Each tile…
DijkeMark
  • 1,284
  • 5
  • 19
  • 41
0
votes
2 answers

2D Tiled Game - Using new bad data

In my 2D Tiled game, I have a problem, when I update all the Object from a 2D array in a for loop inside another (looping in the 2D array from top left to bottom right, row by row(like the code below)), If the program is looping at index (5,6) and…
aziis98
  • 81
  • 2
  • 7
0
votes
1 answer

Translate Framebuffers

I draw a tile map on screen and each tile light(grayscale) in a FBO. All are quads. I store the view in a Rect. To move I change de Rect, then I do this... glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(getViewRect().left, …
0
votes
2 answers

java game - slick - collision handling

How can I manage collisions in slick ? I created map and every tile which is wall have option blocked = true; How to implement collision, that if I hit wall, I can move trough it? Also if I reach edge of map, block movement. package…
Ing. Michal Hudak
  • 5,338
  • 11
  • 60
  • 91
-1
votes
1 answer

Floor draw method in isometric engine

Im working on isometric 2D tile engin for RTS game. I have two ways how can I draw floor. One option is one big image (for example 8000px x 8000px have about 10MB) and second option is draw images tile by tile only in visibly area. My questin is…
Earlgray
  • 647
  • 1
  • 8
  • 31
-1
votes
1 answer

Python Pygame 2D game times from a map

Alright I've tried to ask this before but I'm not really getting anywhere yet. I'm hoping i can explain what i want to do well enough. i will past all the code I have so far below. Im trying to create a 2D game just as practice to get to know…
Paul Duncan
  • 302
  • 1
  • 5
  • 19
-2
votes
1 answer

Google Maps Can I get tiles?

I want to dynamically create a map but in the same/similar UI to Google maps. Is there a place to get tiles that I can use? An example: enter link description here
Jasmine
  • 15,375
  • 10
  • 30
  • 48
1
2