Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
2 answers
702 views

How would you go about placing objects between chunks in a 2D game?

I have a 2D infinitely generated world which is split up into 9 chunks at a time. Three chunks are loaded and three are unloaded whenever a player moves into a new chunk (if the player moves up a ...
propellerhat23's user avatar
0 votes
2 answers
490 views

C# Fastest way to iterate over certain tiles overlapping multiple chunks?

What's the fastest way of iterating over certain tiles overlapping multiple chunks in C#. Ideally without having to iterate over everything, just a specific set of coordinates? (green cubes example ...
Drominus's user avatar
1 vote
2 answers
746 views

Efficient way to render tilemap

I have set up a tilemap system, and am rendering it in a way that lets me pan through the map using a camera offset. However, I have discovered it is incredibly inefficient, but am unsure of how I ...
user96575's user avatar
0 votes
1 answer
87 views

only one tile being drawn xna c#

I have been looking at tile engines for the past few days and decided to have a go at my own one for educational purposes. I want to use different textures for the tiles of my map, for example 1 = ...
Anonymous5642's user avatar
0 votes
1 answer
202 views

Most efficient way to hide out of bounds object in tile based environment [duplicate]

I am working on a desktop game in C#, with Monogame framework. I am storing the tile instances in a 2D Array, for the sake of easy collision detection. But the levels are big (often 100x100 or bigger) ...
Zhafur's user avatar
  • 169
3 votes
2 answers
2k views

Zelda-style top-down RPG. How to store tile and collision data?

I'm looking to build a Zelda: LTTP style top-down RPG. I've read a lot on the subject and am currently going back and forth on a few solutions. I'm using C#, MonoGame, and Tiled. For my tile maps, ...
Delerat's user avatar
  • 33
1 vote
1 answer
282 views

Textures have lines between them when zoomed out

These are two screenshots from my new game, a top-down RTS with tiles. The first one is from a normal view with no zoom, the second one is a zoomed out view of the whole map: In the first image, the ...
ApachePilotMPE's user avatar
1 vote
4 answers
298 views

Cell Lighting Propagation Problem

I have in place a cell-based lighting system that works basically like this: (Not my actual code) ...
ben's user avatar
  • 117
1 vote
2 answers
863 views

How to tile multiple procedurally generated textures?

I'm trying to develop a procedural tile generator for a game, mostly for the ground tiles, instead of using "hand-drawn" tiles. To achieve this I'm using Perlin noise and a sine wave with multiple ...
Burhuc's user avatar
  • 13
1 vote
1 answer
2k views

Best way to load texture2d tiles in xna?

I am making a test xna game as a learning exercise and I have a small question about using 2d textures. Basically the game is a grid of different 'tiles' which are taken from a text map file. I ...
Pectus Excavatum's user avatar
2 votes
3 answers
1k views

Splitting tileset into individual tiles

I'm trying to split a tileset (from here) into individual tiles. For debugging purposes I wrote some code to split the tileset into individual tiles and display them on screen, but some aren't being ...
Leandro Battochio's user avatar
1 vote
1 answer
224 views

Automatic Tile Transitions Not Working Correctly [closed]

I've started writing a tile based game in XNA today using the tutorials here. I'm on the Part 6 - Side Topic - Auto Transitions at the moment. My transitions aren't working correctly as you can see ...
Tom O's user avatar
  • 803
0 votes
1 answer
240 views

Tile Draw Order

I started working on a tile engine recently and have been trying to get this depth sorting for the tiles right. I am using XNA and the SpriteSortMode.Deferred to get the tiles to sort correctly in the ...
x3zinja12's user avatar
2 votes
1 answer
480 views

Collision detection with XNA and TiledLib

I recently started learning XNA and after getting annoyed with creating individuals rectangles each time I wanted to add something I went with TiledLib so I could more easily create levels using the ...
Jespur's user avatar
  • 21
0 votes
2 answers
1k views

Shuffle tiles position in the beginning of the game XNA Csharp

I'm trying to create a puzzle game where you move tiles to certain positions to make a whole image. I need help with randomizing the tiles start position so that they don't create the whole image at ...
GalneGunnar's user avatar
3 votes
3 answers
615 views

Tile based platformer, using larger tiles?

So for my tile based platformer, It has a grid of tiles Occupying 1x1 block for each one. However, What if I want larger tiles? Maybe doors, tables, etc. They wouldnt fit in a 1x1 tile, so what I ...
Cyral's user avatar
  • 1,039
2 votes
3 answers
868 views

Collision Detection Problems

So I'm making a 2D tile based game but I can't quite get the collisions working properly. I've taken the code from the Platformer Sample and implemented it into my game as seen below. One problem I'm ...
MrPlosion1243's user avatar
2 votes
2 answers
2k views

How to calculate the direction a ball must bounce

I have a tile engine I have made. I can detect collision between the ball(the player) and the tiles. When a collision is detected all the colliding tiles are stored inside a list. My question now is, ...
Ziamor's user avatar
  • 181
3 votes
1 answer
2k views

2D Camera Acceleration/Lag

I have a nice camera set up for my 2D xna game. Im wondering how I should make the camera have 'acceleration' or 'lag' so it smoothly follows the player, instead of 'exactly' like mine does now. Im ...
Cyral's user avatar
  • 1,039
6 votes
5 answers
2k views

Need some advice regarding collision detection with the sprite changing its width and height

So I'm messing around with collision detection in my tile-based game and everything works fine and dandy using this method. However, now I am trying to implement sprite sheets so my character can have ...
Frank Scott's user avatar
4 votes
1 answer
863 views

Character jittering with this tile based collision code

I have been trying to get my collision code working for hours now but with every resource I have tried my character still jitters. First I tried using the platformer sample but my character still ...
Frank Scott's user avatar
2 votes
2 answers
1k views

How to store "chunks" of tiles or How to make my implementation work

I asked a previous question about the loading and unload of chunk data and people noted that my way of storing chunks is weird and I was wondering how I would go about doing it properly. @Byte56 ...
ceriosNerd's user avatar
4 votes
2 answers
6k views

Loading and unloading "chunks" of tiles in a 2d tile engine with 2d camera

I am making a 2d tile based game in C# and XNA 4.0. I am having trouble loading and unloading "chunks" of tiles(blocks). The whole world is randomly generated and is infinate on both axis. How would I ...
ceriosNerd's user avatar
2 votes
2 answers
2k views

How can I achieve smooth animation of sprites between discrete tiles?

I'm currently learning game development with C# and XNA and my current assignment is to create a Pac-Man clone. The game is partially tile based, which means that the level itself is built out of an ...
MateBoy's user avatar
  • 123
2 votes
1 answer
492 views

tiled map - changing textures? (XNA HLSL)

I have successfully created a tiled map of various textures. Right now, i had a Vector4 in my own custom Vertex declaration deciding what texture each of the tiles should be. This is working perfectly....
Joel's user avatar
  • 1,517
4 votes
3 answers
3k views

Rendering tiles on 3/4 perspective

Using a 3/4th perspective, I'm trying to create a way to render cliffs where nothing is overlapped, and it creates an accurate representation of the elevation. This is a rough mockup of how it might ...
Patrick Moriarty's user avatar
7 votes
2 answers
407 views

What would be the best way to find an open space in a level?

I'm working on a 2D game where you use paint to add tiles to a level and right now I'm working to add warp tiles. I have it set up so certain direction-oriented paints use two points (a start and end) ...
IronGiraffe's user avatar
0 votes
2 answers
736 views

How do i get my tilemap to move at the same speed as my character

I have a little problem in my solution, i'm trying to make a pretty big map for the players to walk around in. I decided to use a tile-engine, but when I move my character it moves faster than my ...
Bert 's user avatar
  • 53